Re: Phy read timeout in ibm_new_emac driver

2008-04-22 Thread Benjamin Herrenschmidt
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

Re: Phy read timeout in ibm_new_emac driver

2008-04-22 Thread Markus Brunner
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

Re: Phy read timeout in ibm_new_emac driver

2008-04-16 Thread Benjamin Herrenschmidt
> 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

Phy read timeout in ibm_new_emac driver

2008-04-16 Thread M B
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 {