Scyld

Using PCI NE2000 Cards with Linux

This page contains information on using Linux with PCI NE2000 clones. It includes links to device drivers and solutions to common problems.

Index

Products Supported

The following chips are supported by this driver.

The similarly-numbered RealTek RTL8139, Via "Rhine" 86c100, and Winbond 89c840 chips are unrelated the chips above, and each has its own driver. All of these unrelated chips are 10/100Mbps designs, while all of the chips supported by the ne2k-pci driver are 10Mbps only.

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

Driver Status

The 2.0.35 and later kernels include this driver in the kernel source distribution. You should use the driver version in your Linux distribution unless you need a specific feature in the updated driver, such as full duplex.

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

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.

To install a single updated driver read the Network Drivers as Modules page for instructions. You should, of course, substitute the proper driver file name.

When updating a single driver you will need to build pci-scan.o along with the specific driver.o file. This means that in addition to the driver.c file, you must download pci-scan.c, pci-scan.h, and kern_compat.h.

The driver source code is availabele from ftp://ftp.scyld.com/pub/network/ne2k-pci.c.

Note that the standard '8390.o' module must be loaded before the ne2k-pci.o module is loaded. This can be automated by running depmod -a before loading the ne2k-pci.o module, and using modprobe ne2k-pci to load the driver module.

Possible problems and solutions

If you get an "8390.h no such file or directory" you do not have the kernel source code installed. Note: The 8390.h header file is not part of the "essential header file" set mentioned above.

If you get a "unresolved symbols" error when loading the ne2k-pci.o module, verify that the 8390.o module has been loaded by doing cat /proc/modules or running the lsmod program. (The 8390.o module should be automatically loaded in most distributions after 'depmod -a' is run.)

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).
options int[] The media type override and card operation settings (See media list below.)
full_duplex int[] Force full duplex.

The options[] setting is not currently used.

The NE2000 design does not natively support full duplex. The full_duplex[] setting only has an effect with the RealTek and HolTek chips. It is silently ignored with other chips, e.g. the Winbond chip, as they can not operate in full duplex mode.

An example of loading the driver module is insmod ne2k-pci.o debug=1 This sets the debug message level to minimal messages.

Note that card ordering is set by the motherboard's PCI BIOS, not by the driver.

Background

No document about this hardware can be written without an initial flame: PCI NE2000 clones are a bad idea. The original NE1000 and NE2000 boards were based around a minimal-component evaluation design described in the National Semiconductor LAN databook. That design was never intended to be mass-produced, it was only intended to demonstrate minimal functionality using the fewest, lowest cost external components. In doing so, performance and reliability features were omitted.

The NE2000 design became popular when Novell copied the example design. Novell was primarily a software company, and never intended to get into the hardware business. They merely needed basic network hardware in order to sell their much more profitable software. So they copied the simplest design from the databook, wrote the device driver, and became tremendously successful.

Since the NE1000/NE2000 driver was already built into the Novell software, and no generic driver interface was initially available, hardware companies copied the NE*000 design. Even after a generic driver interface was available, consumers still requested a "NE2000 interface" when they meant "Ethernet" despite superior hardware being available.

This trend has continued to the PCI bus. A NE2000 design makes little sense here. It's less complex to design a better, faster interface but NE2000 clones abound at the low end.

Nonetheless, if you are selecting between the ISA and PCI version, the PCI version is much faster. Most of the supported chips (except the HT80229) can use 32 bit data transfers, and PCI bus transactions are much faster. Arguably 10Mbps Ethernet is slow enough that the extra overhead isn't significant, but it's frustrating to see easily avoided performance loss.

Support

Due to the very low incidence of problems, no ne2k-pci mailing list exists. This driver is very stable, and you should initially assume that any problem is with your configuration. Report verified problems to the linux-kernel@vger.rutgers.edu mailing list.

Diagnotic program

A diagnostic program is available to show the current NIC settings and the persistent configuration in the EEPROM. Read the Diagnostic instruction page for usage information.

Errata

Using the 10base2 or AUI Port

The NE2000 design doesn't define a method for selecting the transceiver used. The driver has no control over the transceiver selection. Most multi-trasceiver boards address this by having only two connections, a 10baseT transceiver and an alternate (10base2 or AUI). The 10baseT transceiver is enabled if link beat is detected, otherwise the alternate transceiver is selected.

The diagnostic problem can read and write the configuration EEPROM on some of the chip types. This permits forcing the media type on a subset of the supported board types.

Compatibility

It takes very little effort for a vendor to make up a name and print a label for an OEM board. Thus it's impractical to list boards by name. Instead I list the supported chip types. You can find the chip type used in your adapter by reading part number from the board itself, or from the output of

cat /proc/pci | more

The detection listing in the driver is

{0x10ec, 0x8029, "RealTek RTL-8029", 0}, {0x1050, 0x0940, "Winbond 89C940", 0}, {0x11f6, 0x1401, "Compex RL2000", 0}, {0x8e2e, 0x3000, "KTI ET32P2", 0}, {0x4a14, 0x5000, "NetVin NV5000SC", 0}, {0x1106, 0x0926, "Via 86C926", ONLY_16BIT_IO}, {0x10bd, 0x0e34, "SureCom NE34", 0}, {0x1050, 0x5a5a, "Winbond W89C940F", 0}, {0x12c3, 0x0058, "Holtek HT80232", ONLY_16BIT_IO | HOLTEK_FDX}, {0x12c3, 0x5598, "Holtek HT80229", ONLY_32BIT_IO | HOLTEK_FDX | STOP_PG_0x60 },

Note: The RTPI NetVin products are actually a Winbond (E2000) or RealTEK (NV5000) chip with a modified PCI Vendor ID loaded from the EEPROM. The PCI Vendor and Product IDs can be loaded from the EEPROM on many chips, but this feature is only used when the vendor wants to be incompatible.

The KTI and Compex RL2000 are also believed to be Winbond or RealTek chips with EEPROM-modified PCI IDs.

The following are URLs to chip datasheets. Some vendors frequently shuffle their websites, so you may have to start at the website root.

Multicast Support

NE2000 clones are based around the "8390" core, named after the original chip number from National Semiconductor. The 8390 core has a 64 entry hash table that is used to statistically filter incoming packets. As a packet arrives an Ethernet adapter computes a "CRC" checksum to verify that it has not been corrupted. The multicast filter works by sampling the CRC just after the destination address has arrived. It uses the top six as an index into the multicast filter table. If the table bit is set, and the packet is a multicast packet, the packet is accepted. If the table bit is not set the packet is rejected.


Linux Network Drivers Page
Linux Network Drivers Updates Page
Diagnostic information
SCYLD information.
Author: Donald Becker, Scyld Computing Corporation
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.