Subject: Re: looking for devices on PCI bus
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 05/03/2001 12:30:49
On Thu, May 03, 2001 at 08:51:32PM +0200, Manuel Bouyer wrote:

 > They look at the pcib device ID
 > This is why I need to scan the PCI bus from the pciide driver.
 > As I said before there could be a hook in the pcib driver for this but:
 > - this makes pciide relies on pcib (i.e. a kernel without pcib will either
 >   not compile, or not work with VIA controllers)
 > - pcib is MD
 > - if for whatever reasons pciide is probed before pcib we loose

I have been largely ignoring this thread, because it seems like the
signal/noise ratio dropped pretty quickly, but... If this is for the
VIA chipset problem, this really is pretty easy...

We should promote the "bus" number into the pci_attach_args(), and then
you can:

	pcibtab = pci_make_tag(pa->pa_pc, pa->pa_bus, pa->pa_device,
	    0 /* function of the ISA bridge */);

...and then read config space to your heart's content.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>