From owner-svn-src-user@FreeBSD.ORG Thu Sep 15 09:22:46 2011 Return-Path: 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 8B19C1065672; Thu, 15 Sep 2011 09:22:46 +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 7A82D8FC0C; Thu, 15 Sep 2011 09:22:46 +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 p8F9Mk0j065721; Thu, 15 Sep 2011 09:22:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8F9MkDE065719; Thu, 15 Sep 2011 09:22:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109150922.p8F9MkDE065719@svn.freebsd.org> From: Adrian Chadd Date: Thu, 15 Sep 2011 09:22:46 +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: r225573 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 09:22:46 -0000 Author: adrian Date: Thu Sep 15 09:22:46 2011 New Revision: 225573 URL: http://svn.freebsd.org/changeset/base/225573 Log: Fix the interrupt mitigation stuff, now that I know what's going on. * If the RX mitigation interrupts fire, set HAL_INT_RX and clear the relevant underlying interrupt(s) as well. * If the TX mitigation interrupts fire, set HAL_INT_TX * If any of the TX status bits (ok, err, desc, eol) are set, update the TX bitmask, but don't set HAL_INT_TX if TX interrupt mitigation is enabled. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Sep 15 09:06:28 2011 (r225572) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Sep 15 09:22:46 2011 (r225573) @@ -144,12 +144,29 @@ ar5416GetPendingInterrupts(struct ath_ha */ *masked = isr & HAL_INT_COMMON; - if (isr & (AR_ISR_RXOK | AR_ISR_RXERR | AR_ISR_RXMINTR | - AR_ISR_RXINTM)) +#ifdef AH_AR5416_INTERRUPT_MITIGATION + if (isr & (AR_ISR_RXMINTR | AR_ISR_RXINTM)) { + *masked |= HAL_INT_RX; + } + if (isr & (AR_ISR_TXMINTR | AR_ISR_TXINTM)) { + *masked |= HAL_INT_TX; + } +#endif + + /* + * Don't signal this when doing interrupt mitigation + */ +#ifndef AH_AR5416_INTERRUPT_MITIGATION + if (isr & (AR_ISR_RXOK | AR_ISR_RXERR)) *masked |= HAL_INT_RX; - if (isr & (AR_ISR_TXOK | AR_ISR_TXDESC | AR_ISR_TXERR | - AR_ISR_TXEOL | AR_ISR_TXMINTR | AR_ISR_TXINTM)) { +#endif + + if (isr & (AR_ISR_TXOK | AR_ISR_TXDESC | AR_ISR_TXERR | AR_ISR_TXEOL)) { + +#ifndef AH_AR5416_INTERRUPT_MITIGATION *masked |= HAL_INT_TX; +#endif + if (pCap->halUseIsrRac) { isr0 = OS_REG_READ(ah, AR_ISR_S0_S); isr1 = OS_REG_READ(ah, AR_ISR_S1_S);