Ok. I just looked at read_pci_config. It doesn't do the right thing for
a non-aligned 32bit access. (Not that I am convinced there is a right
thing we can do). Please make this read_pci_config_16 instead
and you won't need the shift.
Either that or as I earlier suggested just do a 32bit read from offset 0
and use shifts and masks to get vendor and device fields.
The current code doing a shift where none should be needed (because
we ignore the two low order bits in our read) is totally weird
when looking at it.
You almost got YH's comment. You need return 2 for the old functions
so we don't try and apply a per chipset fixup for every device in
I'm actually inclined to remove the return magic and just do something
In those functions that should be called only once.
Hmm. I don't think we want this code positioned in the middle of the
nvidia bug checks.
vendor = read_pci_config_16(num, slot, func,
device = read_pci_config_16(num, slot, func,