summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2009-12-07 19:18:23 +0000
committeryongari <yongari@FreeBSD.org>2009-12-07 19:18:23 +0000
commitd2f988bfb0c6cf7b98bcd748379996cdeb13243a (patch)
treeccf164145294ddc6b5a2fe365441bdb72971d2f3 /sys/dev/bge
parentf9cc15ef224b876533b13c9f05c65f6e2fbbad0b (diff)
downloadFreeBSD-src-d2f988bfb0c6cf7b98bcd748379996cdeb13243a.zip
FreeBSD-src-d2f988bfb0c6cf7b98bcd748379996cdeb13243a.tar.gz
Remove PHY isolate/power down code in bge_stop(). The isolation
handler in brgphy(4) does not exist and brgphy(4) just resets the PHY and returns EINVAL as it has no isolation handler. I also agree on Marius's opinion that stop handler of every NIC driver seems to be the wrong place for implementing PHY isolate/power down. If we need PHY isolate/power down it should be implemented in brgphy(4) and users should administratively down the PHY. Reviewed by: marius
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index b42d44f..cb85973 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -4588,17 +4588,11 @@ static void
bge_stop(struct bge_softc *sc)
{
struct ifnet *ifp;
- struct ifmedia_entry *ifm;
- struct mii_data *mii = NULL;
- int mtmp, itmp;
BGE_LOCK_ASSERT(sc);
ifp = sc->bge_ifp;
- if ((sc->bge_flags & BGE_FLAG_TBI) == 0)
- mii = device_get_softc(sc->bge_miibus);
-
callout_stop(&sc->bge_stat_ch);
/* Disable host interrupts. */
@@ -4672,27 +4666,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.
- */
- if ((sc->bge_flags & BGE_FLAG_TBI) == 0) {
- itmp = ifp->if_flags;
- ifp->if_flags |= IFF_UP;
- /*
- * If we are called from bge_detach(), mii is already NULL.
- */
- if (mii != NULL) {
- 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_tx_saved_considx = BGE_TXCONS_UNSET;
/* Clear MAC's link state (PHY may still have link UP). */
OpenPOWER on IntegriCloud