From owner-svn-src-all@FreeBSD.ORG Mon Dec 14 22:30:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A790106566C; Mon, 14 Dec 2009 22:30:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3FF8FC13; Mon, 14 Dec 2009 22:30:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBEMU7rj040811; Mon, 14 Dec 2009 22:30:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBEMU7L6040809; Mon, 14 Dec 2009 22:30:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200912142230.nBEMU7L6040809@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Dec 2009 22:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200555 - head/sys/dev/vge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2009 22:30:07 -0000 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;