diff options
author | scottl <scottl@FreeBSD.org> | 2004-08-11 04:30:49 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-08-11 04:30:49 +0000 |
commit | a3fba644404cdf23b516738878b4813300347454 (patch) | |
tree | e0e8378a02d7d69215a9a8ef533370b26bf53f8f /sys/pci/if_vr.c | |
parent | eed836416f8ff081066d3259497daa57fd0e9af6 (diff) | |
download | FreeBSD-src-a3fba644404cdf23b516738878b4813300347454.zip FreeBSD-src-a3fba644404cdf23b516738878b4813300347454.tar.gz |
Revert rev 1.93 and replace it by grabbing the vr lock before calling
mii_pollstat(). The previous was causing the vr lock to recurse.
PR: kern/70189
Diffstat (limited to 'sys/pci/if_vr.c')
-rw-r--r-- | sys/pci/if_vr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 9f7025b..b1eeebb 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -503,9 +503,7 @@ vr_miibus_statchg(device_t dev) struct vr_softc *sc = device_get_softc(dev); mii = device_get_softc(sc->vr_miibus); - VR_LOCK(sc); vr_setcfg(sc, mii->mii_media_active); - VR_UNLOCK(sc); } /* @@ -1563,7 +1561,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) struct mii_data *mii; mii = device_get_softc(sc->vr_miibus); + VR_LOCK(sc); mii_pollstat(mii); + VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; } |