在安装redhat时,总遇到rhine网卡速度慢的问题。已经解决过多次,但每次不写记录,最后还要再找很长时间
,今天再次解决,不得不记下。
网卡型号:via vt6104 rhine-ii
操作系统:redhat AS 3.0(Taroon)
安装后,可自动发现网卡,但是速度奇慢无比。ftp只能达到20kb.不能忍受之,更新驱动。
从via_amd光盘找到via rhine网卡的linux的驱动rhinefet-4.17.tar.gz包。
上传到rhas3服务器/tmp/lan目录下
tar zxvf rhinefet-4.17.tar.gz
cd rhinefet-4.17.tar.gz
当然,此前由于网上错误教程的指导,曾把gcc的版本更换,要先检查gcc版本
gcc -v
确定是系统要求的gcc 3.2.3后,编译
make install
编译时出现冲突,不能成功。
gcc -Wall -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe -I/lib/modules/2.4.21-4.EL/build/include -I. -Wstrict-prototypes -fomit-frame-pointer -DMODVERSIONS -include /lib/modules/2.4.21-4.EL/build/include/linux/modversions.h -DVMNS -c -o rhine_main.o rhine_main.c
In file included from /lib/modules/2.4.21-4.EL/build/include/net/sock.h:95,
from /lib/modules/2.4.21-4.EL/build/include/linux/udp.h:21,
from rhine_main.c:72:
/lib/modules/2.4.21-4.EL/build/include/net/irda/irda.h:81:1: warning: "ASSERT" redefined
In file included from rhine_main.c:37:
rhine.h:86:1: warning: this is the location of the previous definition
In file included from /lib/modules/2.4.21-4.EL/build/include/net/sock.h:95,
from /lib/modules/2.4.21-4.EL/build/include/linux/udp.h:21,
from rhine_main.c:72:
/lib/modules/2.4.21-4.EL/build/include/net/irda/irda.h:207: redefinition of `LINK_STATUS'
vmns_drv.h:193: `LINK_STATUS' previously declared here
rhine_main.c:746:21: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c: In function `rhine_free_info':
rhine_main.c:746: `ASSERT' undeclared (first use in this function)
rhine_main.c:746: (Each undeclared identifier is reported only once
rhine_main.c:746: for each function it appears in.)
rhine_main.c:868:36: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c: In function `rhine_init_rd_ring':
rhine_main.c:868: `ASSERT' undeclared (first use in this function)
rhine_main.c:914:44: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c: In function `rhine_init_td_ring':
rhine_main.c:914: `ASSERT' undeclared (first use in this function)
rhine_main.c:1134:28: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c: In function `rhine_alloc_rx_buf':
rhine_main.c:1134: `ASSERT' undeclared (first use in this function)
rhine_main.c:1470:19: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c: In function `rhine_xmit':
rhine_main.c:1470: `ASSERT' undeclared (first use in this function)
rhine_main.c:1471:26: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c:1589:24: macro "ASSERT" requires 2 arguments, but only 1 given
rhine_main.c: In function `rhine_intr':
rhine_main.c:1589: `ASSERT' undeclared (first use in this function)
make: *** [rhine_main.o] Error 1
不怕,仔细看一下就行了,是说/usr/src/linux-2.4/include/irda/irda.h中的
有两个冲突项ASSERT 与 LINK_STATUS,将两段注释了,编译即可通过。
#define ASSERT(expr, func) \
if (!(expr)) do { \
func } while (0)
typedef enum {
STATUS_OK,
STATUS_ABORTED,
STATUS_NO_ACTIVITY,
STATUS_NOISY,
STATUS_REMOTE,
} LINK_STATUS;
insmod rhinefet
shutdown -r now
之后网络速度变快。
一定要记得把/usr/src/linux-2.4/include/irda/irda.h中两段注释还原啊。
本文地址:http://com.8s8s.com/it/it23636.htm