*** brgphy.c.orig Fri Apr 23 16:20:46 2004 --- brgphy.c Fri Apr 23 16:23:55 2004 *************** *** 358,363 **** --- 358,376 ---- reg = PHY_READ(sc, BRGPHY_MII_AUXSTS); if (reg & BRGPHY_AUXSTS_LINK) break; + else { + /* + * If the link has gone down and we previously + * thought it was up, update our status and trigger + * a notification. + */ + if ((sc->mii_pdata->mii_media_status & + (IFM_AVALID|IFM_ACTIVE)) == + (IFM_AVALID|IFM_ACTIVE)) { + sc->mii_pdata->mii_media_status &= ~IFM_ACTIVE; + mii_phy_update(sc, MII_TICK); + } + } /* * Only retry autonegotiation every 5 seconds.