Re: How does "alias ethX drivername" in modules.conf work?

Matt_Domsch@Dell.com
Wed, 8 Aug 2001 08:59:35 -0500


> Userspace init scripts point the finger at kernel, saying "there
> is no good and no well documented mapping method". Kernel points
> its finger at userspace, saying "this is the way we do it" and
> "we cant guarantee a perfect 100% mapping solution, so we're not
> even going to try for 90%" and "futz with your drivers and
> modules.conf and init scripts till you get something that
> works".

Ethtool can help out initscripts, and I've recently submitted patches to the
appropriate maintainers for the eepro100 (both in-kernel and Donald's),
acenic, bcm5700, Intel e100 and e1000, so those cards report back their
assignments when using ethtool. Several other drivers already have this
support in them.

ethtool -i eth0 returns:
driver: eepro100
version: someversionstring
firmware-version: someversionstring
bus-info: 00:05.0

Now you know at least that eth0 is an eepro100-driven card, and it's a PCI
device at 00:05.0. lspci can give you the name of the card then if you want
it.
This helps, but doesn't solve the problem of knowing, looking from the
outside, which physical card is considered eth0, or conversely, what ethX
assignment did my embedded NIC get. On x86, the $PIR PCI IRQ Routing Table
provided by BIOS can help. It describes embedded (Slot 0) or add-in (Slot
x>0) cards using slot names likely silkscreened on the motherboard or
numbered externally.

Slot 0: PCI 00:05.
Slot 0: PCI 00:06.
Slot 0: PCI 00:08.
Slot 0: PCI 00:0f.
Slot 1: PCI 00:07.
Slot 2: PCI 03:08.
Slot 3: PCI 03:09.
Slot 4: PCI 03:0a.
Slot 5: PCI 03:0b.
Slot 6: PCI 0d:0c.
Slot 7: PCI 0d:0d.

A little sorting is required, as the table doesn't include (or for it's
purposes need to include) the PCI function number of multi-function devices,
but at least you know what's embedded and what's add-in now, and what
physical PCI slot.

I'm continuing to flesh out this idea, so if you've got thoughts for how to
make good use of this info, please let me know.

Thanks,
Matt

-- 
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions
www.dell.com/linux
#2 Linux Server provider with 17% in the US and 14% Worldwide (IDC)!
#3 Unix provider with 18% in the US (Dataquest)!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/