mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-03 23:28:58 +00:00
Reset autonegotation timer if media option is not IFM_AUTO.
Make mii_ticks advance, autonegiation is retried every mii_anegticks seconds.
This commit is contained in:
parent
55da31830a
commit
5f36bdfcc2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173667
|
@ -397,8 +397,10 @@ e1000phy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
|
|||
/*
|
||||
* Only used for autonegotiation.
|
||||
*/
|
||||
if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
|
||||
if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
|
||||
sc->mii_ticks = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* check for link.
|
||||
|
@ -411,6 +413,8 @@ e1000phy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
|
|||
}
|
||||
|
||||
/* Announce link loss right after it happens. */
|
||||
if (sc->mii_ticks++ == 0)
|
||||
break;
|
||||
if (sc->mii_ticks <= sc->mii_anegticks)
|
||||
return (0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue