Linux Drivers for PCI Ethernet Chips
This page contains information on using Linux with various PCI Ethernet Controllers.
The master copy of this page resides on the Scyld web server. These drivers are maintained in support of the Scyld Beowulf cluster system.
Introduction
This page is a catch-all for drivers that are don't have their own page. Don't feel less-than-special: it's a good thing when a driver doesn't require unique usage notes!
The chips/drivers supported by this page are:
Driver name | Chip name | Adapter notes |
myson803.c | Myson 800 series, mtd803 and mtd891. | Asound. |
ns820.c | National Semiconductor DP83820 series. | Various low-cost gigabit Ethernet adapters. |
natsemi.c | National Semiconductor DP83815. | Netgear FA311, FA312. |
starfire.c | Adaptec DuraLAN (AKA "Starfire") | Adaptec 64 bit adapters. |
sundance.c | Sundance ST201 "Alta" chip, | D-Link DFE-550 |
via-rhine.c | VIA Rhine and Rhine-II | D-Link DFE-530-TX |
winbond-840.c | Winbond w89c840 | Compex RL100ATX-PCI, many others |
winbond-841.c | Winbond w89c841 | Unreleased. (As of July 2002, we are still waiting for production hardware and revised datasheets.) |
- The VIA Rhine and Rhine-II chips, via-rhine.c. This chip is used on many OEM boards. The most common branded implementation is the D-Link DFE530-TX. (Note: the DFE530-TX+ uses a RTL8139B chip.) You will need a driver with version 1.07 or higher if you have a VT6102 Rhine-II chip with PCI device ID 3065.
- The Winbond w89c840, winbond-840.c. This chip is used on low-end OEM boards. The Compex RL100ATX-PCI board uses a relabeled version of this chip. Note that the w89c841 has a different register layout and will use a different driver.
- The Adaptec DuraLAN (AKA "Starfire") chip, starfire.c. The DuraLAN chip is used on the new 64 bit PCI boards from Adaptec e.g. the ANA-6922A. The older 32 bit boards use the tulip driver.
- The Sundance ST201 "Alta" chip, sundance.c. The Sundance Alta chip is used on OEM boards and the D-Link DFE-550. It uses bus-master transfers, can transmit from and receive into arbitrarily aligned buffers, and has a 64 element multicast hash. All chip versions have flow control and ACPI power states (PCI power management).
- The National Semiconductor 83815 chip, natsemi.c. This chip is used on the Netgear FA-311.
- The National Semiconductor 83820/83821 chips, ns820.c. They use bus-master transfers, can transmit from arbitrarily aligned buffers but receive only into longword-aligned buffers, and have a 512 element multicast hash filter. All chip versions have flow control, Wake-On-LAN, and ACPI power states (PCI power management).
- The Myson mtd803 chip, myson803.c. The Myson Fast Ethernet (mtd803) and Gigabit Ethernet (mtd891) chips are used on low-end OEM boards. They use bus-master transfers, can transmit from arbitrarily aligned buffers but receive only into longword-aligned buffers, and have a 64 element multicast hash filter. All chip versions have flow control, Wake-On-LAN, and ACPI power states (PCI power management).
Usage instructions
Installation
The driver installation directions are on the Driver Updates page. You may install just one driver (see below), or install all updated drivers using either the netdriver.tgz file or the SRPM. Installing the complete driver set is usually the simplest approach.
Read the Network Drivers as Modules page for instructions on installing drivers individually. You should, of course, substitute the proper driver file name.
You will need to build pci-scan.o along with the specific driver.o file. You must download pci-scan.c, pci-scan.h, and kern_compat.h.
Module Settings
No driver configuration is needed for normal Ethernet environments. The following settings are for special cases only.
When loaded as a module the following variables may be set:
name | type | description |
debug | int | The debug message level, 0 (no messages) to 7 (wordy). The default is 1. |
options | int[] | The media type override and card operation settings. 0x10 Forced 10baseT half duplex. 0x20 Forced 10baseT full duplex. 0x100 Forced 100baseTx half duplex. 0x200 Forced 100baseTx full duplex. Note that these values must have a leading "0x". |
full_duplex | int[] | Specify that this chip should always be used in FD mode. This option should only be used when the link partner is an old, non-negotiating switch also set to forced-full-duplex mode. |
rx_copybreak | int | The packet size below which the incoming packet should should be copied to a minimally-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. |
multicast_filter_limit | int | Maximum number of multicast addresses before switching to receiving a multicast packets. |
Where there are multiple interfaces the options and full_duplexsettings may be individually initialized with a comma separated list of values. Other settings use the same value for all interfaces handled by the driver.
In most cases no transceiver override option need be set. A notable exception is when connecting to an older ethernet switch that operates in full-duplex mode but does not do NWay autonegotation. The following driver options values are recognized:
Option value | Transceiver setting |
0x10 | Forced 10baseT half duplex. |
0x20 | Forced 10baseT full duplex. |
0x100 | Forced 100baseTx half duplex. |
0x200 | Forced 100baseTx full duplex. |
The rx_copybreak setting requires some explaination. When using Ethernet adapters that don't receive into arbitrarily aligned receive buffers with very word-oriented processor architectures e.g. Alpha AXP and IA-64, performance may be improved by setting this to 1518. This causes an extra copy, but may improve performance by copy-aligning the packet header. In general the default value is selected to be resonable for typical use.
The multicast_filter_limit setting is used by the driver to switch between using the NIC's hardware multicast filter, or relying entirely on the software filter. The default value is appropriate for most environments. Special cases that require changing the setting are
- A flawed hardware implementation that is worked around by using Rx-all-multicast mode.
- Having many multicast addresses in a rarely changed filter list may indicate that the value should be increased.
- Having a very rapidly changing filter list may indicate that the value should be decreased.
Run-time Configuration
Most 10/100 drivers provide a interface to the Media Independent Interface, "MII" configuration and diagnostic settings. This interface allows the media type (i.e. 10Mbps or 100Mbps, half or full duplex) to be configured. The settings are usually configured by the mii-diag program, which has broader functionality than the name implies. The details of this program may found on the diagnostic home page.
Support
The drivers are supported by both a bugzilla page and mailing lists at http://www.scyld.com/mailman/listinfo.
Currently only the Realtek driver has its own mailing lists. As other drivers require additional support, they will get their own mailing list.
Diagnostic 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 mis-configured. 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
Source and binary packages are available from
ftp://ftp.scyld.com/pub/diag/*
Errata
Via Rhine
The commonly available driver emits messages of the form "Something Wicked happened!" for common error cases. These are still errors, but subsequent driver versions have been changed to only increment the error counts at the default message level.
The meaning of the error status number is as follows.
Error bits | Meaning | Explanation |
2000 | Tx aborted | Either excessive collisions or no link beat. |
0040 | PCI Bus Error | A serious, perhaps unrecoverable error . |
0010 | Transmit FIFO underrun | The PCI bus is slow or busy. |
0008 | Transmit error | Transmit aborted because of excessive collisions. |
These error indications are usually combined with other common status bits.
Winbond 840
The current revision of the Winbond 840 appears to have a horribly broken transmit queue. Only 2048 bytes can be allowed into the transmit queue at a time. While the driver has been restructured to reduce the impact of this bug, the Winbond chip will have a higher interrupt rate and often lower transmit throughput than other chips.
Adaptec Starfire AKA "DuraLAN"
Adaptec prefers this series to be known as the DuraLAN. As the documentation and driver are updated I'm adding "DuraLAN" to the naming. Be careful what you wish for -- eventually I may rename the driver from starfire.c to not-starfire.c ;-).
The driver emits messages of the form "Something Wicked happened!" for common error cases. The meaning of the error status number is as follows.
Error bits | Name | Explanation |
0x.2000000 | An abnormal event (AKA "error") occurred. | |
0x....0010 | TxLowPrMismatchInt | A Tx transmit buffer contained invalid data. |
0x....0001 | Interrupt indication | Always set during interrupt. |
NatSemi DP83815 Driver
The driver emits messages of the form "Something Wicked happened!" for very rare error cases. The meaning of the error status value is in the following table. Note that the error status values below have extra spaces for readability.
Error bits | Meaning | Explanation |
0080 0000 | PCI parity error | PCI bus parity error |
0040 0000 | PCI system error | PCI bus timing error |
0020 0000 | PCI master abort | The NIC has received a target abort while operating as a bus master. |
0010 0000 | PCI target abort | The NIC has received a target abort while operating as a bus master. |
0000 0400 | Transmit FIFO underrun | The PCI bus is slow or busy. |
Note that driver versions before v1.07, including the driver in the 2.4 kernel, do not have adaptive Tx theshold setting. A transmit FIFO error will causes the transmitter to stop.
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.