更新网卡驱动

作者: 操作系统  发布:2019-09-06

Redhat 集团版6安装驱动
 
[[email protected] Driver]# tar -xvzf ./tg3-3.116j.tar.gz
tg3-3.116j/
tg3-3.116j/makeflags.sh
tg3-3.116j/ChangeLog
tg3-3.116j/Makefile
tg3-3.116j/tg3_firmware.h
tg3-3.116j/tg3.c
tg3-3.116j/tg3.h
tg3-3.116j/tg3_vmware.c
tg3-3.116j/tg3_compat.h
tg3-3.116j/LICENSE
tg3-3.116j/tg3_compat2.h
tg3-3.116j/tg3.4
tg3-3.116j/tg3_vmware.h
tg3-3.116j/README.TXT
tg3-3.116j/esx_ioctl.h
[[email protected] Driver]# ls
ChangeLog README.TXT tg3-3.116j tg3-3.116j-1.src.rpm tg3-3.116j.tar.gz
[[email protected] Driver]# cd ./tg3-3.116j
[[email protected] tg3-3.116j]# ls
ChangeLog    Makefile      tg3.4          tg3_compat.h    tg3_vmware.c
esx_ioctl.h makeflags.sh tg3.c          tg3_firmware.h tg3_vmware.h
LICENSE      README.TXT    tg3_compat2.h tg3.h
[[email protected] tg3-3.116j]# make
sh makeflags.sh /lib/modules/2.6.32-71.el6.i686/source > tg3_flags.h
make -C /lib/modules/2.6.32-71.el6.i686/build SUBDIRS=/root/Server/Linux/Driver/tg3-3.116j modules
make[1]: Entering directory `/usr/src/kernels/2.6.32-71.el6.i686'
 CC [M] /root/Server/Linux/Driver/tg3-3.116j/tg3.o
 Building modules, stage 2.
 MODPOST 1 modules
 CC      /root/Server/Linux/Driver/tg3-3.116j/tg3.mod.o
 LD [M] /root/Server/Linux/Driver/tg3-3.116j/tg3.ko.unsigned
 NO SIGN [M] /root/Server/Linux/Driver/tg3-3.116j/tg3.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-71.el6.i686'
 
[[email protected] tg3-3.116j]# make KVE纳瓦拉= 2.6.32-71.el6.i686 那步很关键
 
 
[[email protected] 2.6.32-71.el6.i686]# insmod /lib/modules/2.6.32-71.el6.i686/updates/tg3.ko
 
[[email protected] tg3-3.116j]# make install
make -C /lib/modules/2.6.32-71.el6.i686/build SUBDIRS=/root/Server/Linux/Driver/tg3-3.116j modules
make[1]: Entering directory `/usr/src/kernels/2.6.32-71.el6.i686'
 Building modules, stage 2.
 MODPOST 1 modules
