svn commit: r225573 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416

Adrian Chadd adrian at FreeBSD.org
Thu Sep 15 09:22:46 UTC 2011


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);


More information about the svn-src-user mailing list