[2.5] Update sk98lin driver
Hi
I have a 3Com 3c940 gigabit LOM, that is basically a SysKonnect chipset card. Here are later drivers that do support it:
ftp://ftp.asus.com.tw/pub/ASUS/lan/3com/3c940/041_Linux.zip
The current one in the 2.5 tree was last updated for newer chipsets in 2001, while the new was updated February this year.
Anyhow, I got the new to compile, and fixed the few irqreturn_t calls, and some other 2.5 changes I knew about.
Now the problem is that if I try to load it, I get this:
-----------------------------------------
sk98lin: Unknown symbol __udivdi3
-----------------------------------------
Meaning it linked with libgcc_s.so. Any ideas why ?
If you need the diff from above source, let me know. Else if somebody more experienced is interested in porting it, I will gladly test.
Thanks,
Signature · 1 line
Martin Schlemmer
Quoted 10 lines · Martin Schlemmer
Anyhow, I got the new to compile, and fixed the few
irqreturn_tcalls, and some other 2.5 changes I knew about.Now the problem is that if I try to load it, I get this:
-----------------------------------------
sk98lin: Unknown symbol__udivdi3
-----------------------------------------Meaning it linked with libgcc_s.so. Any ideas why ?
Get rid of division on 64bit types in the driver.
Quoted 6 lines · Martin Schlemmer
Hi
I have a 3Com 3c940 gigabit LOM, that is basically a SysKonnect chipset card. Here are later drivers that do support it:
ftp://ftp.asus.com.tw/pub/ASUS/lan/3com/3c940/041_Linux.zip
...>
Quoted 5 lines
Now the problem is that if I try to load it, I get this:
-----------------------------------------
sk98lin: Unknown symbol__udivdi3
-----------------------------------------
Meaning it linked with libgcc_s.so. Any ideas why ?
It wanted to. That is signature of 64 bit value
being divided by an abitrary non-power-of-two divider.
If there is a non-fast-path use for the division,
using do_div() macro. Originally for lib/vsprintf.c
from which you can deduce the usage.
If it is in fast-path, then the code needs serious
re-thought.
Quoted 6 lines
If you need the diff from above source, let me know. Else if somebody more experienced is interested in porting it, I will gladly test.
Thanks,Signature · 1 line
Martin Schlemmer
/Matti Aarnio
Quoted 9 lines · Matti Aarnio
Quoted 5 lines
Now the problem is that if I try to load it, I get this:
-----------------------------------------
sk98lin: Unknown symbol__udivdi3
-----------------------------------------
Meaning it linked with libgcc_s.so. Any ideas why ?It wanted to. That is signature of 64 bit value
being divided by an abitrary non-power-of-two divider.
Quoted 7 lines
If there is a non-fast-path use for the division,
usingdo_div()macro. Originally forlib/vsprintf.c
from which you can deduce the usage.If it is in fast-path, then the code needs serious
re-thought.
Bleh, never easy hey =)
And I am guessing just adding a __udivdi3 implementation like some of the other archs is out of the question ?
Signature · 1 line
Martin Schlemmer
Quoted 16 lines · Martin Schlemmer
Hi
I have a 3Com 3c940 gigabit LOM, that is basically a SysKonnect chipset card. Here are later drivers that do support it:
ftp://ftp.asus.com.tw/pub/ASUS/lan/3com/3c940/041_Linux.zip
The current one in the 2.5 tree was last updated for newer chipsets in 2001, while the new was updated February this year.
Anyhow, I got the new to compile, and fixed the few
irqreturn_tcalls, and some other 2.5 changes I knew about.
Quoted 8 lines
Now the problem is that if I try to load it, I get this:
-----------------------------------------
sk98lin: Unknown symbol__udivdi3
-----------------------------------------Meaning it linked with libgcc_s.so. Any ideas why ?
This was the fix for the in-kernel driver, so it'll presumably fix the updated driver.
drivers/net/sk98lin/h/skgepnm2.h renamed from drivers/net/sk98lin/h/skgepnm2.h~sk98-build-fix +1 -1
@@ -341,7 +341,7 @@ typedef struct s_PnmiStatAddr {#if SK_TICKS_PER_SEC ==100 #define SK_PNMI_HUNDREDS_SEC (t) (t)#else -#define SK_PNMI_HUNDREDS_SEC (t) (((t) * 100) / (SK_TICKS_PER_SEC)) +#define SK_PNMI_HUNDREDS_SEC (t) ((((long)t) * 100) / (SK_TICKS_PER_SEC))#endif /*
_
Quoted 17 lines · Andrew Morton
Quoted 8 lines
Now the problem is that if I try to load it, I get this:
-----------------------------------------
sk98lin: Unknown symbol__udivdi3
-----------------------------------------Meaning it linked with libgcc_s.so. Any ideas why ?
This was the fix for the in-kernel driver, so it'll presumably fix the updated driver.
diff -puN
drivers/net/sk98lin/h/skgepnm2.h~sk98-build-fixdrivers/net/sk98lin/h/skgepnm2.h
drivers/net/sk98lin/h/skgepnm2.h typedef struct s_PnmiStatAddr { · line 347
Quoted 8 lines
drivers/net/sk98lin/h/skgepnm2.h renamed from drivers/net/sk98lin/h/skgepnm2.h~sk98-build-fix +1
-1@@ -341,7 +341,7 @@ typedef struct s_PnmiStatAddr {#if SK_TICKS_PER_SEC ==100 #define SK_PNMI_HUNDREDS_SEC (t) (t)#else -#define SK_PNMI_HUNDREDS_SEC (t) (((t) * 100) / (SK_TICKS_PER_SEC)) +#define SK_PNMI_HUNDREDS_SEC (t) ((((long)t) * 100) / (SK_TICKS_PER_SEC))#endif /*
Thanks, that fixed it =)
Signature · 1 line
Martin Schlemmer