diff options
author | yongari <yongari@FreeBSD.org> | 2010-12-10 21:43:20 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2010-12-10 21:43:20 +0000 |
commit | 81c937f5ec6be6ade7190caad0f0f41263535b5c (patch) | |
tree | 0f7858e2019fdc3787a809c8eeed2ff4d98eb16f /sys/dev/alc | |
parent | ff1d787db7946285069059143079c2906cf1725e (diff) | |
download | FreeBSD-src-81c937f5ec6be6ade7190caad0f0f41263535b5c.zip FreeBSD-src-81c937f5ec6be6ade7190caad0f0f41263535b5c.tar.gz |
Remove unecessary and clearly wrong usage of atomic(9).
Reported by: avg, jhb, attilio
Diffstat (limited to 'sys/dev/alc')
-rw-r--r-- | sys/dev/alc/if_alc.c | 8 |
1 files changed, 4 insertions, 4 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; |