不知道出於什麼目的,技嘉在ga-g31m-es2c v1.1中使用RTL的網卡,但在ga-g31m-es2c v2.0之後的版本中卻使用 atheros AR8132的網卡,這就苦了我了。這幾天在裝linux 裝來裝去,都沒法搞定這塊網卡。網上的資料全都不對。linux
今天終於在公司硬件部同事的幫助下搞定了這塊網卡,下面和你們一塊兒分享一下: 其它的網卡相似app
若是你的系統是redhat 5.4的那就簡單了,能夠去http://elrepo.org/linux/elrepo/el5/i386/RPMS/下載一個kmod-atl1e-1.0.0.11-1.el5.elrepo.i686.rpm 直接安裝 而後使用netconfig命令測試一下,最後重啓系統就能夠了ide
1、環境:測試
系統 redhat as 4.6ui
內核 2.6.9-67.ELsmpthis
主板 ga-g31m-es2c v2.3ip
2、下載:ci
到http://partner.atheros.com/Drivers.aspx下載linux的驅動,我用的是AR81Family-linux-v1.0.1.13.tar.gzget
3、安裝it
[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
4、錯誤解決
一、系統內核版本太舊
現象:
[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
二、沒有成功加載模塊
現象:
使用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