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.
This commit is contained in:
adrian 2011-04-07 13:14:51 +00:00
parent 43c556e7f5
commit d582d39710
2 changed files with 14 additions and 0 deletions

View File

@ -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_ */

View File

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