Linux and the 3Com EtherLink III Series Ethercards
This page contains information on using Linux with 3Com EtherLink III series ethercards.
The master copy of this page resides on the Scyld web server.
Installing an Updated Driver
Most current distribution already have a stable, reliable version of this driver. Only older systems are likely to need an updated driver.
The source is available from ftp://ftp.scyld.com/pub/network/3c509.c . Read http://scyld.com/expert/modules.html for installation directions.
Special Driver Features
The 1.14 and later versions allow overriding the IOADDR, IRQ, and transceiver setting of detected cards. This capability should be rarely needed. The syntax for LILO parameters is
ether=10,0x310,3,0x3c509,eth0This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and transceiver #3 (10base2). The flag "0x3c509" must be set to avoid conflicts with other card types when overriding the I/O address.
Only the IRQ and transceiver setting may be overridden when using the driver as a module. Setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using the xcvr and irq module options:
Available Transceiver Types
The available transceiver types are
0 | default from EEPROM, normally 10baseT |
1 | AUI (DB15 connector) |
2 | undefined |
3 | 10base2 (BNC) |
4 | 10baseT only (RJ45 connector) |
Common problems
Decoding Status and Error Messages
The bits in the main status register are:
value | description |
0x01 | Interrupt latch |
0x02 | Tx overrun, or Rx underrun |
0x04 | Tx complete |
0x08 | Tx FIFO room available |
0x10 | A complete Rx packet has arrived |
0x20 | A Rx packet has started to arrive |
0x40 | The driver has requested an interrupt |
0x80 | Statistics counter nearly full |
The bits in the transmit (Tx) status word are:
value | description |
0x02 | Out-of-window collision. |
0x04 | Status stack overflow (normally impossible). |
0x08 | 16 collisions. |
0x10 | Tx underrun (not enough PCI bus bandwidth). |
0x20 | Tx jabber. |
0x40 | Tx interrupt requested. |
0x80 | Status is valid (this should always be set). |
When a transmit error occurs the driver produces a status message such as
- 0x82
- Out of window collision. This typically occurs when some other Ethernet host is incorrectly set to full duplex on a half duplex network.
- 0x88
- 16 collisions. This typically occurs when the network is exceptionally busy or when another host doesn't correctly back off after a collision. If this error is mixed with 0x82 errors it is the result of a host incorrectly set to full duplex (see above).
Error Messages
-
eth0: Infinite loop in interrupt, status 2011.
-
These are "mostly harmless" message indicating that the driver had too much work during that interrupt cycle. With a status of 0x2011 you are receiving packets faster than they can be removed from the card. This should be rare or impossible in normal operation.
Possible causes of this error report are
- a "green" mode enabled that slows the processor down when there is no keyboard activitiy.
- some other device or device driver hogging the bus or disabling interrupts. Check /proc/interrupts for excessive interrupt counts. The timer tick interrupt should always be incrementing faster than the others.
- No received packets
- If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never
receives packets (as reported by /proc/net/dev or 'ifconfig') you likely
have an interrupt line problem. Check /proc/interrupts to verify that the
card is actually generating interrupts. If the interrupt count is not
increasing you likely have a physical conflict with two devices trying to
use the same ISA IRQ line. The common conflict is with a sound card on
IRQ10 or IRQ5. The easiest solution is to move the 3c509 to a different
interrupt line.
- If the device is receiving packets but 'ping' doesn't work, you have a routing problem.
- Tx Carrier Errors Reported in /proc/net/dev
- If an EtherLink III appears to transmit packets, but the "Tx carrier errors" field in /proc/net/dev increments as quickly as the Tx packet count, you likely have an unterminated network or the incorrect media tranceiver selected.
- 3c509B card is not detected on machines with an ISA PnP BIOS.
- While the updated driver works with most PnP BIOS programs, it does not work with all. This can be fixed by disabling PnP support using the 3Com setup program.
- 3c509 card is not detected on overclocked machines
- Increase the delay time in id_read_eeprom() from the current value, 500, to an absurdly high value, such as 5000.
Errata
These are the known errata for the distributed 3c509 driver:
- v1.00-v1.13B message: Waiting for 3c509 to discard packet, status 2011.
-
The card is taking too long to discard a received frame, or (more likely)
your ISA bus is running faster than standard 8Mhz.
The messages only occur when you get packets with errors or are temporarily
running out of memory.
- The changes in v1.14 fix (or at least minimize) the problem.
Rather than changing the EEPROM setting to select a different transceiver port (10baseT, BNC, AUI) type, you can:
- Upgrade to v1.14 or make the following modification to 3c509.c:el3_probe()
- Run the 'ifport' program from the PCMCIA package or
- set the 'ifport' using a new version of 'ifconfig'
found: dev->base_addr = ioaddr; dev->irq = irq; - dev->if_port = if_port; + if (dev->mem_start) + dev->if_port = dev->mem_start & 3; + else + dev->if_port = if_port; request_region(dev->base_addr, EL3_IO_EXTENT, "3c509"); and pass in the transceiver type as the third parameter to the LILO setting: ether=0,0,4,eth0 where 0 Use EEPROM setting 1 AUI 2 undefined 3 BNC 4 10baseT
These are errata for the distributed Linux-1.2.13 3c509 driver:
- The 3c509b (the *B* model only) may need to have Plug-and-Play disabled using the 3Com card configuration program. The driver in kernel 2.0 (and the updated driver for 1.2.13 should avoid this problem.
- The 1.2.13 driver always uses 0x100 as the "ID Port", preventing an ISA 3c509 from being detected with some hardware configurations. This can conflict with cards (usually multiport serial cards or "32 bit" sound cards) unwisely jumpered to be in that I/O area. The updated driver searches for an empty location of the form 0x1[0-F]0 to use as the ID Port, however this reportedly does not fix the problem with some "32 bit" sound cards.
- Old 3c509 (not the *B* model) cards would sometimes set the 'adapter failure' bit for unknown reasons. The 1.2.13 driver fails to note this failure and doesn't reset the card. This is a rare problem: few people encounter it. The updated driver should properly recover from this event.
- The 1.2.13 driver may occasionally produce the following message:
eth0: Missed interrupt, status then 2011 now 2000 Tx 00 Rx 8000.
This is (rather, should be) a rare race condition that happens in some error checking code. When a packet is to be transmitted, the driver checks if an interrupt is pending. If there is one pended, it usually means that some other device is using the interrupt line and preventing the interrupt controller form seeing it.
This check works fine on most motherboards (i.e. "my development motherboard"), but some chipset are slow to report the interrupt. (Probably a because they are filtering out interrupt glitches -- a good thing given some poorly designed older cards.) The driver then thinks the interrupt line is broken, and prints the message. As part of printing the message, it check the interrupt status again. Note that the "now" value has the interrupt cleared, so it was handled after all.
This message can be eliminated by compiling the driver with the '-Dfinal_version' flag that turns off this (and only this) error check.
The driver update on ftp://ftp.scyld.com/pub/network/3c509.c addresses all of the above problems. Please send a report if this updated driver fixes a problem you have encountered.
Change summary
- ISA activation mechanism selects a free I/O locations for the ID Port.
- Allows the boot-time parameter to override the EEPROM specified IRQ line. (I'm still reluctent to allow setting the I/O address with this method.)
- Always maps the card to the EEPROM location, even if Plug-and-Play puts it somewhere else.
- Avoids the spurious "interrupt for unknown device" message.
- Replaces a few numeric constants with symbolic ones.
- Recovers from an 'adapter failure' indication when possible.
- Allows more time before deciding that the transmitter has hung.
- Adds MCA support from Erik Nygren, if CONFIG_MCA is defined.
Acknowledgments
Thanks to John Murphy, murf@perftech.com , for pointing out what was really happening with the Plug-and-Play conflict.
Thanks to Terry Murphy and Cameron Spitzer of 3Com for providing the EtherLink III technical reference manuals.
Thanks to Erik Nygren, nygren@mit.edu, for the MCA support.
Linux Network Drivers Page
SCYLD information.
Author: Donald Becker
See the drivers for the contact email address. Do not bother sending email to zinc.anode@scyld.com, as email to that address adds your domain or IP address to the known-spammer list.