lkml.org 
[lkml]   [2001]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectFix for drivers/net/natsemi.c on 64 bit platforms
Date
Hi,

the natsemi.c Ethernet driver cuts the upper bits of
the address when accessing the EEPROM. Changing "int ee_addr"
to "long ee_addr" in eeprom_read() fixes the problem for me on Alpha.
The Bug is in the 2.2.x driver from Donald as
well as in the 2.4.x driver. I tested the patch
only on 2.4.x however, since it is actually trivial, I guess
it will also work for Donalds version.

Here is the patch for 2.4.10:
--- linux-2.4.10/drivers/net/natsemi.c Tue Aug 14 13:14:12 2001
+++ linux-2.4.10.digitalpw/drivers/net/natsemi.c Fri Oct 5 13:25:59 2001
@@ -633,7 +633,7 @@
{
int i;
int retval = 0;
- int ee_addr = addr + EECtrl;
+ long ee_addr = addr + EECtrl;
int read_cmd = location | EE_ReadCmd;
writel(EE_Write0, ee_addr);

and here for the driver on the Scyld page:
--- natsemi.c.orig Sun Oct 7 13:49:03 2001
+++ natsemi.c Sun Oct 7 13:49:16 2001
@@ -499,7 +499,7 @@
{
int i;
int retval = 0;
- int ee_addr = addr + EECtrl;
+ long ee_addr = addr + EECtrl;
int read_cmd = location | EE_ReadCmd;
writel(EE_Write0, ee_addr);

Regards, Martin
--
Supercomputing Systems AG email: frey@scs.ch
Martin Frey web: http://www.scs.ch/~frey/
at Compaq Computer Corporation phone: +1 603 884 4266
ZKO2-3R75, 110 Spit Brook Road, Nashua, NH 03062

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:04    [W:0.037 / U:2.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site