Re: Unable to handle kernel NULL pointer... on cat /proc/pci

Gabriel Paubert (paubert@iram.es)
Wed, 24 Sep 1997 12:30:39 +0200 (METDST)


On Wed, 24 Sep 1997, Magnus Sjoegren wrote:

> > Your chipset is likely broken, a not present PCI device, should return
> > ffff:ffff, some broken ones return 0000:0000 but yours is truly abnormal.
> > Then the system thinks you have about 30 multifunction devices, each
> > with 8 functions, true ?

> Yes, something like that, 15 devices with 7 functions. No matter.

Functions are numbered 0 to 7, and you might overflow the buffer
when doing cat /proc/pci. But it also might be that your chipset
returns 0xffffffff when the device field is invalid (can not select the
IDSEL pin of any device) and 0xEFFFFFFF when it starts a configuration
cycle that is terminated by a master abort (when a device might be
connected).

>
> Could you try the following simple patch:
> [snip]
>
> Allright i did.
> The patch got rid of the oops when doing a 'cat /proc/pci', good.

Note that I don't think that my patch is the right thing to do, it was
written to verify where the problem was.

But the problem to avoid detecting a spurious device with broken hardware
is much more complex. The idea I have now is to try to clear all the error
bits from the PCI_STATUS register and to check that they are
effectively cleared, this should also make your /proc/pci less cluttered.

My opinion is that clearing these bits during bus scan at boot is harmless
and is a reliable indication of the presence of a device.

Comments, flames ?

Gabriel.