Date: Sat, 31 Dec 2011 01:32:06 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r229062 - in stable/8/sys: conf dev/et Message-ID: <201112310132.pBV1W6m4040550@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Sat Dec 31 01:32:06 2011 New Revision: 229062 URL: http://svn.freebsd.org/changeset/base/229062 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/8/sys/dev/et/if_et.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/et/if_et.c ============================================================================== --- stable/8/sys/dev/et/if_et.c Sat Dec 31 01:30:43 2011 (r229061) +++ stable/8/sys/dev/et/if_et.c Sat Dec 31 01:32:06 2011 (r229062) @@ -519,9 +519,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -543,9 +541,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112310132.pBV1W6m4040550>