[PATCH] emac: fix mdio delay

Matt Porter mporter at kernel.crashing.org
Wed Feb 9 16:43:45 EST 2005


Fixes MDIO delay. Please apply.

Signed-off-by: Ralph Siemsen <ralphs at netwinder.org>
Signed-off-by: Matt Porter <mporter at kernel.crashing.org>

--- linux-2.6.10-orig/drivers/net/ibm_emac/ibm_emac_core.c	2005-01-20 15:45:28.576226303 -0500
+++ linux-2.6.10/drivers/net/ibm_emac/ibm_emac_core.c	2005-01-20 15:25:10.430674655 -0500
@@ -475,8 +479,9 @@
 
 	out_be32(&emacp->em0stacr, stacr);
 
-	while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0)
-					&& (count++ < 5000))
+	count = 0;
+	while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0)
+					&& (count++ < MDIO_DELAY))
 		udelay(1);
 	MDIO_DEBUG((" (count was %d)\n", count));



More information about the Linuxppc-embedded mailing list