Back to Contents Page

Linux Driver Software: Broadcom NetXtreme II™ Network Adapter User Guide

Limitations

Packaging

Installing Linux Driver Software

Unloading/Removing the Linux Driver

Patching PCI Files (Optional)

Network Installations

Setting Values for Optional Properties

Driver Defaults

Driver Messages

Teaming with Channel Bonding

Statistics

Limitations

The current version of the Linux driver has been tested on 2.4.x kernels (starting from 2.4.24) and 2.6.x kernels. The driver may not compile on kernels older than 2.4.24. Testing is concentrated on i386 and x86_64 architectures. Only limited testing has been done on other architectures. Minor changes to some source files and Makefile may be needed on some kernels.

NOTE: Support for the 2.4.21 kernels is provided in Red Hat Enterprise Linux 3.

Packaging

The Linux driver is released in the following packaging formats (file names):

Identical source files to build the driver are included in both RPM and TAR source packages. The supplemental tar file contains additional utilities such as patches and driver diskette images for network installation.

Installing Linux Driver Software

Installing the Source RPM Package

Building the Driver from the Source TAR File

Unloading/Removing the Linux Driver

NOTE: If a bnx2 driver is loaded and the Linux kernel is updated, the bnx2 driver module must be recompiled if the driver module was installed using the source RPM or the TAR package.

Installing the Source RPM Package

  1. Install the source RPM package:
  2. rpm -ivh bnx2-version.src.rpm
    
  3. Change the directory to the RPM path and build the binary driver for your kernel (the RPM path is different for different Linux distributions):
  4. cd /usr/src/redhat,OpenLinux,turbo,packages,rpm ...
    
    rpm -bb SPECS/bnx2.spec
    
    rpmbuild -bb SPECS/bnx2.spec (for RPM version 4.x.x)
    

    NOTE: During your attempt to install a source RPM package, the following message may be displayed:

    error: cannot create %sourcedir /usr/src/redhat/SOURCES

    The most likely cause of the error is that the rpm-build package has not been installed. Locate the rpm-build package on the Linux installation media and install it using the following command:

    rpm -ivh rpm-build-version.arch.rpm

    Complete the installation of the source RPM.

  5. Install the newly built package (driver and man page):
  6. rpm -ivh RPMS/i386/bnx2-version.arch.rpm
    

    The --force option is needed if installing over an existing distribution that may already contain an older version of the driver.

    Depending on the kernel, the driver is installed to one of the following paths:

    2.4.x kernels:

    /lib/modules/kernel_version/kernel/drivers/net/bnx2.o
    

    2.6.x kernels:

    /lib/modules/kernel_version/kernel/drivers/net/bnx2.ko
    
  7. Load the driver:
  8. insmod bnx2
    

    or

    modprobe bnx2 
    

To configure the network protocol and address, refer to the documentation provided with your operating system.

Building the Driver from the Source TAR File

  1. Create a directory and extract the TAR files to the directory:
  2. tar xvzf bnx2-version.tar.gz
    
  3. Build the driver bnx2.o as a loadable module for the running kernel:
  4. cd bnx2-version/src
    make
  5. Test the driver by loading it:
  6. insmod bnx2.o
    
    or, for Linux 2.6 kernels:
    
    insmod bnx2.ko
    

    No message should be returned if this command runs properly

  7. Install the driver and man page:
  8. make install
    

    NOTE: See the RPM instructions above for the location of the installed driver.

  9. To configure network protocol and address, refer to the manuals supplied with your operating system.

Unloading/Removing the Linux Driver

Unloading/Removing the Driver from an RPM Installation

Removing the Driver from a TAR Installation

Unloading/Removing the Driver from an RPM Installation

To unload the driver, use ifconfig to bring down all eth# interfaces opened by the driver, and then type the following:

rmmod bnx2

If the driver was installed using rpm, do the following to remove it:

rpm -e bnx2

Removing the Driver from a TAR Installation

If the driver was installed using make install from the tar file, the bnx2.o or bnx2.ko driver file has to be manually deleted from the operating system. See Installing the Source RPM Package for the location of the installed driver.

Patching PCI Files (Optional)

For hardware detection utilities such as Red Hat kudzu to properly identify bnx2 supported devices, a number of files containing PCI vendor and device information may need to be updated.

Apply the updates by running the scripts provided in the supplemental tar file. For example, on Red Hat Enterprise Linux, apply the updates by doing the following:

