Linux and the SMSC "EPIC" Series Ethernet Controllers

This page contains information on using Linux with the SMC EPIC/100 83C170 Ethernet Controller, as used on the SMC 9432TX EtherPower II and various CardBus cards.

The master copy of this page resides on the Scyld web server.

The Linux driver for the SMC EtherPower II is available from this web page. This driver works with SMSC 83c170 "EPIC" family of chips, found on the SMC 9432 PCI EtherPower II card and several CardBus cards, notably those from Ositech.

A more recent test version of the driver may also be available.

The driver for the original EtherPower series, based on the Digial 21040 series, is available on the Tulip driver page. The driver for the new SMC "EZ" cards is available from the PCI NE2000 clone page.

Usage instructions

Pre-compiled Driver Modules

A precomiled driver module is likely available with your Linux distribution. You should not need the driver version from this site unless you require a new feature or a bug fix.

Installation

Read the Network Drivers as Modules page for instructions. You should, of course, substitute the proper driver file name.

Options

When loaded as a module the following variables may be set:
name type description
debug int The debug message level, 0 (no messages) to 6 (wordy). The default is 1.
options int[] The media type override and card operation settings.
The only valid edia type override is '1' for 10base2/BNC. All other non-zero options are undefined (ref. v1.07).
full_duplex int[] Specify that this chip should always be used in FD mode. (For use only with old, non-negotiating switches.)
rx_copybreak int The packet size below which the incoming packet should should be copied to a correctly sized buffer instead of being processed in a "zero-copy" full-sized buffer.
max_interrupt_work int Maximum number of events to handle at each interrupt.

An example of loading the module is

	insmod epic100.o debug=1 full_duplex=0,1
