LINUX内核升级 - 更新网卡驱动
- 作者:邹祁峰
- 邮箱:[email protected]
- 博客:http://blog.csdn.net/qifengzou
-
日期:2015.03.20 01:00
- 转载请注明来自"祁峰"的CSDN博客
#ifconfig -a
em1 Link encap:Ethernet HWaddr EC:F4:BB:D0:0B:60 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) em2 Link encap:Ethernet HWaddr EC:F4:BB:D0:0B:62 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) em3 Link encap:Ethernet HWaddr EC:F4:BB:D0:0B:64 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Memory:dbe80000-dbf00000 |
使用ethtool命令可以查看指定网卡所以来的网卡驱动信息:
#ethtool -i em3
driver: igb - 网卡em3依赖igb驱动 version: 3.0.6-k firmware-version: 1.6-7 bus-info: 0000:08:00.0 |
04、查看网卡型号
通过③我们已经知道了网卡所依赖的驱动,但是还不知具体的网卡驱动型号,此时可通过如下命令查询:
01:00.0 Ethernet controller [0200]: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01) 01:00.1 Ethernet controller [0200]: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01) 03:00.0 Ethernet controller [0200]: Intel Corporation 82599EB 10-Gigabit SFP+ Network Connection [8086:154d] (rev 01) 03:00.1 Ethernet controller [0200]: Intel Corporation 82599EB 10-Gigabit SFP+ Network Connection [8086:154d] (rev 01) 08:00.0 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) 08:00.1 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01) |
由④的操作可知当前内核(2.6.32-220.el6.x86_64)千兆网络驱动igb支持网卡型号[8086:1521],因此必须要求目标内核(2.6.33-110.el6.x86_64)对该型号网卡[8086:1521]的支持。
05、查看目标内核的网卡驱动是否支持当前型号网卡
可以通过modinfo命令查看*.ko对哪种设备型号的支持,目标内核(2.6.33-110.el6.x86_64)的相关驱动可在/lib/modules/2.6.33-110.el6.x86_64的目录想找到,如下所示:
#modinfo /lib/modules/2.6.33-110.el6.x86_64/kernel/drivers/net/igb/igb.ko
filename: igb.ko version: 2.1.0-k2 license: GPL description: Intel(R) Gigabit Ethernet Network Driver author: Intel Corporation, <[email protected]> srcversion: 412D1CB4C85682CBF07976F alias: pci:v00008086d000010D6sv*sd*bc*sc*i* alias: pci:v00008086d000010A9sv*sd*bc*sc*i* alias: pci:v00008086d000010A7sv*sd*bc*sc*i* alias: pci:v00008086d000010E8sv*sd*bc*sc*i* alias: pci:v00008086d0000150Dsv*sd*bc*sc*i* alias: pci:v00008086d000010E7sv*sd*bc*sc*i* alias: pci:v00008086d000010E6sv*sd*bc*sc*i* alias: pci:v00008086d00001518sv*sd*bc*sc*i* alias: pci:v00008086d0000150Asv*sd*bc*sc*i* alias: pci:v00008086d000010C9sv*sd*bc*sc*i* alias: pci:v00008086d00001516sv*sd*bc*sc*i* alias: pci:v00008086d00001511sv*sd*bc*sc*i* alias: pci:v00008086d00001510sv*sd*bc*sc*i* alias: pci:v00008086d0000150Fsv*sd*bc*sc*i* alias: pci:v00008086d0000150Esv*sd*bc*sc*i* depends: vermagic: 2.6.33-110.el6.x86_64 SMP mod_unload modversions |
既然已经明确了目标内核的网卡驱动并不支持当前的网卡设备,也就是说一旦启用新的内核,将导致系统无法正常使用网络功能。如果是英特尔的网卡设备,则可到:http://www.intel.cn/content/www/cn/zh/homepage.html 下载所需的驱动源码到本地。
#make BUILD_KERNEL=2.6.33-110.el6.x86_64
#modinfo igb.ko
filename: igb.ko version: 5.2.9.4 license: GPL description: Intel(R) Gigabit Ethernet Network Driver author: Intel Corporation, <[email protected]> srcversion: E377200391EBF74638FEDA2 alias: pci:v00008086d000010D6sv*sd*bc*sc*i* alias: pci:v00008086d000010A9sv*sd*bc*sc*i* alias: pci:v00008086d000010A7sv*sd*bc*sc*i* alias: pci:v00008086d000010E8sv*sd*bc*sc*i* alias: pci:v00008086d00001526sv*sd*bc*sc*i* alias: pci:v00008086d0000150Dsv*sd*bc*sc*i* alias: pci:v00008086d000010E7sv*sd*bc*sc*i* alias: pci:v00008086d000010E6sv*sd*bc*sc*i* alias: pci:v00008086d00001518sv*sd*bc*sc*i* alias: pci:v00008086d0000150Asv*sd*bc*sc*i* alias: pci:v00008086d000010C9sv*sd*bc*sc*i* alias: pci:v00008086d00000440sv*sd*bc*sc*i* alias: pci:v00008086d0000043Csv*sd*bc*sc*i* alias: pci:v00008086d0000043Asv*sd*bc*sc*i* alias: pci:v00008086d00000438sv*sd*bc*sc*i* alias: pci:v00008086d00001516sv*sd*bc*sc*i* alias: pci:v00008086d00001511sv*sd*bc*sc*i* alias: pci:v00008086d00001510sv*sd*bc*sc*i* alias: pci:v00008086d00001527sv*sd*bc*sc*i* alias: pci:v00008086d0000150Fsv*sd*bc*sc*i* alias: pci:v00008086d0000150Esv*sd*bc*sc*i* alias: pci:v00008086d00001524sv*sd*bc*sc*i* alias: pci:v00008086d00001523sv*sd*bc*sc*i* alias: pci:v00008086d00001522sv*sd*bc*sc*i* alias: pci:v00008086d00001521sv*sd*bc*sc*i* alias: pci:v00008086d00001539sv*sd*bc*sc*i* alias: pci:v00008086d0000157Csv*sd*bc*sc*i* alias: pci:v00008086d0000157Bsv*sd*bc*sc*i* alias: pci:v00008086d00001538sv*sd*bc*sc*i* alias: pci:v00008086d00001537sv*sd*bc*sc*i* alias: pci:v00008086d00001536sv*sd*bc*sc*i* alias: pci:v00008086d00001533sv*sd*bc*sc*i* alias: pci:v00008086d00001F45sv*sd*bc*sc*i* alias: pci:v00008086d00001F41sv*sd*bc*sc*i* alias: pci:v00008086d00001F40sv*sd*bc*sc*i* depends: hwmon vermagic: 2.6.33-110.el6.x86_64 SMP mod_unload modversions parm: InterruptThrottleRate:Maximum interrupts per second, per vector, (max 100000), default 3=adaptive (array of int) parm: IntMode:Change Interrupt Mode (0=Legacy, 1=MSI, 2=MSI-X), default 2 (array of int) parm: Node:set the starting node to allocate memory on, default -1 (array of int) parm: LLIPort:Low Latency Interrupt TCP Port (0-65535), default 0=off (array of int) parm: LLIPush:Low Latency Interrupt on TCP Push flag (0,1), default 0=off (array of int) parm: LLISize:Low Latency Interrupt on Packet Size (0-1500), default 0=off (array of int) parm: RSS:Number of Receive-Side Scaling Descriptor Queues (0-8), default 1, 0=number of cpus (array of int) parm: VMDQ:Number of Virtual Machine Device Queues: 0-1 = disable, 2-8 enable, default 0 (array of int) parm: max_vfs:Number of Virtual Functions: 0 = disable, 1-7 enable, default 0 (array of int) parm: MDD:Malicious Driver Detection (0/1), default 1 = enabled. Only available when max_vfs is greater than 0 (array of int) parm: QueuePairs:Enable Tx/Rx queue pairs for interrupt handling (0,1), default 1=on (array of int) parm: EEE:Enable/disable on parts that support the feature (array of int) parm: DMAC:Disable or set latency for DMA Coalescing ((0=off, 1000-10000(msec), 250, 500 (usec)) (array of int) parm: LRO:Large Receive Offload (0,1), default 0=off (array of int) parm: debug:Debug level (0=none, ..., 16=all) (int) |
终于在显示的信息中找到了[8086:1521]信息,说明新生成的驱动文件能够支持当前网卡型号。那么如何让目标内核(2.6.33-110.el6.x86_64)能够载入新驱动呢?
#cp igb.ko /lib/modules/2.6.33-110.el6.x86_64/kernel/drivers/net/igb/
#depmod -a 2.6.33-110.el6.x86_64
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。