[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo4mbdaT1e2KmS2JjP1FFKfZDToXzgkb+Na_ejoo+t8snQ@mail.gmail.com>
Date: Thu, 15 Dec 2011 09:58:51 -0700
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Christian Gmeiner <christian.gmeiner@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: PCI(e) enumeration
On Thu, Dec 15, 2011 at 2:41 AM, Christian Gmeiner
<christian.gmeiner@...il.com> wrote:
> Hi all,
>
> I maintain a debian based linux RFS in my company and my college does the
> same for windows. Now we run into a problem that windows and linux use a
> different network interface as eth0. In our target system there
> are two identical NICs installed.
>
> So I am now looking to find out, how linux does the PCI enumeration
> and in which order
> the PCI driver gets called to do the initialization. Can somebody tell
> me if a depth-first search
> or a breadth-first search is done on the PCI bus.
>
>
> For instance look at this lspci output:
>
> 00:01.0 Host bridge: Advanced Micro Devices [AMD] CS5536 [Geode
> companion] Host Bridge (rev 33)
> 00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video
> 00:01.2 Entertainment encryption device: Advanced Micro Devices [AMD]
> Geode LX AES Security Block
> 00:04.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast
> Ethernet Controller (rev 10)
> 00:0f.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode
> companion] ISA (rev 03)
> 00:0f.2 IDE interface: Advanced Micro Devices [AMD] CS5536 [Geode
> companion] IDE (rev 01)
> 00:0f.3 Multimedia audio controller: Advanced Micro Devices [AMD]
> CS5536 [Geode companion] Audio (rev 01)
> 00:0f.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode
> companion] OHC (rev 02)
> 00:0f.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode
> companion] EHC (rev 02)
> 00:0f.7 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode
> companion] UOC (rev 02)
>
> How will linux does the enumeration?
The kernel enumerates PCI devices with a depth-first traversal, but
that isn't what determines the ethX device name. That name is
determined by the order in which network drivers are loaded and claim
devices, which gets into distro details like udev.
Here's a nice paper with more details:
http://www.dell.com/downloads/global/power/ps1q07-20060392-Domsch.pdf
If that's not enough to solve your problem, a debian-related forum
will probably be more useful than LKML.
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists