PERFORCE change 89292 for review
Warner Losh
imp at FreeBSD.org
Fri Jan 6 12:27:06 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=89292
Change 89292 by imp at imp_Speedy on 2006/01/06 20:26:04
A short delay is needed before reading the management registers.
The reason is unknown. Maybe there's a back to back problem with
certain registers. We hang otherwise. Noticed this when it worked
with debug but failed w/o it. DEALY(1) is currently about 7.812ms,
but this code works with delays as short as 10us (maybe even smaller).
Affected files ...
.. //depot/projects/arm/src/sys/arm/at91/if_ate.c#13 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#13 (text+ko) ====
@@ -587,7 +587,10 @@
* XXX to make sure that the clock to the emac is on here
*/
+ if (phy != 0)
+ return (0xffff);
sc = device_get_softc(dev);
+ DELAY(1); /* Hangs w/o this delay really 7.812ms atm */
WR4(sc, ETH_MAN, ETH_MAN_REG_RD(phy, reg));
while ((RD4(sc, ETH_SR) & ETH_SR_IDLE) == 0)
continue;
More information about the p4-projects
mailing list