summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-11-08 22:50:28 +0000
committeradrian <adrian@FreeBSD.org>2011-11-08 22:50:28 +0000
commit778aebbf9d6aa18654debee70a735ac0e46229d0 (patch)
treee48212686266192ed8e1ee9e9a1f3358d0ab8477 /sys/dev/ath/if_ath.c
parentb9db55d70c692c1fcbece0d482e2387d38dc632b (diff)
downloadFreeBSD-src-778aebbf9d6aa18654debee70a735ac0e46229d0.zip
FreeBSD-src-778aebbf9d6aa18654debee70a735ac0e46229d0.tar.gz
Fix the KTR option to compile by default - it was referencing
some unmerged interrupt status debugging code from my branch. * Add ah_intrstate[8] which will have the record of the last call to ath_hal_getintr(). * Wrap the KTR code behind ATH_KTR_INTR_DEBUG. * Add the HAL interrupt debugging behind AH_INTERRUPT_DEBUGGING. This is only done for the AR5416 and later NICs but it will be trivial to add to the earlier NICs if required. Neither are enabled by default, although to minimise HAL binary API differences, the ah_intrstate[] array is always compiled into the ath_hal struct.
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 210b965..ac2dd2a 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -1376,6 +1376,7 @@ ath_intr(void *arg)
ath_hal_getisr(ah, &status); /* NB: clears ISR too */
DPRINTF(sc, ATH_DEBUG_INTR, "%s: status 0x%x\n", __func__, status);
CTR1(ATH_KTR_INTR, "ath_intr: mask=0x%.8x", status);
+#ifdef ATH_KTR_INTR_DEBUG
CTR5(ATH_KTR_INTR,
"ath_intr: ISR=0x%.8x, ISR_S0=0x%.8x, ISR_S1=0x%.8x, ISR_S2=0x%.8x, ISR_S5=0x%.8x",
ah->ah_intrstate[0],
@@ -1383,6 +1384,7 @@ ath_intr(void *arg)
ah->ah_intrstate[2],
ah->ah_intrstate[3],
ah->ah_intrstate[6]);
+#endif
status &= sc->sc_imask; /* discard unasked for bits */
/* Short-circuit un-handled interrupts */
OpenPOWER on IntegriCloud