On Wed, 2008-04-23 at 07:06 +0200, Markus Brunner wrote:
> On Wednesday 16 April 2008, Benjamin Herrenschmidt wrote:
>
> > Somebody knows off hand what the standard says the timeout should be ?
>
> Anyone?
>
> I didn't find any documentation on the standard, but I had a look at other
> drivers
On Wednesday 16 April 2008, Benjamin Herrenschmidt wrote:
> Somebody knows off hand what the standard says the timeout should be ?
Anyone?
I didn't find any documentation on the standard, but I had a look at other
drivers.
au1000_eth.c waits 20 ms (20 * 1ms) in mdio_read.
bfin_mac.c waits 500
> My Micrel/Kendin KSZ8721BT on my ppc405EP board needs one us longer to
> finish. I was able to reproduce this all the time. So I wonder if the
> timeout of 100us is defined by the MII standard, or by the author of
> the driver?
> If it's a standard I've still a bad feeling if we just correct the
The __emac_mdio_read function of the emac driver (core.c) will retry
100 times and wait 99us (until the last call of emac_phy_done). I
assume this is an off by one error.
/* Wait for read to complete */
n = 100;
while (!emac_phy_done(dev, (r = in_be32(&p->stacr {