The logical pci busses must attach to the physical pci bridges using the
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 10 Feb 2004 07:26:06 +0000 (07:26 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 10 Feb 2004 07:26:06 +0000 (07:26 +0000)
commitf6da806ed394989bc2e0d5172ae26d26cb76eb52
treeb7ded866c8b2a5af313942c6ba1010f21ad7a1aa
parent08df2a2a7f70639e1d75144f56118fb5e2189104
The logical pci busses must attach to the physical pci bridges using the
same pci identifier used for the bridge.  If a machine has multiple
motherboard PCI bridges and also has a pci-to-pci bridge hanging off one
of those bridges, it was possible for the pci-to-pci bridge to be handed
an identifier for a motherboard pci bridge bus number which has not yet
been probed.  Then, later on, when the motherboard pci bridge bus is
probed the system believes that it has already been probed and refuses to
scan it.

This is why pcib #1, which gets added *AFTER* pcib #2 on a DELL 2550 does
not appear to exist on a DFly or FreeBSD-4 box.  pcib #1 is what the
BGE network driver is hanging off of on a DELL 2550.

This commit uses the secondary bus identifier as the starting unit number
for the attach rather then -1 (which scans forward from unit 0).  I am
not entirely sure that this is the correct fix.
sys/bus/pci/pcisupport.c