From 4e7b72e030919b1353a2e36492c6a1bdef5f8caf Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Thu, 28 Jun 2012 13:54:54 +0800 Subject: [PATCH] bge: In bge_stop, don't isolate PHY; it is unnecessary --- sys/dev/netif/bge/if_bge.c | 26 -------------------------- 1 files changed, 0 insertions(+), 26 deletions(-) diff --git a/sys/dev/netif/bge/if_bge.c b/sys/dev/netif/bge/if_bge.c index b54fe9b..c7a4877 100644 --- a/sys/dev/netif/bge/if_bge.c +++ b/sys/dev/netif/bge/if_bge.c @@ -3256,15 +3256,9 @@ static void bge_stop(struct bge_softc *sc) { struct ifnet *ifp = &sc->arpcom.ac_if; - struct ifmedia_entry *ifm; - struct mii_data *mii = NULL; - int mtmp, itmp; ASSERT_SERIALIZED(ifp->if_serializer); - if ((sc->bge_flags & BGE_FLAG_TBI) == 0) - mii = device_get_softc(sc->bge_miibus); - callout_stop(&sc->bge_stat_timer); /* @@ -3324,26 +3318,6 @@ bge_stop(struct bge_softc *sc) /* Free TX buffers. */ bge_free_tx_ring(sc); - /* - * Isolate/power down the PHY, but leave the media selection - * unchanged so that things will be put back to normal when - * we bring the interface back up. - * - * 'mii' may be NULL in the following cases: - * - The device uses TBI. - * - bge_stop() is called by bge_detach(). - */ - if (mii != NULL) { - itmp = ifp->if_flags; - ifp->if_flags |= IFF_UP; - ifm = mii->mii_media.ifm_cur; - mtmp = ifm->ifm_media; - ifm->ifm_media = IFM_ETHER|IFM_NONE; - mii_mediachg(mii); - ifm->ifm_media = mtmp; - ifp->if_flags = itmp; - } - sc->bge_link = 0; sc->bge_coal_chg = 0; -- 1.7.7.2