Installation Notes Broadcom bnx2 Linux Driver Version 1.4.36b 01/19/2006 Broadcom Corporation 16215 Alton Parkway, Irvine, CA 92619-7013 Copyright (c) 2004, 2005, 2006 Broadcom Corporation All rights reserved Table of Contents ================= Introduction Limitations Packaging Installing Source RPM Package Building Driver From TAR File Driver Dependencies Driver Settings Driver Parameters Driver Defaults Unloading and Removing Driver Driver Messages Introduction ============ This file describes the bnx2 Linux driver for the Broadcom NetXtreme II BCM5706/BCM5708 10/100/1000/2500 Mbps PCI/PCI-X Ethernet Network Controller. Limitations =========== The current version of the driver has been tested on 2.4.x kernels starting from 2.4.24 and all 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 some other architectures. Minor changes to some source files and Makefile may be needed on some kernels. Packaging ========= The driver is released in two packaging formats: source RPM and compressed tar formats. The file names for the two packages are bnx2-.src.rpm and bnx2-.tar.gz respectively. Identical source files to build the driver are included in both packages. Installing Source RPM Package ============================= The following are general guidelines for installing the driver. 1. Install the source RPM package: rpm -ivh bnx2-.src.rpm 2. CD to the RPM path and build the binary driver for your kernel: cd /usr/src/{redhat,OpenLinux,turbo,packages,rpm ..} rpm -bb SPECS/bnx2.spec or rpmbuild -bb SPECS/bnx2.spec (for RPM version 4.x.x) Note that the RPM path is different for different Linux distributions. 3. Install the newly built package (driver and man page): rpm -ivh RPMS/i386/bnx2-.i386.rpm The driver will be installed in the following path: 2.4.x kernels: /lib/modules//kernel/drivers/net/bnx2.o 2.6.0 kernels: /lib/modules//kernel/drivers/net/bnx2.ko 4. Load the driver: insmod bnx2.o or insmod bnx2.ko (on 2.6.x kernels) or modprobe bnx2 5. To configure network protocol and address, refer to various Linux documentations. Building Driver From TAR File ============================= The following are general guidelines for installing the driver. 1. Create a directory and extract the files: tar xvzf bnx2-.tar.gz 2. Build the driver bnx2.o (or bnx2.ko) as a loadable module for the running kernel: cd src make 3. Test the driver by loading it: insmod bnx2.o or insmod bnx2.ko (on 2.6.x kernels) or insmod bnx2 4. Install the driver and man page: make install See RPM instructions above for the location of the installed driver. 5. To configure network protocol and address, refer to various Linux documentations. Driver Dependencies =================== The driver uses library functions in the crc32 library. On most kernels, the crc32 library is already built into the kernel. On some kernels, it may be necessary to load the crc32 module before the driver or an unresolved symbol error will appear. Using modprobe will resolve the dependencies automatically. In rare cases where the crc32 library is not enabled in the kernel, it will be necessary to compile the kernel again with the crc32 library enabled. Driver Settings =============== Driver settings can be queried and changed using ethtool. The latest ethtool can be downloaded from http://sourceforge.net/projects/gkernel if it is not already installed. The following are some common examples on how to use ethtool. See the ethtool man page for more information. ethtool settings do not persist across 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. 1. Show current speed, duplex, and link status: ethtool eth0 2. Change speed, duplex, autoneg: Example: 100Mbps half duplex, no autonegotiation: ethtool -s eth0 speed 100 duplex half autoneg off Example: Autonegotiation with full advertisement: ethtool -s eth0 autoneg on Example: Autonegotiation with 100Mbps full duplex advertisement only: ethtool -s eth0 speed 100 duplex full autoneg on 3. Show flow control settings: ethtool -a eth0 4. Change flow control settings: Example: Turn off flow control ethtool -A eth0 autoneg off rx off tx off Example: Turn flow control autonegotiation on with tx and rx advertisement: ethtool -A eth0 autoneg on rx on tx on Note that this is only valid if speed is set to autonegotiation. 5. Show offload settings: ethtool -k eth0 6. Change offload settings: Example: Turn off TSO (TCP segmentation offload) ethtool -K eth0 tso off 7. Get statistics: ethtool -S eth0 8. Perform self-test: ethtool -t eth0 Note that the interface (eth0) must be up to do all tests. 9. See ethtool man page for more options. Module Parameters ================= One optional parameter "disable_msi" can be supplied as a command line argument to the insmod or modprobe command. This parameter is used to disable Message Signaled Interrupts (MSI) and the parameter is only valid on 2.6 kernels that support MSI. On 2.4 kernels, this parameter cannot be used. By default, the driver will enable MSI if it is supported by the kernel. It will run an interrupt test during initialization to determine if MSI is working. If the test passes, the driver will enable MSI. Otherwise, it will use legacy INTx mode. Set the "disable_msi" parameter to 1 as shown below to always disable MSI on all NetXtreme II NICs in the system. insmod bnx2.ko disable_msi=1 or modprobe bnx2 disable_msi=1 The parameter can also be set in modprobe.conf. See the man page for more information. Driver Defaults =============== Speed : Autonegotiation with all speeds advertised Flow control : Autonegotiation with rx and tx advertised MTU : 1500 (range 46 - 9000) Rx Ring Size : 100 (range 0 - 4080) Tx Ring Size : 255 (range (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 usecs : 18 (range 0 - 1023) Coalesce rx usecs irq : 18 (range 0 - 1023) Coalesce rx frames : 6 (range 0 - 255) Coalesce rx frames irq : 6 (range 0 - 255) Coalesce tx usecs : 80 (range 0 - 1023) Coalesce tx usecs irq : 80 (range 0 - 1023) Coalesce tx frames : 20 (range 0 - 255) Coalesce tx frames irq : 20 (range 0 - 255) Coalesce stats usecs : 999936 (aprox. 1 sec.) (range 0 - 16776960 in 256 increments) MSI : Enabled (if supported by 2.6 kernel and interrupt test passes) Unloading and Removing Driver ============================= To unload the driver, use ifconfig to bring down all eth# interfaces opened by the driver, then do the following: rmmod bnx2 Note that on 2.6 kernels, it is not necessary to bring down the eth# interfaces before unloading the driver module. If the driver was installed using rpm, do the following to remove it: rpm -e bnx2 If the driver was installed using make install from the tar file, the driver bnx2.o (or bnx2.ko) has to be manually deleted from the system. Refer to the section "Installing Source RPM Package" for the location of the installed driver. Driver Messages =============== The following are the most common sample messages that may be logged in the file /var/log/messages. Use dmesg -n to control the level at which messages will appear on the console. Most systems are set to level 6 by default. To see all messages, set the level higher. Driver signon: ------------- Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v1.1.3 (Jan. 13, 2005) NIC detected: ------------ eth0: Broadcom NetXtreme II BCM5706 1000Base-T (A2) PCI 64-bit 66MHz found at mem f6000000, IRQ 16, node addr 0010180476ae MSI enabled successfully: ------------------------ bnx2: eth0: using MSI Link up and speed indication: ---------------------------- bnx2: eth0 NIC Link is Up, 1000 Mbps full duplex, receive & transmit flow control ON Link down indication: -------------------- bnx2: eth0 NIC Link is Down