summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/alc/if_alc.c8
-rw-r--r--sys/dev/jme/if_jme.c12
2 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c
index 7b23fae..dac8d90 100644
--- a/sys/dev/alc/if_alc.c
+++ b/sys/dev/alc/if_alc.c
@@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/in_cksum.h>
@@ -2668,9 +2667,10 @@ alc_int_task(void *arg, int pending)
ifp = sc->alc_ifp;
status = CSR_READ_4(sc, ALC_INTR_STATUS);
- more = atomic_readandclear_int(&sc->alc_morework);
- if (more != 0)
+ if (sc->alc_morework != 0) {
+ sc->alc_morework = 0;
status |= INTR_RX_PKT;
+ }
if ((status & ALC_INTRS) == 0)
goto done;
@@ -2682,7 +2682,7 @@ alc_int_task(void *arg, int pending)
if ((status & INTR_RX_PKT) != 0) {
more = alc_rxintr(sc, sc->alc_process_limit);
if (more == EAGAIN)
- atomic_set_int(&sc->alc_morework, 1);
+ sc->alc_morework = 1;
else if (more == EIO) {
ALC_LOCK(sc);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c
index 8a8e931..70cbf41 100644
--- a/sys/dev/jme/if_jme.c
+++ b/sys/dev/jme/if_jme.c
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/in_cksum.h>
@@ -2181,7 +2180,7 @@ jme_link_task(void *arg, int pending)
* procuder/consumer index.
*/
sc->jme_cdata.jme_rx_cons = 0;
- atomic_set_int(&sc->jme_morework, 0);
+ sc->jme_morework = 0;
jme_init_tx_ring(sc);
/* Initialize shadow status block. */
jme_init_ssb(sc);
@@ -2251,10 +2250,9 @@ jme_int_task(void *arg, int pending)
ifp = sc->jme_ifp;
status = CSR_READ_4(sc, JME_INTR_STATUS);
- more = atomic_readandclear_int(&sc->jme_morework);
- if (more != 0) {
+ if (sc->jme_morework != 0) {
+ sc->jme_morework = 0;
status |= INTR_RXQ_COAL | INTR_RXQ_COAL_TO;
- more = 0;
}
if ((status & JME_INTRS) == 0 || status == 0xFFFFFFFF)
goto done;
@@ -2270,7 +2268,7 @@ jme_int_task(void *arg, int pending)
if ((status & (INTR_RXQ_COAL | INTR_RXQ_COAL_TO)) != 0) {
more = jme_rxintr(sc, sc->jme_process_limit);
if (more != 0)
- atomic_set_int(&sc->jme_morework, 1);
+ sc->jme_morework = 1;
}
if ((status & INTR_RXQ_DESC_EMPTY) != 0) {
/*
@@ -2980,7 +2978,7 @@ jme_init_rx_ring(struct jme_softc *sc)
sc->jme_cdata.jme_rx_cons = 0;
JME_RXCHAIN_RESET(sc);
- atomic_set_int(&sc->jme_morework, 0);
+ sc->jme_morework = 0;
rd = &sc->jme_rdata;
bzero(rd->jme_rx_ring, JME_RX_RING_SIZE);
OpenPOWER on IntegriCloud