Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Sep 2012 10:48:39 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Navdeep Parhar <np@freebsd.org>
Subject:   Re: Order in which a driver attaches to devices
Message-ID:  <201209071048.39664.jhb@freebsd.org>
In-Reply-To: <504910CB.8050007@FreeBSD.org>
References:  <504910CB.8050007@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209071048.39664.jhb>