Subject: Re: looking for devices on PCI bus
To: Matthias Drochner <>
From: Bill Studenmund <>
List: tech-kern
Date: 05/02/2001 11:04:41
On Wed, 2 May 2001, Matthias Drochner wrote:

> (And: Adding such a pseudo-generic function implies the danger thit it will
> actually be used, eg for LKMs, which would be a gross violation of our
> autoconfiguration philosophy. That's what we have xxxmatch() functions for.
> But this off-topic, I know...)

The thing is that our current autoconfiguration philosophy implicitly
assumes that we scan the bus once, and that all drivers are in the kernel
at that time. i.e. all the xxxmatch() functions which will ever be called
are there when we walk the bus.

That's not true for LKMs, so it seems to me to be harsh to say that LKMs
are broken since they don't use the config model which doesn't work for
them. :-)

I think the best thing would be to add the function(s) we've been talking
about, and to add info in the pci bus code so that we remember what we

The memory helps a couple of ways. For an LKM, if we've found and didn't
configure one of the cards the LKM is for, we can just tell the LKM about
it. Also for hot-swap, if we find devices we found last time, we don't
need to reconfigure them.

Yeah, I'm describing device properties, though they are more accuratly pci
device/function properties rather than NetBSD driver properties. They
would exist even if there was no appropriate NetBSD device.

Also, the scan routine would scan all slots, even ones we don't have info
for. That way we could find the pcib that indicates the pciide version
even if we haven't gotten to it yet.


Take care,