Order in which a driver attaches to devices
John Baldwin
jhb at freebsd.org
Fri Sep 7 15:07:05 UTC 2012
On Thursday, September 06, 2012 5:08:27 pm Navdeep Parhar wrote:
> I have a system with multiple cards supported by cxgbe(4). When I build
> a kernel with the driver compiled in, it attaches to the cards in a
> different order from when it's loaded as a module. Why? The network
> interfaces get re-ordered and this is quite annoying.
Hmmmm. The boot time probe does a depth first walk of the PCI bus. This is
what is suggested by PCI-SIG for enumerating PCI buses (and is normally how
BIOSs walk the bus assigning bus numbers). The walk that is done at kldload
time walks the 'pciX' bus devices in numerical order (rather than walking the
tree). I suspect your BIOS is doing something weird and assigning bus numbers
in a non-depth first ordering so that the two orderings are not consisent as
they are on other machines.
--
John Baldwin
More information about the freebsd-hackers
mailing list