From owner-svn-src-user@FreeBSD.ORG  Mon Oct 24 15:50:23 2011
Return-Path: <owner-svn-src-user@FreeBSD.ORG>
Delivered-To: svn-src-user@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7C047106566C;
	Mon, 24 Oct 2011 15:50:23 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6C4D78FC19;
	Mon, 24 Oct 2011 15:50:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9OFoNoZ050673;
	Mon, 24 Oct 2011 15:50:23 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OFoN1V050671;
	Mon, 24 Oct 2011 15:50:23 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110241550.p9OFoN1V050671@svn.freebsd.org>
From: Adrian Chadd <adrian@FreeBSD.org>
Date: Mon, 24 Oct 2011 15:50:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
X-SVN-Group: user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226694 - user/adrian/if_ath_tx/sys/dev/ath
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
	src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>,
	<mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Oct 2011 15:50:23 -0000

Author: adrian
Date: Mon Oct 24 15:50:23 2011
New Revision: 226694
URL: http://svn.freebsd.org/changeset/base/226694

Log:
  Stick the imask update behind ATH_LOCK, so it's done atomically.
  
  The rest of ath_hal_intrset() calls aren't done behind locks though,
  neither are the imask updates/fetches. That'll come in a later
  commit.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Mon Oct 24 14:50:56 2011	(r226693)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Mon Oct 24 15:50:23 2011	(r226694)
@@ -1425,7 +1425,7 @@ ath_intr(void *arg)
 			}
 		}
 		if (status & HAL_INT_RXEOL) {
-			int imask = sc->sc_imask;
+			int imask;
 			CTR0(ATH_KTR_ERR, "ath_intr: RXEOL");
 			/*
 			 * NB: the hardware should re-read the link when
@@ -1443,6 +1443,7 @@ ath_intr(void *arg)
 			 * interrupt mask will be correctly reprogrammed.
 			 */
 			ATH_LOCK(sc);
+			imask = sc->sc_imask;
 			imask &= ~(HAL_INT_RXEOL | HAL_INT_RXORN);
 			ath_hal_intrset(ah, imask);
 			/*