From owner-svn-src-head@FreeBSD.ORG Mon May 25 07:50:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E03C0106564A; Mon, 25 May 2009 07:50:14 +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 CF3178FC1E; Mon, 25 May 2009 07:50:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4P7oE8E015362; Mon, 25 May 2009 07:50:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4P7oEYb015361; Mon, 25 May 2009 07:50:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200905250750.n4P7oEYb015361@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 25 May 2009 07:50:14 +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: r192737 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 07:50:15 -0000 Author: yongari Date: Mon May 25 07:50:14 2009 New Revision: 192737 URL: http://svn.freebsd.org/changeset/base/192737 Log: If interface is not UP, don't return media status. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon May 25 07:48:00 2009 (r192736) +++ head/sys/dev/msk/if_msk.c Mon May 25 07:50:14 2009 (r192737) @@ -904,6 +904,10 @@ msk_mediastatus(struct ifnet *ifp, struc sc_if = ifp->if_softc; MSK_IF_LOCK(sc_if); + if ((ifp->if_flags & IFF_UP) == 0) { + MSK_IF_UNLOCK(sc_if); + return; + } mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii);