aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>2000-09-17 22:20:33 +0000
committerDavid Greenman <dg@FreeBSD.org>2000-09-17 22:20:33 +0000
commit2053b07d7ef1e5b917fa2e7fc7f6d8cb339014ca (patch)
treed2f3c72a9c3083f41a29d8e82187eb8aa15643e7
parent7dced78a28d4305fa29c3a78980ff483fe37714b (diff)
Notes
-rw-r--r--sys/dev/fxp/if_fxp.c14
-rw-r--r--sys/pci/if_fxp.c14
2 files changed, 16 insertions, 12 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index e1539e17b380..e9689ef3d3fc 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/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;
}
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index e1539e17b380..e9689ef3d3fc 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;
}