不知道出于什么目的,技嘉在ga-g31m-es2c v1.1中使用RTL的网卡,但在ga-g31m-es2c v2.0以后的版本中却使用 atheros AR8132的网卡,这就苦了我了。这几天在装linux 装来装去,都无法搞定这块网卡。网上的资料全都不对。
今天终于在公司硬件部同事的帮助下搞定了这块网卡,下面和大家一起分享一下: 其它的网卡类似
如果你的系统是redhat 5.4的那就简单了,可以去http://elrepo.org/linux/elrepo/el5/i386/RPMS/下载一个kmod-atl1e-1.0.0.11-1.el5.elrepo.i686.rpm 直接安装 然后使用netconfig命令测试一下,最后重启系统就可以了
一、环境:
系统 redhat as 4.6
内核 2.6.9-67.ELsmp
主板 ga-g31m-es2c v2.3
二、下载:
到http://partner.atheros.com/Drivers.aspx下载linux的驱动,我用的是AR81Family-linux-v1.0.1.13.tar.gz
三、安装
[root@localhost ~]# cd /usr/local/src
[root@localhost src]# gunzip AR81Family-linux-v1.0.1.13.tar.gz
[root@localhost src]# tar AR81Family-linux-v1.0.1.13.tar
[root@localhost src]# cd src
[root@localhost src]# make
make -C /lib/modules/2.6.9-67.ELsmp/build SUBDIRS=/usr/local/src/src/src/src modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-67.EL-smp-i686'
CC [M] /usr/local/src/src/src/src/at_common_main.o
CC [M] /usr/local/src/src/src/src/atl1e_main.o
CC [M] /usr/local/src/src/src/src/atl1c_main.o
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_change_mtu':
/usr/local/src/src/src/src/atl1c_main.c:464: error: `NETIF_F_TSO6' undeclared (first use in this function)
/usr/local/src/src/src/src/atl1c_main.c:464: error: (Each undeclared identifier is reported only once
/usr/local/src/src/src/src/atl1c_main.c:464: error: for each function it appears in.)
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_tso_csum':
/usr/local/src/src/src/src/atl1c_main.c:2104: warning: unused variable `etpd_word1'
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_suspend':
/usr/local/src/src/src/src/atl1c_main.c:2682: warning: implicit declaration of function `device_set_wakeup_enable'
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_probe':
/usr/local/src/src/src/src/atl1c_main.c:2913: warning: implicit declaration of function `device_init_wakeup'
make[2]: *** [/usr/local/src/src/src/src/atl1c_main.o] 错误 1
make[1]: *** [_module_/usr/local/src/src/src/src] 错误 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.EL-smp-i686'
make: *** [default] 错误 2
[root@localhost src]# vi atl1c_main.c
将含有”NETIF_F_TSO6 ”注释掉, 如下
#ifdef NETIF_F_TSO6
adapter->netdev->features &= ~NETIF_F_TSO6;
#endif
root@localhost src]# make clean
root@localhost src]# make
[root@localhost src]# make install
[root@localhost src]# insmod /lib/modules/2.6.9-67.Elsmp/kernel/drivers/net/atl1e/atl1e.ko
insmod: error inserting '/lib/modules/2.6.9-67.Elsmp/kernel/drivers/net/atl1e/atl1e.ko’: –1 Unknown symbol in module
[root@localhost src]# lsmod | grep atl1e 无输出
[root@localhost src]# dmesg
看到如下信息:
atl1e:Unknown symbol device_set_wakeup_enable
atl1e:Unknown symbol device_init_wakeup
[root@localhost src]# find . | xargs grep device_set_wakeup_enable
[root@localhost src]# find . | xargs grep device_init_wakup
找到相关文件,在相关文件中将此内容注释 如下:
//device_set_wakeup_enable(&pdev->dev,1);
//device_init_wakeup(&pdev->dev,1);
[root@localhost src]# make clean
[root@localhost src]# make install
[root@localhost src]# insmod /lib/modules/2.6.9-67.Elsmp/kernel/drivers/net/atl1e/atl1e.ko
[root@localhost src]# lsmod | grep atl1e
atl1e 77600 0
[root@localhost src]# init 6
四、错误解决
1、系统内核版本太旧
现象:
[root@localhost src]# make install
make -C /lib/modules/2.6.9-67.ELsmp/build SUBDIRS=/usr/local/src/src/src/src modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-67.EL-smp-i686'
CC [M] /usr/local/src/src/src/src/at_common_main.o
CC [M] /usr/local/src/src/src/src/atl1e_main.o
CC [M] /usr/local/src/src/src/src/atl1c_main.o
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_change_mtu':
/usr/local/src/src/src/src/atl1c_main.c:464: error: `NETIF_F_TSO6' undeclared (first use in this function)
/usr/local/src/src/src/src/atl1c_main.c:464: error: (Each undeclared identifier is reported only once
/usr/local/src/src/src/src/atl1c_main.c:464: error: for each function it appears in.)
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_tso_csum':
/usr/local/src/src/src/src/atl1c_main.c:2104: warning: unused variable `etpd_word1'
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_suspend':
/usr/local/src/src/src/src/atl1c_main.c:2682: warning: implicit declaration of function `device_set_wakeup_enable'
/usr/local/src/src/src/src/atl1c_main.c: In function `atl1c_probe':
/usr/local/src/src/src/src/atl1c_main.c:2913: warning: implicit declaration of function `device_init_wakeup'
make[2]: *** [/usr/local/src/src/src/src/atl1c_main.o] 错误 1
make[1]: *** [_module_/usr/local/src/src/src/src] 错误 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.EL-smp-i686'
make: *** [default] 错误 2
[root@localhost src]#
解决方法:
[root@localhost src]# make clean
[root@localhost src]# vi atl1c_main.c
将含有”NETIF_F_TSO6 ”注释掉, 如下
#ifdef NETIF_F_TSO6
adapter->netdev->features &= ~NETIF_F_TSO6;
#endif
[root@localhost src]# make install
2、没有成功加载模块
现象:
使用neat能看到eth0,但是ifconfig –a 没有 也就是说没有看到硬件。
[root@localhost src]# insmod /lib/modules/2.6.9-67.Elsmp/kernel/drivers/net/atl1e/atl1e.ko
insmod: error inserting '/lib/modules/2.6.9-67.Elsmp/kernel/drivers/net/atl1e/atl1e.ko’: –1 Unknown symbol in module
[root@localhost src]# lsmod | grep atl1e 无输出
[root@localhost src]# dmesg
看到如下信息:
atl1e:Unknown symbol device_set_wakeup_enable
atl1e:Unknown symbol device_init_wakup
解决方法:
[root@localhost src]# find . | xargs gerp device_set_wakeup_enable
[root@localhost src]# find . | xargs gerp device_init_wakup
找到相关文件,在相关文件中将此内容注释 如下:
//device_set_wakeup_enable(&pdev->dev,1);
//device_init_wakeup(&pdev->dev,1);
[root@localhost src]# make clean
[root@localhost src]# make install
[root@localhost src]# insmod /lib/modules/2.6.9-67.Elsmp/kernel/drivers/net/atl1e/atl1e.ko
本文出自 “jedy 网络技术&linux学习” 博客,转载请与作者联系!