Author: adrian
Date: Wed Apr  4 22:51:50 2012
New Revision: 233900
URL: http://svn.freebsd.org/changeset/base/233900

Log:
  Track and optionally log the actual sync interrupt cause.
  
  These are involved in tracking host interface issues (ie, PCI/PCIe/AHB
  interface.)

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 Wed Apr  4 22:40:38 
2012        (r233899)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Wed Apr  4 22:51:50 
2012        (r233900)
@@ -67,7 +67,7 @@ ar5416IsInterruptPending(struct ath_hal 
 HAL_BOOL
 ar5416GetPendingInterrupts(struct ath_hal *ah, HAL_INT *masked)
 {
-       uint32_t isr, isr0, isr1, sync_cause = 0;
+       uint32_t isr, isr0, isr1, sync_cause = 0, o_sync_cause = 0;
        HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
 
 #ifdef AH_INTERRUPT_DEBUGGING
@@ -89,7 +89,7 @@ ar5416GetPendingInterrupts(struct ath_ha
                        isr = OS_REG_READ(ah, AR_ISR);
                else
                        isr = 0;
-               sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
+               o_sync_cause = sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
                sync_cause &= AR_INTR_SYNC_DEFAULT;
                *masked = 0;
 
@@ -221,6 +221,9 @@ ar5416GetPendingInterrupts(struct ath_ha
                return AH_TRUE;
 
        if (sync_cause != 0) {
+               HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: sync_cause=0x%x\n",
+                   __func__,
+                   o_sync_cause);
                if (sync_cause & (AR_INTR_SYNC_HOST1_FATAL | 
AR_INTR_SYNC_HOST1_PERR)) {
                        *masked |= HAL_INT_FATAL;
                }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to