diff options
author | dg <dg@FreeBSD.org> | 2000-09-17 22:20:33 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 2000-09-17 22:20:33 +0000 |
commit | 7d81424343a25645da917df7cfc8719456cda90d (patch) | |
tree | 4e5d51583f64ddcc38d110aa23f9dbbf022b7821 /sys/pci | |
parent | 6fd9f8fc68d398e4231dd400462cb261b6701c5d (diff) | |
download | FreeBSD-src-7d81424343a25645da917df7cfc8719456cda90d.zip FreeBSD-src-7d81424343a25645da917df7cfc8719456cda90d.tar.gz |
Attempt to replicate the new fxp SMP locking in the changes committed
in the previous (APM suspend/resume) commit.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_fxp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index e1539e1..e9689ef 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -713,9 +713,10 @@ static int fxp_suspend(device_t dev) { struct fxp_softc *sc = device_get_softc(dev); - int i, s; + int i; + FXP_SPLVAR(s) - s = splimp(); + FXP_LOCK(sc, s); fxp_stop(sc); @@ -728,7 +729,7 @@ fxp_suspend(device_t dev) sc->suspended = 1; - splx(s); + FXP_UNLOCK(sc, s); return 0; } @@ -744,9 +745,10 @@ fxp_resume(device_t dev) struct fxp_softc *sc = device_get_softc(dev); struct ifnet *ifp = &sc->sc_if; u_int16_t pci_command; - int i, s; + int i; + FXP_SPLVAR(s) - s = splimp(); + FXP_LOCK(sc, s); /* better way to do this? */ for (i=0; i<5; i++) @@ -770,7 +772,7 @@ fxp_resume(device_t dev) sc->suspended = 0; - splx(s); + FXP_UNLOCK(sc, s); return 0; } |