Solved

How to install and configure "D-link DGE-500SX PCI Gigabit-Ethernet NIC"

Posted on 2001-08-24
11
356 Views
Last Modified: 2010-05-18
Hi, still having a problem on it .....

   I have a "D-link DGE-500SX PCI Gigabit-Ethernet NIC" on eth1 (PCI slot 2).

   Currently running on Linux Redhat 7.1 (kernel 2.4.2)
(Almost all packages installed)

Questions:
==========
1. How to check if kernel 2.4.2 support gigabit ethernet PCI NIC ?
2. If not, what should I do (pls give detailed explanation)
3. I downloaded the driver "0001115.exe". Following the instruction in the readme file, I encountered a problem.

type "make", but error appeared as follow :
 gcc -D__KERNEL__ -DMODULE -02 ..............
 ............................................
 ..... -DSERIALIZE_TX -c -o dgelin.o dgelin.c

 In the file included from dgelin.c:353:
 /usr/include/linux/modversions.h:1:2: #error Modules
 should never use kernel-headers system headers,
 /usr/include/linux/modversions.h:2:2: #error but headers
 from an appropriate kernel-source
 make: *** [dgelin.o] Error 1

Pls tell me what should I do ?

4. Would it be as simple as just get a "dgelin.o" file and put it into the directory where other NIC card driver files are (/lib/modules..../drivers/net/  )


Pls help me here.
Thank you very much.

:)

(I enjoy learning Linux,
thankx for the help of all the experts  :)
0
Comment
Question by:shchong2
  • 8
  • 3
11 Comments
 

Author Comment

by:shchong2
ID: 6424206
Hi experts, :(

I found the D-link DGE-500SX Gigablit Ethernet Adapter driver from an Italian site (although I donno Italian language at all ... :)

http://www.dlink.it/supporto/prod/DGE-500SX/view.html

it claimed to have tested under Redhat 6.0, 6.1, 6.2, 7.0 and even 7.1.

the driver file is "jt1lin.o"

0
 

Author Comment

by:shchong2
ID: 6424207
Hi experts, :(

I found the D-link DGE-500SX Gigablit Ethernet Adapter driver from an Italian site (although I donno Italian language at all ... :)

http://www.dlink.it/supporto/prod/DGE-500SX/view.html

it claimed to have tested under Redhat 6.0, 6.1, 6.2, 7.0 and even 7.1.

the driver file is "jt1lin.o"

0
 

Author Comment

by:shchong2
ID: 6424225
But experts,

(I follow exactly what the readme file says)

After I did the "tar xvf jt1lin.tar" and "make all" to obtain the "jt1lin_d.o" file (which I then rename it to jt1lin.o), I edit the "modules.conf" file by adding :-

   alias eth1 jt1lin
   options jt1lin speed=1000 duplex=full

(p/s : DGE-500SX is at my eth1
       DFE-550TX already works at eth0)

I then edit the file "ifcfg-eth1" at the directory of "/etc/sysconfig/network-scripts" to add ip=10.1.1.21
and netmask=255.255.255.0 and onboot=yes

the using GUI of "netcfg" and "netconf" to confirm the changes. Quiting netconf, it will prompt for the restart of certain services, which I click yes.

But problem is
==============
When I wanna "ifconfig eth1 up"
--> eth1: unknown interface: No such device

when I wanna "ifup eth1"
--> Delaying eth1 initialization


Even on reboot, both "lo" and "eth0" loaded correctly, but
"eth1" is under "Delaying eth1 initialization"


Pls help
(Waiting for reply from any expert)
:)
0
 

Author Comment

by:shchong2
ID: 6424239
I reboot,

When shutting down,
I saw "modprobe: Can't find eth1 module"

When restarting up
I saw "Bringing up eth1 : Delaying eth1 initialization"

pls help
:)
0
 
LVL 5

Expert Comment

by:moonbeam012200
ID: 6426959
> /usr/include/linux/modversions.h:1:2: #error Modules

This happens in rh7 because of a version mismatch between the kernel source and the kernel-headers package. It is my guess that you have a 2.2 headers and the 2.4 source. Try reloading the kernel headers package. Redhat 7.1 has some real wonkyness here.

Another possibility is that you have installed a standard 2.4.2 kernel tree (a good thing) but the normal include symbolic links do not point the the kernel source tree. eg:

-->ls -ld /usr/include/linux
lrwxrwxrwx    1 root     root           28 Mar 10  2036 /usr/include/linux -> /usr/src/linux/include/linux/

-->ls -ld /usr/include/asm
lrwxrwxrwx    1 root     root           26 Mar 10  2036 /usr/include/asm -> /usr/src/linux/include/asm/


0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:shchong2
ID: 6428501
Sorry, I'm too new to linux
I could hardly understand it inside out
forgive me for my stupidness
:)

I type in the terminal

-->ls -ld /usr/include/linux
drwxr-xr-x     10 root     root    12288 Aug 16 01:15  /usr/include/linux


-->ls -ld /usr/include/asm
drwxr-xr-x      2 root     root     4096 Aug 16 01:15   /usr/include/asm


so, what does it mean ? what can i do about it ?
0
 

Author Comment

by:shchong2
ID: 6428502
Sorry, I'm too new to linux
I could hardly understand it inside out
forgive me for my stupidness
:)

I type in the terminal

-->ls -ld /usr/include/linux
drwxr-xr-x     10 root     root    12288 Aug 16 01:15  /usr/include/linux


-->ls -ld /usr/include/asm
drwxr-xr-x      2 root     root     4096 Aug 16 01:15   /usr/include/asm


so, what does it mean ? what can i do about it ?
0
 

