Fix for drivers/net/natsemi.c on 64 bit platforms
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:
drivers/net/natsemi.c Fri Oct 5 13:25:59 2001 renamed from drivers/net/natsemi.c Tue Aug 14 13:14:12 2001 +1 -1
@@ -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 Sun Oct 7 13:49:16 2001 renamed from natsemi.c.orig Sun Oct 7 13:49:03 2001 +1 -1
@@ -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
Signature · 4 lines
Supercomputing Systems AG email: [email protected] 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
Thanks, modified slightly and applied to at1700.c, natsemi.c, and winbond-840.c. Patches to Alan and Linus will be sent shortly...
Jeff