Ethernet Autoprobing

Ethernet Autoprobing

At boot time, a kernel with Ethernet support or an Ethernet driver module (being loaded by modprobe) attempts to probe and detect the Ethernet card. The probing involves reading from and writing to specific I/O port addresses.

Although you specify a single I/O port address for a device, most devices use a block of I/O addresses for their operation. The I/O address you specify is the base address; the rest of the I/O addresses are consecutive I/O ports, starting at the base address.


Depending on the number of I/O addresses a device uses, two devices may end up with overlaps in the range of I/O addresses they use. The NE2000 card, for example, uses 32 I/O ports (that's 0x20 in hexadecimal notation). If you select 0x360 as the base I/O address for a NE2000 card, the card uses the ports from 0x360 to 0x37F. Unfortunately, the PC's parallel port (LPT1) uses the base I/O address of 0x378, and the secondary IDE controller uses the addresses 0x376-0x376. Thus, the NE2000 configured at 0x360 now has an overlap with the I/O addresses the first parallel port and the secondary IDE controller use. In this case, you can prevent any problems by configuring the NE2000 card at a different I/O address, such as 0x280.

Overlapping I/O port addresses cause problems; during autoprobing, the kernel may perform operations that might be harmless for some devices, but that may cause another device to lock up the system. Typically, however, if your Ethernet card and other devices are working under DOS or Windows, you should have no problem with them under Linux (assuming, of course, that your Ethernet card is supported under Linux).

If your system hangs during autoprobing, you can exclude a specific range of I/O addresses from being probed. To exclude a range of addresses during autoprobing, use the reserve command during the boot loader boot prompt. The reserve command has the following syntax:


Here, BASE-IO-PORT1 is an I/O port address in hexadecimal notation (for example, 0x300), and NUMPORTS1 is the number of ports (for example, 32) to be excluded when autoprobing. The arguments in brackets are optional; they are used to specify additional exclusion regions.

If you prevent a range of I/O addresses from being autoprobed, a device that may be at that address may not be detected. Thus, you must specify that device's parameters explicitly on the boot command line.

For Linux kernels with Ethernet support linked into the kernel, the boot command for specifying device parameters is ether, which takes the following format:


Table D-2 explains the meanings of the arguments. All arguments are optional. The Ethernet driver takes the first nonnumeric argument as NAME.

Table D-2: Arguments for ether




The IRQ of the Ethernet card. Specify a zero IRQ to make the driver autodetect the IRQ.


The base I/O port address of the Ethernet card. Specify a zero BASE-IO-PORT to make the driver autodetect the base I/O port address.


The meaning depends on the Ethernet driver. Some drivers use the least significant 4 bits of this value as the debug message level. The default is 0; set this argument to a value of 1 to 7 to indicate how verbose the debug messages should be (7 means most verbose). A value of 8 stops debug messages. The AMD LANCE driver uses the low-order 4 bits as the DMA channel.


The meaning depends on the Ethernet driver. The 3Com 3c503 drivers use this value to select between an internal and external transceiver-0 means the internal transceiver, and 1 means that the card uses an external transceiver connected to the DB-15 thick Ethernet port.


The name of the Ethernet driver (eth0, eth1, and so on). By default, the kernel uses eth0 as the name of the first Ethernet card it autoprobes. The kernel does not probe for more than one Ethernet card; that would increase any chance of conflicts with other devices during autoprobing.

If you have an Ethernet card at the I/O address 0x300 and do not want this card to be autoprobed, use a command line such as the following at the boot prompt:

reserve=0x300,32 ether=0,0x300,eth0

The reserve command prevents 32 I/O ports starting at 0x300 from being autoprobed, whereas the ether command specifies the base I/O port address for the Ethernet card. The exact I/O addresses depend on your Ethernet card and the range of addresses for which an overlap with some other device exists. Most of the time, you should not have to use these commands.


The I/O addresses and IRQs of PCI cards are assigned by the PCI BIOS when the system powers up. Thus, you cannot set the I/O address or IRQ of any PCI card through the boot commands. Even if you specify these parameters through boot commands, they are ignored for a PCI device.