Subject: Re: [PATCH] 44x ethernet MDIO access

From: Ralph Siemsen <[email-masked]>
Date: Fri, 06 Aug 2004 09:04:07 -0400

Geert Uytterhoeven wrote:
>>-	udelay(MDIO_DELAY);
>>+	count = 0;
>>+	while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0)
>>+					&& (count++ < 5000))
>
>                                                       ^^^^
> 						      MDIO_DELAY?
>
> And perhaps you want to create a (possibly inlined) function just for this
> loop?

Good catch - yes, should be MDIO_DELAY not 5000.  I had found that 50
was not enough so I had upped it in my testing - forgot to change it back :(

I'd also suggest the default MDIO_DELAY be increased from its present
value of 50 to perhaps 100 or 150...  Does anyone know what the slowest
possible EPB clock speed is?

-R

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/