This page contains information on using Linux with the Realtek RTL8129 and RTL8139 Fast Ethernet Controllers for PCI. The master copy of this page resides on the CESDIS WWW server.
The Linux driver for the RealTek RTL8129/8139 is available from this web page.
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.
Read the Network Drivers as Modules page for instructions. You should, of course, substitute the "rtl8139.c" as the driver file name.
Programming info:Online information is available at http://www.realtek.com.tw/cn/cn.html
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.:
The most recent testing version may be available from ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/test/rtl8139.c. If this link is invalid, the released version is the most recent publically available driver.
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
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.
The driver has been tested with
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.
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
A few commonly available board with the Realtek chip are: