Author: adrian
Date: Thu Apr  7 13:14:51 2011
New Revision: 220423
URL: http://svn.freebsd.org/changeset/base/220423

Log:
  Add some more OS_MARK probes to the RX DMA setup/teardown code path.
  
  I'm trying to debug the RX DMA path and help the ath9k guys with
  "RX dma abort stuck" issue that both our drivers have.

Modified:
  head/sys/dev/ath/ath_hal/ah_decode.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c

Modified: head/sys/dev/ath/ath_hal/ah_decode.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_decode.h        Thu Apr  7 13:03:35 2011        
(r220422)
+++ head/sys/dev/ath/ath_hal/ah_decode.h        Thu Apr  7 13:14:51 2011        
(r220423)
@@ -51,5 +51,15 @@ enum {
        AH_MARK_ANI_RESET,              /* ar*AniReset, opmode */
        AH_MARK_ANI_POLL,               /* ar*AniReset, listen time */
        AH_MARK_ANI_CONTROL,            /* ar*AniReset, cmd */
+       AH_MARK_RX_CTL,                 /* RX DMA control */
 };
+
+enum {
+       AH_MARK_RX_CTL_PCU_START,
+       AH_MARK_RX_CTL_PCU_STOP,
+       AH_MARK_RX_CTL_DMA_START,
+       AH_MARK_RX_CTL_DMA_STOP,
+       AH_MARK_RX_CTL_DMA_STOP_ERR,
+};
+
 #endif /* _ATH_AH_DECODE_H_ */

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c       Thu Apr  7 13:03:35 
2011        (r220422)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c       Thu Apr  7 13:14:51 
2011        (r220423)
@@ -59,8 +59,10 @@ ar5212EnableReceive(struct ath_hal *ah)
 HAL_BOOL
 ar5212StopDmaReceive(struct ath_hal *ah)
 {
+       OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP);
        OS_REG_WRITE(ah, AR_CR, AR_CR_RXD);     /* Set receive disable bit */
        if (!ath_hal_wait(ah, AR_CR, AR_CR_RXE, 0)) {
+               OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP_ERR);
 #ifdef AH_DEBUG
                ath_hal_printf(ah, "%s: dma failed to stop in 10ms\n"
                        "AR_CR=0x%08x\nAR_DIAG_SW=0x%08x\n",
@@ -82,6 +84,7 @@ ar5212StartPcuReceive(struct ath_hal *ah
 {
        struct ath_hal_private *ahp = AH_PRIVATE(ah);
 
+       OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_PCU_START);
        OS_REG_WRITE(ah, AR_DIAG_SW,
                OS_REG_READ(ah, AR_DIAG_SW) &~ AR_DIAG_RX_DIS);
        ar5212EnableMibCounters(ah);
@@ -95,6 +98,7 @@ ar5212StartPcuReceive(struct ath_hal *ah
 void
 ar5212StopPcuReceive(struct ath_hal *ah)
 {
+       OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_PCU_STOP);
        OS_REG_WRITE(ah, AR_DIAG_SW,
                OS_REG_READ(ah, AR_DIAG_SW) | AR_DIAG_RX_DIS);
        ar5212DisableMibCounters(ah);
_______________________________________________
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