Patchwork de2104x: wrong MAC address fix

login
register
mail settings
Submitter Martin Langer
Date Oct. 13, 2008, 6:04 p.m.
Message ID <20081013180459.GA3389@tuba>
Download mbox | patch
Permalink /patch/4301/
State Accepted
Delegated to: David Miller
Headers show

Comments

Martin Langer - Oct. 13, 2008, 6:04 p.m.
The de2104x returns sometimes a wrong MAC address. The wrong one is
like the original one, but it comes with an one byte shift. I found
this bug on an older alpha ev5 cpu. More details are available in Gentoo
bugreport #240718.

It seems the hardware is sometimes a little bit too slow for an
immediate access. This patch solves the problem by introducing a small
udelay.

Signed-off-by: Martin Langer <martin-langer@gmx.de>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Oct. 14, 2008, 1:49 a.m.
From: Martin Langer <martin-langer@gmx.de>
Date: Mon, 13 Oct 2008 20:04:59 +0200

> The de2104x returns sometimes a wrong MAC address. The wrong one is
> like the original one, but it comes with an one byte shift. I found
> this bug on an older alpha ev5 cpu. More details are available in Gentoo
> bugreport #240718.
> 
> It seems the hardware is sometimes a little bit too slow for an
> immediate access. This patch solves the problem by introducing a small
> udelay.
> 
> Signed-off-by: Martin Langer <martin-langer@gmx.de>

Looks good, applied, thanks Martin.

> --- drivers/net/tulip/de2104x.c_ORIGINAL	2008-10-10 00:13:53.000000000 +0200
> +++ drivers/net/tulip/de2104x.c	2008-10-11 19:04:32.000000000 +0200
> @@ -1689,6 +1689,7 @@

Please -p1 base your patches in the future.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- drivers/net/tulip/de2104x.c_ORIGINAL	2008-10-10 00:13:53.000000000 +0200
+++ drivers/net/tulip/de2104x.c	2008-10-11 19:04:32.000000000 +0200
@@ -1689,6 +1689,7 @@ 
 	unsigned i;
 
 	dw32 (ROMCmd, 0);	/* Reset the pointer with a dummy write. */
+	udelay(5);
 
 	for (i = 0; i < 6; i++) {
 		int value, boguscnt = 100000;