This driver was written to support the Beowulf cluster project at CESDIS.
For Beowulf-specific information, read the
Beowulf project description.

This driver is for the RealTek 8129 and 8139 chips only. The 8019 and
8029 chips are unrelated designs. They are PCI NE2000 clones, and are
supported by updates to the NE2000 driver available from the Linux PCI NE2000 update page.

Usage instructions

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

To subscribe or unsubscribe to a list, send a message with the contents
"subscribe" (or "unsubscribe") to the
list name with an appended "-request" e.g.:

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

Diagnotic program

Two diagnostic programs are available, mii-diag and
rtl8139-diag. Full documentation is available from the Network Adapter Diagnostic page.

The MII diagnostic program allows
examining the link status and configuring the transceiver.

The RTL8139-specific diagnostic
program is used to examine the device registers, EEPROM values, and MII
transceiver management registers. The command for compiling this program is
at the bottom of the source file. This program may optionally be compiled
with an additional MII register diagnostic
library by using the following compile command:

cc -o rtl8139-diag -O -DLIBMII rtl8139-diag.c libmii.c

Driver Operation and Comments

The RTL8129 series is a low-cost design, and thus should be
considered a "connectivity solution" rather a performance-oriented product.

The RTL8139 series improves on the integration and feature set, adding
advanced features such as 802.3x Flow Control and incorporating the
transceiver onto a single chip. The data transfer engine remains the same,
with much improved PCI burst performance in the B and C versions.

While the chip is a bus master, it's not a descriptor-based bus master.
The receive side transfers packets into a single linear ring (compile-time
selectable as 8KB, 16KB, 32KB or 64KB) in host memory. The driver
immediately copies the packets from the ring to newly-allocated buffers
("skbuffs"). Most other Fast Ethernet designs use a descriptor-based
architecture, which allows packets the chip to transfer directly into
pre-allocated maximum-sized skbuffs. The driver then optionally copies only
tiny packets into smaller-sized skbuffs.

On the transmit side four register sets hold the address and size of the
packets to be transmitted. While this results in a rather small, fixed-size
transmit queue, four entries is adequate for full performance in most
environments.

The transmit performance loss comes from an initially undocumented (yes,
that means it took many hours to find) word-alignment requirement of the
current chip. Linux cache-aligns the IP header and following payload data
when constructing a packet. When the 14 byte Ethernet header is prepended,
the complete packet is 2-byte aligned, but not 4-byte aligned. The result
is that all IP packets must be copied to an alignment buffer before being
queued for transmit.

RTL8129/RTL8139 Multicast Support

The RTL 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 filter functionality appears
to be implemented the "usual" way: 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.

Compatibility, Errata and Bugs

The driver has been tested with

Chip: both the 8129, 8139 and 8139A chips (limited 8139B testing.

Kernels: 2.0.30/RedHat-4.2 and many later kernels.

Architectures: x86 and Alpha (limited PowerPC testing).

but not with all combinations of each.

If you encounter Rx overflow errors and transmit timeouts you may
have the card in a non-bus-master slot. Other possible problems are older
PCI implementations, especially i486-class motherboards, that have bugs when
using long PCI burst transfers.

Cards using RTL8139 chips

There are too many vendors selling RTL8139 boards to list them all.
The RTL8139 and RTL8139A chips have the ability to load a different PCI
Vendor and Device ID from the EEPROM. Combined with a unique chip label,
some boards give the appearance of being new and unique chips. Identified
chips that fall into this category are