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
This commit is contained in:
Pyun YongHyeon 2008-08-12 00:57:39 +00:00
parent 366dbcbd4a
commit f8e0f10069

View File

@ -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 */