Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2006 20:27:05 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 89292 for review
Message-ID:  <200601062027.k06KR5gM041710@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=89292

Change 89292 by imp@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601062027.k06KR5gM041710>