make[1]: Leaving directory `/usr/src/kernels/2.6.32-71.el6.i686'
gzip -c tg3.4 > tg3.4.gz
mkdir -p //lib/modules/2.6.32-71.el6.i686/updates;
install -m 444 tg3.ko //lib/modules/2.6.32-71.el6.i686/updates;
install -m 444 tg3.4.gz /usr/share/man/man4;
 
[[email protected] tg3-3.116j]# lsmod | grep tg3 查看模块
tg3                   116521 0
 
上边是内需重新启航NetManager重启服务识别网卡,Redhat ES6 已经远非kudzu的命令了。
 
Redhat 集团版5 安装情势。  

操作系统:CentOS release 5.5 (Final)

Installing Source RPM Package

 
 
The following are general guidelines for installing the driver.    

  1. Install the source RPM package:
     
     
       rpm -ivh tg3-<version>.src.rpm    
  2. CD to the RPM path and build the binary driver for your kernel:
     
     
       cd /usr/src/{redhat,OpenLinux,turbo,packages,rpm ..} 注意哈,CRUISERHEL6上边未有redhat命名的文件夹。
     
     
       rpm -bb SPECS/tg3.spec
     
     
     
     
     
    Note that the RPM path is different for different Linux distributions.
     
     
    The driver will be compiled for the running kernel by default. To build
    the driver for a kernel different than the running one, specify the
    kernel by defining it in KVER:
     
     
       rpmbuild -bb SPECS/tg3.spec --define "KVER <kernel version>"
     
     
    where <kernel version> in the form of 2.x.y-z is the version of another
    kernel that is installed on the system.    
  3. Install the newly built package (driver and man page):
     
     
       rpm -ivh RPMS/<arch>/tg3-<version>.<arch>.rpm
     
     
    <arch> is the architecture of the machine, e.g. i386:
     
     
       rpm -ivh RPMS/i386/tg3-<version>.i386.rpm
    小编“小龙的长空”

集团版6安装驱动 [[email protected] Driver]# tar -xvzf ./tg3-3.116j.tar.gz tg3-3.116j/ tg3-3.116j/makeflags.sh tg3-3.116j/ChangeLog tg3-3.116j/Makefile tg3-3.116j/tg3_fir...

故障现象:网卡无故自动down掉,使用service network restart 重启后没多短期又会自动down , 连接数差十分的少在200个左右,未有arp攻击;

网卡音讯:
[[email protected]~]# cat /var/log/dmesg |grep eth0
eth0: Broadcom NetXtreme II BCM5709 1000Base-T (C0) PCI Express found at mem d6000000, IRQ 90, node addr 842b2bfac367

现阶段网卡驱动:
[[email protected]~]# ethtool -i eth0
driver: bnx2
version: 2.0.2
firmware-version: 5.2.3 NCSI 2.0.10
bus-info: 0000:01:00.0 

下载最新网卡驱动:
 

设置更新驱动:
[[email protected]~]# unzip linux-7.4.27.zip
Archive: linux-7.4.27.zip
creating: Server/Linux/Driver/
inflating: Server/Linux/Driver/INSTALL.TXT
inflating: Server/Linux/Driver/netxtreme2-7.4.27-1.src.rpm
inflating: Server/Linux/Driver/netxtreme2-7.4.27.tar.gz
inflating: Server/Linux/Driver/netxtreme2_sup-7.4.27-1.ISO.tar.gz
inflating: Server/Linux/Driver/README.bnx2.TXT
inflating: Server/Linux/Driver/README.bnx2fc.TXT
inflating: Server/Linux/Driver/README.bnx2i.TXT
inflating: Server/Linux/Driver/README.bnx2x.TXT
inflating: Server/Linux/Driver/RELEASE.bnx2.TXT
inflating: Server/Linux/Driver/RELEASE.bnx2fc.TXT
inflating: Server/Linux/Driver/RELEASE.bnx2i.TXT
inflating: Server/Linux/Driver/RELEASE.bnx2x.TXT
inflating: Server/Linux/Driver/RELEASE.fclibs.TXT

[[email protected]~]# cd Server/Linux/Driver/
[[email protected] Driver]# rpm -ivh netxtreme2-7.4.27-1.src.rpm

重新建构对应系统的rpm包:

[[email protected] Driver]# cd /usr/src/RedHat/SPECS/
[[email protected] SPECS]# rpmbuild -bb netxtreme2.spec

设置新的rmp包:
[[email protected] SPECS]# cd /usr/src/redhat/RPMS/x86_64
[[email protected] x86_64]# rpm -ivh netxtreme2-7.4.27-1.x86_64.rpm

切换网卡驱动:
[[email protected]~]# cat change_driver.sh
rmmod bnx2
rmmod bnx2x
modprobe bnx2

modprobe bnx2x

[[email protected]~]# chmod u+x change_driver.sh

后台推行脚本:

[[email protected]~]# ./change_driver.sh &

只顾:不经常候大概须求重启服务器使服务器系统再一次完全加载新的驱动:

 

 

翻看新的网卡驱动音讯:

[[email protected] ~]# ethtool -i eth0

driver: bnx2
version: 2.2.3f
firmware-version: 6.2.12 bc 5.2.3 NCSI 2.0.11
bus-info: 0000:01:00.0

 

这两天已未有出现活动down的情形。

注意:安装前请紧凑看INSTALL.TXT
如下:
[[email protected] Driver]# cat INSTALL.TXT
Installation Notes
Broadcom NetXtremeII Linux Drivers
09/26/2011

Broadcom Corporation
5300 California Avenue,
Irvine, CA 92617

Copyright (c) 2004 - 2011 Broadcom Corporation
All rights reserved

Table of Contents

Introduction
Limitations
Packaging
Installing Source RPM Package
Building Driver From TAR File
Unloading and Removing Driver

Introduction

This file describes the installation procedures for the following
Broadcom Linux drivers:

- bnx2 driver for the Broadcom NetXtreme II BCM5706/BCM5708/5709/5716
10/100/1000/2500/10000 Mbps PCIX/PCIE Ethernet Network Controller.

- bnx2x driver for the Broadcom NetXtremeII BCM57710/BCM57711/BCM57711E/BCM57712
10/100/1000/2500/10000 Mbps PCIE Ethernet Network Controller.

- cnic driver that supports additional features required by the bnx2i iSCSI
offload driver, and bnx2fc FCoE offload driver.

Limitations

The current versions of the drivers have 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.

Additionally, the Makefile will not compile the cnic driver on kernels
older than 2.6.16. iSCSI offload is only supported on 2.6.16 and newer
kernels. FCoE offload is only supported on 2.6.32 and newer kernels.

Packaging

The driver is released in two packaging formats: source RPM and compressed tar
formats. The file name for the source RPM is:

netxtreme2-<version>.src.rpm

The file name for the tar archive is:
netxtreme2-<version>.tar.gz.

Identical source files to build the drivers are included in both packages.

Following is a list of files included -

a) netxtreme2-<version>.src.rpm - NetXtreme II L2/cnic/bnx2fc/libfc/libfcoe
driver source RPM
b) netxtreme2-<version>.tar.gz - tar zipped NetXtreme II
L2/cnic/bnx2fc/libfc/libfcoe driver source
c) INSTALL.TXT - This file
d) README.<driver>.TXT - driver specific readme instructions,
where driver is bnx2, bnx2x, bnx2i, bnx2fc.
e) RELEASE.<driver>.TXT - release information text providing list of bug fixes
and enhancement for each driver.

Installing Source RPM Package

The following are general guidelines for installing the driver.

  1. Install the source RPM package:

rpm -ivh netxtreme2-<version>.src.rpm

  1. CD to the RPM path and build the binary driver for your kernel:

cd /usr/src/{redhat,OpenLinux,turbo,packages,rpm ..}
(For RHEL 6.0 and above, cd ~/rpmbuild )

rpm -bb SPECS/netxtreme2.spec

or

rpmbuild -bb SPECS/netxtreme2.spec (for RPM version 4.x.x)

Note that the RPM path is different for different Linux distributions.

The driver will be compiled for the running kernel by default. To build
the driver for a kernel different than the running one, specify the
kernel by defining it in KVER:

rpmbuild -bb SPECS/netxtreme2.spec --define "KVER <kernel version>"

where <kernel version> in the form of 2.x.y-z is the version of another
kernel that is installed on the system.

  1. Install the newly built package (driver and man page):

rpm -ivh RPMS/<arch>/netxtreme2-<version>.<arch>.rpm

where <arch> is the machine architecture such as i386:

rpm -ivh RPMS/i386/netxtreme2-<version>.i386.rpm

Note that the --force option may be needed on some Linux distributions
if conflicts are reported.

The drivers will be installed in the following path:

2.4.x kernels:

/lib/modules/<kernel_version>/kernel/drivers/net/bnx2.o
/lib/modules/<kernel_version>/kernel/drivers/net/bnx2x.o

2.6.0 kernels:

/lib/modules/<kernel_version>/kernel/drivers/net/bnx2.ko
/lib/modules/<kernel_version>/kernel/drivers/net/bnx2x.ko

2.6.16 and newer kernels:

/lib/modules/<kernel_version>/kernel/drivers/net/bnx2.ko
/lib/modules/<kernel_version>/kernel/drivers/net/bnx2x.ko
/lib/modules/<kernel_version>/kernel/drivers/net/cnic.ko

Newer RHEL and SLES distros:

/lib/modules/<kernel_version>/updates/bnx2.ko
/lib/modules/<kernel_version>/updates/cnic.ko
/lib/modules/<kernel_version>/updates/bnx2x.ko
/lib/modules/<kernel_version>/updates/bnx2i.ko
/lib/modules/<kernel_version>/updates/bnx2fc.ko

  1. Unload existing driver if necessary:

rmmod bnx2
rmmod bnx2x

If the cnic driver is loaded, it should also be unloaded along with dependent
drivers:

rmmod bnx2fc
rmmod bnx2i
rmmod cnic

  1. Load the bnx2 driver for the BCM5706/BCM5708/5709/5716 devices:

insmod bnx2.o
or
insmod bnx2.ko (on 2.6.x kernels)
or
modprobe bnx2

To load the bnx2x driver for the BCM57710/BCM57711/BCM57711E/BCM57712 devices:

insmod bnx2x.o
or
insmod bnx2x.ko (on 2.6.x kernels)
or
modprobe bnx2x

To load the cnic driver:

insmod cnic.ko
or
modprobe cnic

To load the bnx2i driver:

insmod bnx2i.ko
or
modprobe bnx2i
service iscsid restart (Please refer REDAME.bnx2i.txt for more details
about iSCSI operation)

To load the bnx2fc driver for BCM57712 device:

insmod bnx2fc.ko
or
modprobe bnx2fc
service fcoe start (Please refer README.bnx2fc.txt for more details about
FCoE operation)

Note that the inbox kernel may have an older version of bnx2, bnx2x and cnic
driver. It is important for FCoE offload user to unload these inbox versions
before attempting to load bnx2fc driver. There are 2 options to reach the
desired goal,
a) Reboot the server
OR
b) If already loaded, unload inbox bnx2, bnx2x, cnic drivers and load newly
installed version from netxtreme2-foce package using 'modprobe <DRV-NAME>'

NOTE: Driver upgrade (rpm -Uvh) is not supported.
NOTE: On SLES 11, change "allow_unsupported_modules" parameter value of
/etc/modprobe.d/unsupport-modules' from 0 to 1, until bnx2fc driver
is inbox. Failing to do so will not load bnx2fc.

  1. 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 netxtreme2-<version>.tar.gz

  1. Build the drivers as a loadable module for the running kernel:

make

The driver will be compiled for the running kernel by default. To build
the driver for a kernel different than the running one, specify the
kernel by defining it in KVER:

make KVER=<kernel version>

where <kernel version> in the form of 2.x.y-z is the version of another
kernel that is installed on the system.

  1. Test the driver by loading it (Same procedures as described in the
    Source RPM section above).

  2. Install the driver and man page:

make install

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

  1. To configure network protocol and address, refer to various Linux
    documentations.

Unloading and Removing Driver

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

rpm -e nextreme2

Note - this will remove libfc2, libfcoe2, bnx2, bnx2x and cnic modules as well

If the driver was installed using make install from the tar file, the drivers
have to be manually deleted from the system. Refer to the section
"Installing Source RPM Package" for the location of the installed driver.

  1. rmmod <driver>

  2. delete <driver>.ko from location given in section "Installing Source RPM Package"

  3. depmod -a

**The kernel will now be back to original state prior to instalation from tar file.
You may now reload previous module versions if necessary.

推荐阅读:

DELL PowerEdge XC60720 安装ESXi 5.0 U1网卡驱动难题

大切诺基HEL6.4 安装布罗兹com BCM4313有线网卡驱动

CentOS 6.4 60位下安吹捧CM4313有线网卡驱动

release 5.5 (Final) 故障现象: 网卡无故自动down掉,使用service network restart 重启后没多长期又会自动down , 连接数大约在200个左右...

本文由今晚开什么码发布于操作系统,转载请注明出处:更新网卡驱动

关键词:

上一篇:没有了
下一篇:没有了