From owner-svn-src-head@FreeBSD.ORG Sun Apr 27 23:31:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D71A27D; Sun, 27 Apr 2014 23:31:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AB09CFE; Sun, 27 Apr 2014 23:31:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3RNVhhf004537; Sun, 27 Apr 2014 23:31:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3RNVhp4004535; Sun, 27 Apr 2014 23:31:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201404272331.s3RNVhp4004535@svn.freebsd.org> From: Adrian Chadd Date: Sun, 27 Apr 2014 23:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265029 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 23:31:43 -0000 Author: adrian Date: Sun Apr 27 23:31:42 2014 New Revision: 265029 URL: http://svnweb.freebsd.org/changeset/base/265029 Log: Do a read-after-write to ensure the interrupt register update is flushed to the hardware. The QCA HAL has a comment noting that if this isn't done, modifications to AR_IMR_S2 before AR_IMR is flushed may produce spurious interrupts. Obtained from: QCA Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Sun Apr 27 22:18:33 2014 (r265028) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Sun Apr 27 23:31:42 2014 (r265029) @@ -337,6 +337,9 @@ ar5416SetInterrupts(struct ath_hal *ah, /* Write the new IMR and store off our SW copy. */ HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: new IMR 0x%x\n", __func__, mask); OS_REG_WRITE(ah, AR_IMR, mask); + /* Flush write */ + (void) OS_REG_READ(ah, AR_IMR); + mask = OS_REG_READ(ah, AR_IMR_S2) & ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC |