Index: sys/dev/bce/if_bce.c =================================================================== --- sys/dev/bce/if_bce.c (revision 233154) +++ sys/dev/bce/if_bce.c (working copy) @@ -1462,6 +1462,10 @@ * still running. */ bce_pulse(sc); + /* Track ASF/IPMI link state change. */ + sc->bce_link_tick = TRUE; + sc->bce_link_up = FALSE; + callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); bce_mgmt_init_locked(sc); BCE_UNLOCK(sc); @@ -1992,8 +1996,7 @@ ifp = sc->bce_ifp; mii = device_get_softc(sc->bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if (mii == NULL || ifp == NULL) return; sc->bce_link_up = FALSE; @@ -2038,9 +2041,6 @@ } } - if (sc->bce_link_up == FALSE) - return; - /* Set half or full duplex based on PHY settings. */ if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -8193,24 +8193,23 @@ BCE_LOCK_ASSERT(sc); - /* Schedule the next tick. */ - callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* Update the statistics from the hardware statistics block. */ + bce_stats_update(sc); - /* Update the statistics from the hardware statistics block. */ - bce_stats_update(sc); + /* + * ToDo: This is a safety measure. Need to re-evaluate + * high level processing logic and eliminate this code. + */ + /* Top off the receive and page chains. */ + if (bce_hdr_split == TRUE) + bce_fill_pg_chain(sc); + bce_fill_rx_chain(sc); - /* - * ToDo: This is a safety measure. Need to re-evaluate - * high level processing logic and eliminate this code. - */ - /* Top off the receive and page chains. */ - if (bce_hdr_split == TRUE) - bce_fill_pg_chain(sc); - bce_fill_rx_chain(sc); + /* Check that chip hasn't hung. */ + bce_watchdog(sc); + } - /* Check that chip hasn't hung. */ - bce_watchdog(sc); - /* If link is up already up then we're done. */ if (sc->bce_link_tick == FALSE && sc->bce_link_up == TRUE) goto bce_tick_exit; @@ -8219,17 +8218,22 @@ mii = device_get_softc(sc->bce_miibus); mii_tick(mii); - sc->bce_link_tick = FALSE; - /* Now that link is up, handle any outstanding TX traffic. */ - if (sc->bce_link_up == TRUE && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - DBPRINT(sc, BCE_VERBOSE_MISC, - "%s(): Found pending TX traffic.\n", __FUNCTION__); - bce_start_locked(ifp); + if (sc->bce_link_up == TRUE) { + sc->bce_link_tick = FALSE; + /* Now that link is up, handle any outstanding TX traffic. */ + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + DBPRINT(sc, BCE_VERBOSE_MISC, + "%s(): Found pending TX traffic.\n", __FUNCTION__); + bce_start_locked(ifp); + } } bce_tick_exit: + /* Schedule the next tick. */ + callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); + DBEXIT(BCE_EXTREME_MISC); - return; } #ifdef BCE_DEBUG