svn commit: r200555 - head/sys/dev/vge
Pyun YongHyeon
yongari at FreeBSD.org
Mon Dec 14 14:30:07 PST 2009
Author: yongari
Date: Mon Dec 14 22:30:07 2009
New Revision: 200555
URL: http://svn.freebsd.org/changeset/base/200555
Log:
Don't report current link status if interface is not UP.
If interface is not UP, the current link status wouldn't
reflect the negotiated status.
Modified:
head/sys/dev/vge/if_vge.c
Modified: head/sys/dev/vge/if_vge.c
==============================================================================
--- head/sys/dev/vge/if_vge.c Mon Dec 14 22:28:32 2009 (r200554)
+++ head/sys/dev/vge/if_vge.c Mon Dec 14 22:30:07 2009 (r200555)
@@ -2177,6 +2177,10 @@ vge_ifmedia_sts(struct ifnet *ifp, struc
mii = device_get_softc(sc->vge_miibus);
VGE_LOCK(sc);
+ if ((ifp->if_flags & IFF_UP) == 0) {
+ VGE_UNLOCK(sc);
+ return;
+ }
mii_pollstat(mii);
VGE_UNLOCK(sc);
ifmr->ifm_active = mii->mii_media_active;
More information about the svn-src-all
mailing list