Date: Thu, 27 Jan 2011 18:37:10 +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: r217950 - stable/8/sys/dev/ale Message-ID: <201101271837.p0RIbARJ028595@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Thu Jan 27 18:37:10 2011 New Revision: 217950 URL: http://svn.freebsd.org/changeset/base/217950 Log: MFC r216438: Remove unecessary and clearly wrong usage of atomic(9). Modified: stable/8/sys/dev/ale/if_ale.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/ale/if_ale.c ============================================================================== --- stable/8/sys/dev/ale/if_ale.c Thu Jan 27 18:34:05 2011 (r217949) +++ stable/8/sys/dev/ale/if_ale.c Thu Jan 27 18:37:10 2011 (r217950) @@ -66,7 +66,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> @@ -2284,8 +2283,7 @@ ale_int_task(void *arg, int pending) sc = (struct ale_softc *)arg; status = CSR_READ_4(sc, ALE_INTR_STATUS); - more = atomic_readandclear_int(&sc->ale_morework); - if (more != 0) + if (sc->ale_morework != 0) status |= INTR_RX_PKT; if ((status & ALE_INTRS) == 0) goto done; @@ -2298,7 +2296,7 @@ ale_int_task(void *arg, int pending) if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { more = ale_rxeof(sc, sc->ale_process_limit); if (more == EAGAIN) - atomic_set_int(&sc->ale_morework, 1); + sc->ale_morework = 1; else if (more == EIO) { ALE_LOCK(sc); sc->ale_stats.reset_brk_seq++; @@ -3002,7 +3000,7 @@ ale_init_rx_pages(struct ale_softc *sc) ALE_LOCK_ASSERT(sc); - atomic_set_int(&sc->ale_morework, 0); + sc->ale_morework = 0; sc->ale_cdata.ale_rx_seqno = 0; sc->ale_cdata.ale_rx_curp = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101271837.p0RIbARJ028595>