Author Comment

by:shchong2
ID: 6428520
I put the "jt1lin.o" file into /lib/modules..../drivers/net/  

then, I go in "netconf" to set the "eth1"
-->ip = 10.1.1.21
-->netmask = 255.255.255.0
-->net device = eth1
-->kernel module = jt1lin

next, I go to "netcfg" to activate the "eth1"
but problems on
-->Delaying eth1 initialization
-->SIOCDELRT: No such process
-->SIOCADDRT: Network is unreachable

What is going on actually ?

What should I do to make this "D-link DGE-500SX PCI Gigabit-Ethernet NIC" works ?

Pls kindly help
:)
0
 
LVL 5

Accepted Solution

by:
moonbeam012200 earned 300 total points
ID: 6429634
>drwxr-xr-x     10 root     root    12288 Aug 16 01:15  /usr/include/linux

yup. These are a directory, not a symbolic link to the kernel headers. What you want to do is...

# cd to the include directory
cd /usr/include
# move the directories out of the way
mv linux linux-ORIG
mv asm asm-ORIG
# create the symbolic links
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/asm asm

But if you got a "jt1lin.o" file, the above might not be necessary because it appears you got it to compile (?).

Have you run a 'depmod -a' to update your module dependancy file? Also, is the module loaded when you try the 'netcfg'?

To see if the module is loaded, run '/sbin/lsmod'. To load the module run 'insmod jt1lin'.

One other thought. You can run into trouble using a binary distributed module. It has to be specifically made for you version of the kernel. This is why binary module distribution is generally not done.  It is also just as tricky to add a "non-standard" module to the kernel source.
You might consider just going back to one of the 2.2.x kernels. In those kernels, the 500sx is supported. I have seen a couple of notes from people saying they are working on a 2.4 port. But to my knowledge, it hasn't been done yet.

Later on today, I'll take a look at the source for the italian source, and just for grins -- compile it for my 2.4.9 kernel.
0
 
LVL 5

Expert Comment

by:moonbeam012200
ID: 6434556
I was able to compile the module. The code is very dependant on symbolic link into the kernel source. eg:

#include <linux/types.h>       // u8, u16, etc.
#include <asm/io.h>            // inb()/outb() etc
#include <asm/signal.h>        // SA_SHIRQ etc
#include <linux/delay.h>       // udelay()
#include <linux/if_ether.h>    // struct enet_statistics
#include <linux/ioport.h>      // release_region() etc
#include <linux/malloc.h>      // kmalloc, kfree
#include <linux/netdevice.h>   // struct net_device and dev_xxx()
#include <linux/pci.h>         // PCI_XXX
#include <linux/stddef.h>      // offsetof

Also, I found the makefile uses -DMODVERSIONS which makes it makes the resulting binary quite dependant on the kernel version. I suggest you fix the symbolic link problem I described before and compile the module yourself.

I did get one warning.

c:431: warning: `min' redefined

In the current 2.4 kernels they have redefined the min and max macros to contain a third parameter to contain the type of the min/max compare. This can probably be ignored, but the author really should not define his own min/max, but use the new kernel.h definition. eg:

#define min(type,x,y) \
        ({ type __x = (x), __y = (y); __x < __y ? __x: __y; })
#define max(type,x,y) \
        ({ type __x = (x), __y = (y); __x > __y ? __x: __y; })

As far as testing, you don't need to initially move this module into /lib/modules/.... but use 'insmod jt1dbg.o'
directly. Use '/sbin/lsmod' to verify that it has been loaded.

Once it is loaded, then try to bring up the interface. I must admit, I don't really like the 'do it for you' kind of network scripts but prefer to test by performing the ifconfig directly. Something like:

/sbin/ifconfig eth1 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

For example, here is my script to bring up my firewall's two ip interfaces.

HOSTNAME=`cat /etc/HOSTNAME`

# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface. If you're only using loopback or SLIP, don't include the
# rest of the lines in this file.

# Edit for your setup.
IPADDR="192.168.1.4"    # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
NETWORK="192.168.1.0"   # REPLACE with YOUR network address!
BROADCAST="192.168.1.255"       # REPLACE with YOUR broadcast address, if you
                        # have one. If not, leave blank and edit below.
ATHOMEGW="65.3.189.1"   # @home gateway address
ATHOMEIP="65.3.189.82"  # @home IP address
ATHOMEBC="65.3.189.255" # @home broadcast address
ATHOMENW="65.3.189.0"   # @home network address

# Uncomment the line below to initialize the ethernet device.
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
/sbin/ifconfig eth1 ${ATHOMEIP} broadcast ${ATHOMEBC} netmask ${NETMASK}

# Uncomment these to set up your IP routing table.
/sbin/route add -net ${NETWORK} netmask ${NETMASK}
/sbin/route add -net ${ATHOMENW} netmask ${NETMASK}
/sbin/route add -host ${ATHOMENW}

# below was the slack default example
/sbin/route add default gw ${ATHOMEGW} metric 1

I only provide you this to enable you to test outside of the redhat network labyrith of scripts. It is a simple and direct approach. As you can see, network script don't have to be complicated.

Once you get the module loaded, you might want to go ahead and just try the 'netconf' scripts. Who knows, it might just work!

0
 

Author Comment

by:shchong2
ID: 6440614
Really thankx a lot for your help, moonbeam
You are really a professional in this field

I finally decided to go back to Redhat 7.0 (kernel 2.2.16-22)
but now, I face some problem (I think its a small one)
I post it in this domain as a new question
can you pls take a look at it and teach me a way to solve it?
:)

Thankx
(^0_0^)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now