Date: Thu, 27 Jan 2011 18:31:07 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r217948 - in stable/8/sys/dev: alc jme Message-ID: <201101271831.p0RIV7It028215@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Thu Jan 27 18:31:07 2011 New Revision: 217948 URL: http://svn.freebsd.org/changeset/base/217948 Log: MFC r216362: Remove unecessary and clearly wrong usage of atomic(9). Modified: stable/8/sys/dev/alc/if_alc.c stable/8/sys/dev/jme/if_jme.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/alc/if_alc.c ============================================================================== --- stable/8/sys/dev/alc/if_alc.c Thu Jan 27 16:47:33 2011 (r217947) +++ stable/8/sys/dev/alc/if_alc.c Thu Jan 27 18:31:07 2011 (r217948) @@ -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; Modified: stable/8/sys/dev/jme/if_jme.c ============================================================================== --- stable/8/sys/dev/jme/if_jme.c Thu Jan 27 16:47:33 2011 (r217947) +++ stable/8/sys/dev/jme/if_jme.c Thu Jan 27 18:31:07 2011 (r217948) @@ -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> @@ -2189,7 +2188,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); @@ -2259,10 +2258,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; @@ -2278,7 +2276,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) { /* @@ -2988,7 +2986,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101271831.p0RIV7It028215>