Linux Network Driver Updates for Kernels 1.2.0 through 2.4

This update contains two components:

  • A major update of most of the PCI network drivers
  • A device scan layer (See pci-scan-doc.html or pci-scan.txt) that allows a single driver to support PCI, hot-swap-PCI and CardBus hardware.

The source files are best installed by using the source RPM:
ftp://ftp.scyld.com/pub/network/netdriver-2.0.src.rpm

Installing the new drivers using the RPM

Use the following commands to install and test the driver pack:

# Transfer the Scyld PCI Netdriver package rpm -i ftp://ftp.scyld.com/pub/network/netdriver-2.0.src.rpm # Build the binary version for your kernel cd /usr/src/{redhat,TurboLinux}/ rpm -bb SPECS/netdriver.spec # Now install it your newly built package. rpm -i --force RPMS/i386/netdriver-2.0-*.i386.rpm

The --force option is needed because the new drivers may conflict with the existing drivers installed by the kernel package.


Installing Individual Drivers

Drivers may be updated individually by following the directions in http://scyld.com/expert/modules.html. You will need the following:

Using the driver update with CardBus

The new driver structure is designed for in-kernel support of CardBus and hot-swap-PCI. The in-kernel implementation in the 2.3.* kernel is still unreliable, and few hot-swap PCI implementations exists, so most users will using the PCMCIA package from David Hinds with CardBus adapters. (Ref. ftp://sourceforge.org/pcmcia/*)

Using the new drivers with the existing PCMCIA package requires the PCI driver management module, pci-scan.c, and a CardBus-specific shim module named cb_shim.c.

These new modules, along with the drivers, should be compiled using the Makefile and the resulting *.o files installed in /lib/modules/'uname -r'/pcmcia/ with the make install. The following configuration lines should be added to /etc/pcmcia/config.opts and the PCMCIA system restarted with the new configuration.

# An updated list of Tulip-based cards. device "tulip" class "network" module "cb_enabler", "pci-scan", "cb_shim", "tulip" card "Linksys EtherFast 10/100" manfid 0x0149, 0x0231 bind "tulip" card "Compex Linkport TX" manfid 0x8a01, 0x0100 bind "tulip" card "Ambicom AMB8100 10/100 Ethernet" manfid 0x9513, 0x0081 bind "tulip" card "Xircom CBE-10/1000" manfid 0x0105, 0x0101 bind "tulip" card "SMC EZ CardBus 10/100 Ethernet" manfid 0x01bf, 0x2225 bind "tulip" card "UMAX Technologies UMAX250" manfid 0x9513, 0x0081 bind "tulip" card "Kingston KNE-CB4TX" manfid 0x0186, 0x0101 bind "tulip" card "IBM 10/100 EtherJet CardBus" manfid 0x00a4, 0x0113 bind "tulip" card "Accton EN2227 (ADMtek Centaur)" manfid 0x01bf, 0x2227 bind "tulip" # SMSC EPIC cards device "epic100" class "network" module "cb_enabler", "pci-scan", "cb_shim", "epic100" card "Trumpcard:7oS Ethernet" manfid 0x0140, 0x0011 bind "epic100" card "Trumpcard:JoS Ethernet" manfid 0x0140, 0x000F bind "epic100" to 0, "serial_cb" to 1 card "SMSC LAN EPIC" manfid 0x0108, 0xe104 bind "epic100" card "SMSC LAN EPIC + Modem" manfid 0x0108, 0xe302 bind "epic100" to 0, "serial_cb" to 1 # A new (July 99) chip from RealTek device "realtek_cb" class "network" module "cb_enabler", "pci-scan", "cb_shim", "rtl8139" card "Ambicom RTL8139B" manfid 0x0101, 0x8139 bind "rtl8139" card "Realtek RTL8139B" manfid 0x0000, 0x024c bind "rtl8139" # The few Intel eepro100 designs. device "eepro100" class "network" module "cb_enabler", "pci-scan", "cb_shim", "eepro100" card "Intel Pro/100 CardBus" manfid 0x0089, 0x0103 bind "eepro100" device "firewire" class "ieee1394" module "cb_enabler", "pci-scan", "cb_shim", "firewire"

Discussion of the new driver structure

From the casual user perspective, the change to the new PCI scan code only adds complexity. Instead of each driver being a single self-contained file, you must now deal with two new header files, kern_compat.h and pci-scan.h, and a support module, pci-scan.c. For CardBus or hot-swap-PCI use an additional shim module, named cb_shim.c for CardBus, is used to enable translate power management and removal events.

The benefits of the new driver generation are subtle

  • PCI scans, previously duplicated in each driver, are now done by a more sophisticated routine in pci-scan.c. The PCI bus and associated "resource" (IRQ and bus address mapping) management has been the target of frequent interface changes. Especially with the over-engineered and pointlessly complex restructuring in 2.3.13, it was being increasingly difficult to update, test and requalify drivers. This scan code, while primarily intended to extract common code, also removes many of the kernel version dependencies.
  • The new PCI scan utility is table based, which concentrates the card detection information and makes it trivial to add support for new device IDs. OEM devices that are customized with unique PCI ID numbers require only an additional table entry, with little source and binary size impact.
  • Drivers now natively support CardBus and hot-swap PCI, rather than having to be compiled explicitly to support either PCI or CardBus.
  • ACPI power state utilities are available, with activation to ACPI D0 state by default.
  • Despite the name, the utility routines in pci-scan.c work with all classes of PCI and CardBus devices, not just network cards.
  • Driver source code is smaller and more readable by having the kernel version compatibility issues migrated to a header file, kern_compat.h.
  • For performance reasons most drivers (exceptions: ne2k-pci and via-rhine, which have boards types with no memory space mapping) now use PCI memory space access instead of I/O space. The diagnostic routines continue to use I/O space access.
    http://www.scyld.com/diag/index.html
    ftp://ftp.scyld.com/pub/diag/

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.