Date: Wed, 23 Dec 2009 18:28:47 +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: r200907 - head/sys/dev/ste Message-ID: <200912231828.nBNISl5Y005657@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Wed Dec 23 18:28:47 2009 New Revision: 200907 URL: http://svn.freebsd.org/changeset/base/200907 Log: Don't report link status if driver is not running. Modified: head/sys/dev/ste/if_ste.c Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Wed Dec 23 18:24:22 2009 (r200906) +++ head/sys/dev/ste/if_ste.c Wed Dec 23 18:28:47 2009 (r200907) @@ -486,6 +486,10 @@ ste_ifmedia_sts(struct ifnet *ifp, struc mii = device_get_softc(sc->ste_miibus); STE_LOCK(sc); + if ((ifp->if_flags & IFF_UP) == 0) { + STE_UNLOCK(sc); + return; + } mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912231828.nBNISl5Y005657>