解决redhat 3.0安装via vt6102 rhine-ii型网卡速度慢问题
在安装redhat时,总遇到rhine网卡速度慢的问题。已经解决过多次,但每次不写记录,最后还要再找很长时间,今天再次解决,不得不记下。
网卡型号:via vt6102 rhine-ii
操作系统:redhat AS 3.0(Taroon)
安装后,可自动发现网卡,但是速度奇慢无比。ftp只能达到20kb.不能忍受之,更新驱动。
从via_amd光盘找到via rhine网卡的linux的驱动rhinefet-4.17.tar.gz包。
下载地址:
2004-01-14
2001-06-27
上传到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/net/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中两段注释还原啊。
对了,由于原来的驱动程序名称为via-rhine.o
/etc/modules.conf中eth0对应的模块名也叫via-rhine
vi /etc/modules.conf
手工将
eth0 via-rhine
改为
eth0 rhinefet
即可实现自动启动了。
如果不能启动,请使用insmod rhinefet及lsmod /depmod/modprobe解决问题。
阅读(1592) | 评论(0) | 转发(0) |