svn commit: r229061 - stable/9/sys/dev/et

Pyun YongHyeon yongari at FreeBSD.org
Sat Dec 31 01:30:43 UTC 2011


Author: yongari
Date: Sat Dec 31 01:30:43 2011
New Revision: 229061
URL: http://svn.freebsd.org/changeset/base/229061

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/9/sys/dev/et/if_et.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/et/if_et.c
==============================================================================
--- stable/9/sys/dev/et/if_et.c	Sat Dec 31 01:22:16 2011	(r229060)
+++ stable/9/sys/dev/et/if_et.c	Sat Dec 31 01:30:43 2011	(r229061)
@@ -518,9 +518,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp)
 
 	LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
 		PHY_RESET(miisc);
-	mii_mediachg(mii);
-
-	return (0);
+	return (mii_mediachg(mii));
 }
 
 static int
@@ -542,9 +540,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


More information about the svn-src-stable-9 mailing list