./patch_pcitbl.sh  /usr/share/hwdata/pcitable pci.updates 
/usr/share/hwdata/pcitable.new bnx2
./patch_pciids.sh /usr/share/hwdata/pci.ids pci.updates 
/usr/share/hwdata/pci.ids.new

Next, the old files can be backed up and the new files can be renamed for use.

cp /usr/share/hwdata/pci.ids /usr/share/hwdata/old.pci.ids
cp /usr/share/hwdata/pci.ids.new /usr/share/hwdata/pci.ids
cp /usr/share/hwdata/pcitable /usr/share/hwdata/old.pcitable
cp /usr/share/hwdata/pcitable.new /usr/share/hwdata/pcitable

Network Installations

For network installations through NFS, FTP, or HTTP (using a network boot disk or PXE), a driver disk that contains the bnx2 driver may be needed. The driver disk images for the most recent Red Hat and SuSE versions are included. Boot drivers for other Linux versions can be compiled by modifying the Makefile and the make environment. Further information is available from the Red Hat website, http://www.redhat.com.

Setting Values for Optional Properties

The disable_msi optional property can be supplied as a command line argument to the insmod or modprobe command. The property can also be set in modprobe.conf. See the man page for more information. All other driver settings can be queried and changed using the ethtool utility. See the ethtool man page for more information. The ethtool settings do not persist across a reboot or module reload. The ethtool commands can be put in a startup script such as /etc/rc.local to preserve the settings across a reboot.

NOTE: Some combinations of property values may conflict and result in failures. The driver cannot detect all such conflicting combinations.

disable_msi

This property is used to disable Message Signaled Interrupts (MSI), and the property is valid only on 2.6 kernels that support MSI. On 2.4 kernels, this property cannot be used. By default, the driver enables MSI if it is supported by the kernel. It runs an interrupt test during initialization to determine if MSI is working. If the test passes, the driver enables MSI. Otherwise, it uses legacy INTx mode.

1 = Disable Message Signal Interrupts (MSI)
0 = Enable Message Signal Interrupts (MSI) (default)

Driver Defaults

Speed: Autonegotiation with all speeds advertised

Flow Control: Autonegotiation with RX and TX advertised

MTU: 1500 (range is 46–9000)

RX Ring Size: 100 (range is 0–255)

TX Ring Size: 255 (range is (MAX_SKB_FRAGS+1)–255). MAX_SKB_FRAGS varies on different kernels and different architectures. On a 2.6 kernel for x86, MAX_SKB_FRAGS is 18.

Coalesce RX Microseconds: 18 (range is 0–1023)

Coalesce RX Microseconds IRQ: 18 (range is 0–1023)

Coalesce RX Frames: 6 (range is 0–255)

Coalesce RX Frames IRQ: 6 (range is 0–255)

Coalesce TX Microseconds: 80 (range is 0–1023)

Coalesce TX Microseconds IRQ: 80 (range is 0–1023)

Coalesce TX Frames: 20 (range is 0–255)

Coalesce TX Frames IRQ: 20 (range is 0–255)

Coalesce Statistics Microseconds: 999936 (approximately 1 second) (range is 0–16776960 in increments of 256)

MSI: Enabled (if supported by the 2.6 kernel and the interrupt test passes)

Driver Messages

The following are the most common sample messages that may be logged in the /var/log/messages file. Use dmesg -nlevel to control the level at which messages appear on the console. Most systems are set to level 6 by default.

Driver Signon

Broadcom NetXtreme II Gigabit Ethernet Driver 
bnx2 v1.3.19 (May 27, 2005)

NIC Detected

eth#: Broadcom NetXtreme II BCM5708 1000Base-T (B0) 
PCI-X 64-bit 133MHz found at mem f6000000,
IRQ 16, node addr 0010180476ae

Link Up and Speed Indication

bnx2: eth# NIC Link is Up, 1000 Mbps full duplex

Link Down Indication

bnx2: eth# NIC Link is Down

Teaming with Channel Bonding

With the bnx2 driver, you can team adapters together using the bonding kernel module and a channel bonding interface. Information on channel bonding can be found at http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/ref-guide/s1-modules-ethernet.html.

Statistics

Detailed statistics and configuration information can be viewed using the ethtool utility. See the ethtool man page for more information.


Back to Contents Page