Subject: Re: looking for devices on PCI bus
To: Michael Lyle <>
From: Frank van der Linden <>
List: tech-kern
Date: 05/02/2001 01:36:04
On Tue, May 01, 2001 at 04:21:34PM -0700, Michael Lyle wrote:
> It'd also be nice to handle hotplug PCI nicely at the same time..
> e.g. there should be a facility to register a "listener" for a given
> PCI type..  and first all matching existing devices would call the handler
> callback, and then any device inserted would trigger it..
> preferably one would do this without re-autoprobing-- e.g. keep hash
> tables of what hardware is in the system.

We're running way out of scope here.. What Manuel needs is
a hack for the via 686 pciide driver. That driver needs to
know the revision of another device on the PCI bus (the PCI-ISA
bridge in the same chipset). So it needs to find that
device, and the only way is to scan pci config space.

This is ugly, but there doesn't seem to be another way.

So all he needs is a simple function to scan PCI config space
for a device. Not that I want to discourage people from
discussing PCI hot plug and better LKM frameworks, far from it,
but that is a seperate discussion from this particular issue.

- Frank