Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 2009 22:30:07 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200555 - head/sys/dev/vge
Message-ID:  <200912142230.nBEMU7L6040809@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912142230.nBEMU7L6040809>