[SOLVED] detect ethernet card?
On Fri, 10 Sep 2010 16:33:11 -0400 (EDT), atucelulis@googlemail.com wrote:
> On Friday 10 September 2010 10:10:22 am Geoff Simmons wrote:
>> Support for the 82567LM-3 (PCI ID 8086:10de) was added to the e1000e
>> driver in linux-2.6 2.6.26-25, which is part of the recent[1] Debian
>> Lenny point release (5.0.6).
>>
>> upgrade your system to 5.0.6.
>>
>> An interface for this network device should become available once your
>> system is restarted with the updated kernel.
>
> That worked. Problem solved. Thank you very much!
>
> I still don't have e1000e or e1000 in /etc/modules, but since the
> problem is solved, that should not matter any more.
As a general rule, kernel modules which function as a device driver
for a piece of hardware do not need to be listed (and should not be
listed) in /etc/modules.
They will be loaded automatically by udev if the kernel module has
an alias which matches the id of the piece of hardware. For example,
user@icc07:~$ /sbin/lspcmcia -v
Socket 0 Bridge: [yenta_cardbus] (bus ID: 0000:00:03.0)
Configuration: state: on ready: unknown
Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V
Socket 0 Device 0: [xirc2ps_cs] (bus ID: 0.0)
Configuration: state: on
Product Name: Compaq Netelligent 10/100 PC Card CPQ-10/100 1.00
Identification: manf_id: 0x0183 card_id: 0x010a
function: 6 (network)
prod_id(1): "Compaq" (0x54f7c49c)
prod_id(2): "Netelligent 10/100 PC Card" (0xefe96769)
prod_id(3): "CPQ-10/100" (0x7a590ccf)
prod_id(4): "1.00" (0x83dbf271)
Socket 1 Bridge: [yenta_cardbus] (bus ID: 0000:00:03.1)
Configuration: state: on ready: unknown
user@icc07:~$ /sbin/modinfo xirc2ps_cs
filename: /lib/modules/2.6.26-2-686/kernel/drivers/net/pcmcia/xirc2ps_cs.ko
license: Dual MPL/GPL
description: Xircom PCMCIA ethernet driver
alias: pcmcia:m*c*f*fn*pfn*pa44A09D9CpbB44DEECFpc*pd*
alias: pcmcia:m*c*f*fn*pfn*pa816CC815pb174397DBpc*pd*
alias: pcmcia:m*c*f*fn*pfn*pa54F7C49CpbEFE96769pc*pd*
alias: pcmcia:m*c*f*fn*pfn*pa54F7C49Cpb9FD2F0A2pc*pd*
alias: pcmcia:m*c*f*fn*pfn*pa2E3EE845pb*pcF7188E46pd*
alias: pcmcia:m*c*f*fn*pfn*pa2E3EE845pb*pc3E08D609pd*
alias: pcmcia:m*c*f*fn*pfn*pa2E3EE845pb*pc2464A6E3pd*
alias: pcmcia:m*c*f*fn*pfn*pa2E3EE845pb*pc947D9073pd*
alias: pcmcia:m*c*f*fn*pfn*pa2E3EE845pb*pc0EC0AC37pd*
alias: pcmcia:m*c*f*fn*pfn*pa1B3B94FEpb*pcF381C1A2pd*
alias: pcmcia:m01BFc010Af*fn*pfn*pa*pb*pc*pd*
alias: pcmcia:m*c*f*fn*pfn00pa2E3EE845pbECA401BFpc*pd*
alias: pcmcia:m*c*f*fn*pfn00pa2E3EE845pb*pcF1403719pd*
alias: pcmcia:m*c*f*fn*pfn00pa2E3EE845pb*pc76DF1D29pd*
alias: pcmcia:m*c*f*fn*pfn00pa2E3EE845pb*pcA650C32Apd*
alias: pcmcia:m*c*f*fn*pfn00pa2E3EE845pb*pc80609023pd*
alias: pcmcia:m*c*f*fn*pfn00pa2E3EE845pb*pc0EA978EApd*
alias: pcmcia:m0138c110Af*fn*pfn00pa*pb*pc*pd*
alias: pcmcia:m0089c110Af*fn*pfn00pa*pb*pc*pd*
depends: pcmcia,pcmcia_core
vermagic: 2.6.26-2-686 SMP mod_unload modversions 686
parm: if_port:int
parm: full_duplex:int
parm: do_sound:int
parm: lockup_hack:int
user@icc07:~$
In this case, the xirc2ps_cs kernel module is loaded automatically
because its third alias matches the piece of hardware. (Notice the
correspondence between the hexadecimal identifiers for prod_id(1)
and prod_id(2) with the hexadecimal identifiers in the alias.) The
exact mechanism for matching is bus-dependent (isa, pcmcia, pci,
etc.) But the point is that udev finds a match between a piece of
hardware and a kernel module via the aliases of the kernel module.
If a kernel module is known to work with a piece of hardware, but
it does not have a suitable internal alias defined, an alias statement
may be added to a .conf file in /etc/modprobe.d to define the alias.
This is the preferred method for loading a kernel module which is
a device driver.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
Reply to: