LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Fix for drivers/net/natsemi.c on 64 bit platforms
@ 2001-10-07 18:01 Martin Frey
2001-10-07 18:08 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Martin Frey @ 2001-10-07 18:01 UTC (permalink / raw)
To: becker, jgarzik, tjeerd.mulder, torvalds, alan; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-10-07 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-07 18:01 Fix for drivers/net/natsemi.c on 64 bit platforms Martin Frey
2001-10-07 18:08 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).