Remove unecessary and clearly wrong usage of atomic(9).
Reported by: avg, jhb, attilio
This commit is contained in:
parent
7c103dde1e
commit
7e86a37e0d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216362
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user