LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-17-2004, 07:24 PM   #1
JohnLinx
LQ Newbie
 
Registered: Jan 2004
Posts: 27

Rep: Reputation: 15
SMC9452TX and Redhat 9.0


I am trying to install a SMC9452TX card under Redhat 9.0 using kernal 2.4.20-30.9.
I have downloaded the most current drivers from the SMC site.
They claim to have drivers for both 2.2 and 2.4 versions of the kernel.
When I attempt to use insmod to install the 2.4 version of the driver I receive the following error.

[root@localhost 2_4]# insmod smc94x2.o
smc94x2.o: kernel-module version mismatch
smc94x2.o was compiled for kernel version 2.4.2-2
while this kernel is version 2.4.20-30.9smp.
[root@localhost 2_4]#


At this point I decided to just compile the driver against the currently running kernel, thinking it would
take care of everything. When I did that, I received the following:


[root@localhost 2_4]# make
cc -D__KERNEL__ -DSMC_SMC94X2TX -DMODULE -DCLONE -D__NO_VERSION__ -D_DUMP -DSINGLE_PACKET -D_DP83820_ -DINTR_HOLDOFF -DMEMMAPPED_IO -D_DBG -DPHY_INTR -DFAILURE_MESSAGES -DSTATISTICS -DASSERTION -DCHECKSUM -DERRDEBUG -O -Wall -I/usr/src/linux-2.4.2/include/ -g -w -c -o sp.o sp.c
In file included from nsmtypes.h:9,
from sp.c:18:
/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 rather headers from an appropriate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/include
/usr/include/linux/modversions.h:5:2: #error to build against the currently-running kernel.
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/mm.h:4,
from nsmtypes.h:13,
from sp.c:18:
/usr/include/linux/timex.h:173: field `time' has incomplete type
/usr/include/linux/timex.h:188: confused by earlier errors, bailing out
make: *** [sp.o] Error 1
[root@localhost 2_4]#

Here is a copy of the original makefile:

[root@localhost 2_4]# cat makefile
#!/bin/bash

INCLUDEDIR = /usr/src/linux-2.4.2/include/
MODULE_NAME = smc94x2

CFLAGS = -D__KERNEL__ -DSMC_SMC94X2TX -DMODULE -DCLONE -D__NO_VERSION__ -D_DUMP -DSINGLE_PACKET -D_DP83820_ -DINTR_HOLDOFF -DMEMMAPPED_IO -D_DBG -DPHY_INTR -DFAILURE_MESSAGES -DSTATISTICS -DASSERTION -DCHECKSUM -DERRDEBUG -O -Wall -I$(INCLUDEDIR) -g -w

OBJS = $(MODULE_NAME).o
all: $(OBJS)
$(MODULE_NAME).o: sp.o hsm.o dp.o
$(LD) -r $^ -o $@

/i:
insmod $(MODULE_NAME).o
ifconfig eth0 down
ifconfig eth0 up

/c:
netconfig
clear
ifconfig

/u:
ifconfig eth0 down
rmmod $(MODULE_NAME)
clear
lsmod

clean:
rm -f *.o *~ core
clear
[root@localhost 2_4]#


So, based on the above error message I changed the INCLUDEDIR line. See below for modified makefile.

[root@localhost 2_4]# cat makefile
#!/bin/bash

INCLUDEDIR = /lib/modules/$(uname -r)/build/include/
MODULE_NAME = smc94x2

CFLAGS = -D__KERNEL__ -DSMC_SMC94X2TX -DMODULE -DCLONE -D__NO_VERSION__ -D_DUMP -DSINGLE_PACKET -D_DP83820_ -DINTR_HOLDOFF -DMEMMAPPED_IO -D_DBG -DPHY_INTR -DFAILURE_MESSAGES -DSTATISTICS -DASSERTION -DCHECKSUM -DERRDEBUG -O -Wall -I$(INCLUDEDIR) -g -w

OBJS = $(MODULE_NAME).o
all: $(OBJS)
$(MODULE_NAME).o: sp.o hsm.o dp.o
$(LD) -r $^ -o $@

/i:
insmod $(MODULE_NAME).o
ifconfig eth0 down
ifconfig eth0 up

/c:
netconfig
clear
ifconfig

/u:
ifconfig eth0 down
rmmod $(MODULE_NAME)
clear
lsmod

clean:
rm -f *.o *~ core
clear
[root@localhost 2_4]#


When I use the above makefile, I get the same results... as before, see below

[root@localhost 2_4]# make
cc -D__KERNEL__ -DSMC_SMC94X2TX -DMODULE -DCLONE -D__NO_VERSION__ -D_DUMP -DSINGLE_PACKET -D_DP83820_ -DINTR_HOLDOFF -DMEMMAPPED_IO -D_DBG -DPHY_INTR -DFAILURE_MESSAGES -DSTATISTICS -DASSERTION -DCHECKSUM -DERRDEBUG -O -Wall -I/lib/modules//build/include/ -g -w -c -o sp.o sp.c
In file included from nsmtypes.h:9,
from sp.c:18:
/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 rather headers from an appropriate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/include
/usr/include/linux/modversions.h:5:2: #error to build against the currently-running kernel.
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/mm.h:4,
from nsmtypes.h:13,
from sp.c:18:
/usr/include/linux/timex.h:173: field `time' has incomplete type
/usr/include/linux/timex.h:188: confused by earlier errors, bailing out
make: *** [sp.o] Error 1
[root@localhost 2_4]#

Here is the output from DMESG, showing that I already have an eth0 adaptor installed. Is this the problem?
Do I need to change the vaule in the makefile to eth1?? If anyone can direct me on this, please....??

[root@localhost 2_4]# dmesg | grep eth
divert: allocating divert_blk for eth0
eth0: Intel(R) PRO/1000 Network Connection
e1000: eth0 NIC Link is Up 10 Mbps Half Duplex
[root@localhost 2_4]#


Regards,
John
 
Old 03-18-2004, 07:19 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
If you really can't find a solution to correctly compile your module for your running, you have the possibilty to do:
Code:
insmod -f smc94x2.o
It will force the module insertion. But the best solution remains the compilation
 
Old 05-12-2004, 11:52 AM   #3
JohnLinx
LQ Newbie
 
Registered: Jan 2004
Posts: 27

Original Poster
Rep: Reputation: 15
To all,
In case anyone is interested. I contacted the developer of the driver, their support staff was very helpful. When I explained my issue, they informed me to use a different driver, SK98LIN. I then downloaded and compiled it for the 2.4 version of the kernel. Now the driver installs and the card is working. The vendor for this driver is WWW.SYSKONNECT.COM.


Issue Closed....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
display horizantly shifted for redhat 9.0, redhat enterprise and fedora core dudely Linux - Enterprise 3 08-13-2005 12:28 PM
display horizantly shifted for redhat 9.0, redhat enterprise and fedora core dudely Linux - Software 3 08-12-2005 10:18 AM
display horizantly shifted for redhat 9.0, redhat enterprise and fedora core dudely Linux - Newbie 1 08-11-2005 04:11 PM
redhat-config-packages error (thinks it is redhat and not fedora) qwijibow Fedora 3 12-17-2003 08:59 PM
installing samba-3.0alpha24-1.i386.rpm into RedHat 8 and RedHat 9 Linh Linux - Newbie 2 06-04-2003 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration