diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index 3478970493e3..455c97cc3a3e 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -1655,7 +1655,7 @@ txp_ifmedia_sts(ifp, ifmr) { struct txp_softc *sc = ifp->if_softc; struct ifmedia *ifm = &sc->sc_ifmedia; - u_int16_t bmsr, bmcr, anlpar; + u_int16_t bmsr, bmcr, anar, anlpar; ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -1675,6 +1675,10 @@ txp_ifmedia_sts(ifp, ifmr) if (txp_command(sc, TXP_CMD_PHY_MGMT_READ, 0, MII_ANLPAR, 0, &anlpar, NULL, NULL, 1)) goto bail; + + if (txp_command(sc, TXP_CMD_PHY_MGMT_READ, 0, MII_ANAR, 0, + &anar, NULL, NULL, 1)) + goto bail; TXP_UNLOCK(sc); if (bmsr & BMSR_LINK) @@ -1695,6 +1699,7 @@ txp_ifmedia_sts(ifp, ifmr) return; } + anlpar &= anar; if (anlpar & ANLPAR_TX_FD) ifmr->ifm_active |= IFM_100_TX|IFM_FDX; else if (anlpar & ANLPAR_T4)