I have bought a DLINK DGE-528T Gigabit Ethernet controller card. I have a problem compiling the driver that comes with it.
The readme file says:
Code:
cat readme.txt
Linux 2.4.x
===========
This document contains instructions on installing Linux driver
and adjusting speed for D-Link DGE-528T Gigabit Ethernet Adapter
Installing Driver:
------------------
dge528.c -- DGE-528T Linux driver version 1.6
1. This driver supports D-Link DGE-528T Gigabit Ethernet Adapter
for Linux kernel 2.4.x.
2. Installation steps:
(1)Compiling dge528.c using 'Makefile'.
"make"
<NOTE>Please remember to ASSIGN "NEW_INCLUDE_PATH" in Makefile according to
linux kernel.
(2)Move dge528.o to the directory "/lib/modules/<kernel>/kernel/drivers/net".
"cp dge528.o /lib/modules/<kernel>/kernel/drivers/net"
where <kernel> represents the kernel version, say 2.4.18-3 in Red Hat 7.3
(3)Insert module by
"insmod dge528.o"
(4)Check driver status
"dmesg"
3. The media can be forced to one of the 5 modes as follows.
Cmd: "insmod dge528 media = SET_MEDIA"
For example:
"insmod dge528 media = 0x04" will force PHY to operate in
100Mpbs Half-duplex.
SET_MEDIA can be:
_10_Half = 0x01
_10_Full = 0x02
_100_Half = 0x04
_100_Full = 0x08
_1000_Full = 0x10
Force media type for multiple cards could be performed as:
"insmod dge528 media=0x04,0x10"
which force PHY to operate at 100Mbps half-duplex and 1000Mbps full-duplex.
<NOTE> If on Red Hat 7.2, please add two lines to include header files and
mark one line for timer structure as follows:
#include <linux/timer.h>
#include <linux/init.h>
..................
// typedef struct timer_list timer_t
I did what it said and then tried to compile the driver:
Code:
make
gcc -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX -I /lib/modules/2.6.9-1.681_FC3/build/include/ -c dge528.c
In file included from /lib/modules/2.6.9-1.681_FC3/build/include/asm/processor.h:18,
from /lib/modules/2.6.9-1.681_FC3/build/include/asm/thread_info.h:16,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/thread_info.h:21,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/spinlock.h:12,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/capability.h:45,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/sched.h:7,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/module.h:10,
from dge528.c:52:
/lib/modules/2.6.9-1.681_FC3/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.6.9-1.681_FC3/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.6.9-1.681_FC3/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /lib/modules/2.6.9-1.681_FC3/build/include/linux/irq.h:20,
from /lib/modules/2.6.9-1.681_FC3/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/hardirq.h:6,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.9-1.681_FC3/build/include/asm/highmem.h:24,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/highmem.h:14,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/skbuff.h:27,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/if_ether.h:106,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/netdevice.h:29,
from dge528.c:54:
/lib/modules/2.6.9-1.681_FC3/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /lib/modules/2.6.9-1.681_FC3/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/hardirq.h:6,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.9-1.681_FC3/build/include/asm/highmem.h:24,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/highmem.h:14,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/skbuff.h:27,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/if_ether.h:106,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/netdevice.h:29,
from dge528.c:54:
/lib/modules/2.6.9-1.681_FC3/build/include/linux/irq.h: At top level:
/lib/modules/2.6.9-1.681_FC3/build/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)
In file included from /lib/modules/2.6.9-1.681_FC3/build/include/linux/irq.h:72,
from /lib/modules/2.6.9-1.681_FC3/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/hardirq.h:6,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.9-1.681_FC3/build/include/asm/highmem.h:24,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/highmem.h:14,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/skbuff.h:27,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/if_ether.h:106,
from /lib/modules/2.6.9-1.681_FC3/build/include/linux/netdevice.h:29,
from dge528.c:54:
/lib/modules/2.6.9-1.681_FC3/build/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
dge528.c:383: error: conflicting types for 'timer_t'
/lib/modules/2.6.9-1.681_FC3/build/include/linux/types.h:30: error: previous declaration of 'timer_t' was here
dge528.c: In function `rtl8169_init_board':
dge528.c:580: warning: implicit declaration of function `init_etherdev'
dge528.c:580: warning: assignment makes pointer from integer without a cast
dge528.c: In function `rtl8169_init_one':
dge528.c:739: error: structure has no member named `driver_data'
dge528.c: In function `rtl8169_remove_one':
dge528.c:866: error: structure has no member named `driver_data'
dge528.c:880: error: structure has no member named `driver_data'
dge528.c: In function `rtl8169_open':
dge528.c:903: warning: passing arg 2 of `request_irq' from incompatible pointer type
dge528.c: In function `rtl8169_set_rx_mode':
dge528.c:1593: warning: passing arg 2 of `set_bit' from incompatible pointer type
make: *** [dge528.o] Error 1
I attached a tar archive (x.tar) that contains the readme, the makefile, and the source file.
On a pas besoin de charger une pilote si on fait un mise a jour de kernel. J'ai u un bon resultat avec ce carte avec le kernel version 2.6.11-1.14_FC3
Celui ci est d'ores et deja depassé par une version superieure donc pour mettre en marche cette carte, saisisez les lignes suivantes:
su root
yum install kernel
Apres cella, redemarrez l'ordi et selectioner le nouveau kernel. Kudzu detectera la carte après ça.
---
No extra drivers are needed if you install a newer kernel. I have been having good results with kernel version 2.6.11-1.14.FC3. A newer version of the kernel is already released so the real solution is to update your kernel.
Execute the following commands:
su root
yum install kernel
Reboot your pc after that, choose the new kernel, and kudzu will detect the card now.
Am I likely to have major problems with an old old build of RH9 on this?
Does Kudzu detect the card after all the above has been done in the readme file?
Or is it a case of using something like Linuxconf and adding the card module details manually, I purchased this card to upgrade my Intel 10/100 Pro card.