From f8e0f10069ed0dc5edda79f7e7694a99afadc00d Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Tue, 12 Aug 2008 00:57:39 +0000 Subject: [PATCH] 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. Reported by: Pete French < petefrench at ticketswitch dot com > Tested by: Pete French < petefrench at ticketswitch dot com > MFC after: 1 week --- sys/dev/mii/brgphy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index c7b4d1cc3b5..8884354f90b 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -372,16 +372,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 */