From 8ec91020798747782330510cd3b4b55a0f534b9e Mon Sep 17 00:00:00 2001 From: yongari Date: Wed, 20 Aug 2008 04:51:09 +0000 Subject: MFC r181619: Restore link state handling which was broken in rev 1.69. Also report current link state while auto-negotiation is in progress. With this change link loss should be reported within a second and drivers that rely on link state should work. --- sys/dev/mii/brgphy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 0cde2d4..39651f1 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -376,16 +376,13 @@ brgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) break; } -#if 0 - /* Todo: Is this correct? */ /* Announce link loss right after it happens. */ if (sc->mii_ticks++ == 0) break; -#endif /* Only retry autonegotiation every mii_anegticks seconds. */ if (sc->mii_ticks <= sc->mii_anegticks) - goto brgphy_service_exit; + break; /* Retry autonegotiation */ -- cgit v1.1