This sets the debug message level to minimal messages, sets the first card to the auto-sense the media type, and the second to full-duplex. (Note: The card ordering is set by the motherboard's PCI BIOS, generally by slot position.)

Valid Media Types

The media types that may be specified with v1.07 and later are:
index media
0 Default -- MII Autonegotiate/Auto-select
1 10base2
2 AUI
3 100baseTx (non autonegotiate)
4 10baseT-FD (non autonegotiate)
5 100baseTx-FD (non autonegotiate)
Note that the default setting will not autoselect to a 10base2 or AUI transceiver. To use 10base2 you must explicitly specify media type '1'.

Driver Status

The hardware multicast filter in the early (current?) chips has a flaw, so the driver always puts the chip into Rx-all-multicast mode and uses the software filter. Few environments use multicast so this is rarely an issue.

Interpreting Status and Error Messages

The Transmit Status register indicates the following events:
0x1F00 Number of collisions, more than 15 means Tx aborted.
0x0040 An Out-of-window collision occured.
0x0020 Collision detect heartbeat -- always 0 in full-duplex mode.
0x0010 Transmitter underrun
0x0008 Carrier sense lost -- always 0 in full-duplex mode
0x0004 Transmitted with at least one collision
0x0002 Transmitted without deferring.
0x0001 Tx completed normally.

Support

Support for the EPIC driver is handled through the mailing lists linux-epic-announce@beowulf.org for news and general information, and linux-epic@beowulf.org for bug reports and problems.

To subscribe to a list, send a message with the contents "subscribe" e.g.:

echo subscribe | /bin/mail linux-epic-announce-request@beowulf.org to get on the low-volume information list, and echo subscribe | /bin/mail linux-epic-request@beowulf.org if you want to know more about bugs and driver development.

Archives of these mailing list answer contain answers to the common questions.

linux-epic-annouce archive.

linux-epic archive.

Diagnotic programs

All fully supported chips have a specific diagnostic program. These programs examine the device registers, EEPROM values, and MII transceiver management registers - external connections that are likely to fail or be misconfigured. A few run tests of internal functionality, but on-chip subsystems rarely fail.

The diagnostic programs are described at http://www.scyld.com/diag/index.html and source and binary packages are available from ftp://ftp.scyld.com/pub/diag/*

Errata

The boards with 100baseFx transceivers have a reported issue with media selection.

Modification History

v0.02 of 5/27/97
Added fixes from Ken Yamaguchi ( gooch@EECS.Berkeley.EDU):
  • Deleted double allocation of dev->priv structure.
  • Moved chip soft reset to after the IRQ allocation.
  • Set undocumented register at offset 0x1C (why?).
  • Initialized Tx ring next pointers once in init_ring() rather than with each Tx packet.
  • Inverted sense of the Tx status error summary bit.
  • Ignore Rx status error summary bit.
v0.03 of 5/28/97
Added a fix from Ken Yamaguchi ( gooch@EECS.Berkeley.EDU):
  • Chip reset must use 0x0001 rather than 0x4001.
v0.04 (unreleased).
Added 2.1.* kernel support.
v0.05 of 8/13/97
Worked-around full-duplex mode problems by using the full_duplex[] option.
v0.06 of 8/15/97
Detected full-duplex mode by adding MII detection and register read code.
v0.07 of 8/29/97
Fixed failure to detect transceivers at cold-boot.
v0.08 of 9/11/97
Moved 'full_duplex[]' definition so that the driver compiles as a built-in. (Hubert Mantel)
Simplified the kmalloc() call to remove an Alpha portability bug. (Richard Henderson )
Disabled the multicast filter code. The current chip has a bug, and my filter calculations might be wrong.
v0.09 of 10/11/97
Added tunable parameters, including max_interrupt_work, to the top of the source file.
Fixed multiple detections of a single card when the driver is built-in.
v0.10 of 10/14/97
Fixed typos(!) in v0.09.
Added rx_copybreak as a module variable.
Added 2.1.57 MODULE_PARAM() support.
Fixed an Alpha short vs. int bug.
v1.01 of 8/4/98
Complete chip reset when a PCI bus error occurs.
Support for the Ositech CardBus card. Fixed other details of the 83c175 support.
Increased the Tx FIFO threshold from 128 to 256 bytes, and added a fall-back to store-and-forward mode if a FIFO underrun occurs.
Added more support for 2.1.* development kernels, and removed support for the 1.3.* kernels.
Added KERN_* to the driver messages.
Converted to using the common PCI probe routine.
Check MII PHYs starting at address 1 to avoid the broken TDK xcvr problem.
Restructured the receive routine to handle low-memory conditions better.
Added ioctl() support for the MII transceiver. Use 'mii-diag' to read and set the media negotiation.
v1.02 of 8/5/98
Found the real "PCI Data Parity Error". The '170 chip manual is wrong. That bit is really "Rx Early Threshold Crossed", just like on the '175. Compounding the problem, the Rx threshold value register is broken. The solution is to always ignore that interrupt bit.
Fixed the media monitor timer to set FD when needed.
v1.03 of 8/7/98
Fixed 2.1.100+ support.
Restart autonegotiation at startup if the link is not established: needed for brain-damaged TDK transceiver.
Handle a missing chip during interrupt more gracefully (we may get a final bogus interrupt for hot-swap PCI and CardBus).
Added detection code for the Intel SMP simultaneous interrupt entry bug.
v1.04 of 8/23/98
Converted to use "boilerplate" PCI probe code.
Additional check for bogus CardBus configuration.
v1.05 of 2/10/99
Added 2.2.0 kernel support, with Tx/Rx byte counts.
Added 10base2 support (non-autosensing).
v1.06 of 2/10/99
Make low receive buffer operation more robust.
Added a transceiver reset needed for the Ositech Cardbus design.
Added TxEmpty as an interrupt source. Transmit statistics are now always current, in exchange for in slightly more overhead with a light network load.
Raised the default value of max_interrupt_work to 32.
v1.09 4/08/2000
Updated to match the v2.00 driver outline, and updated the support web page URL.

EPIC Multicast Support

The EPIC chips can match a single unicast address (their own station address) and support a 64 slot statistical (aka hash) filter for initial filtering of unwanted multicast packets. This is done in a manner compatible with the DP8390: taking the CRC intermediate result just after destination address arrives, and using six bits as the index into a table of which multicast packets are acceptable.

The current revision of the chip appears to have a flaw in the internal filter calculation which results in all multicast packets hashing to the same address. The current work-around is to always enable Rx-all-multicast mode when any multicast address is filtered.

Some history...

This driver was originally written by Donald Becker while he was at CESDIS, located at the NASA Goddard Space Flight Center in Greenbelt MD.


Scyld Computing Corporation
Author:Donald Becker, becker@scyld.com

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.