541-ath9k_rx_dma_stop_check.patch 819 B

12345678910111213141516171819202122232425262728
  1. --- a/drivers/net/wireless/ath/ath9k/mac.c
  2. +++ b/drivers/net/wireless/ath/ath9k/mac.c
  3. @@ -695,7 +695,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
  4. {
  5. #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
  6. struct ath_common *common = ath9k_hw_common(ah);
  7. - u32 mac_status, last_mac_status = 0;
  8. + u32 mac_status = 0, last_mac_status = 0;
  9. int i;
  10. /* Enable access to the DMA observation bus */
  11. @@ -725,6 +725,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
  12. }
  13. if (i == 0) {
  14. + if (!AR_SREV_9300_20_OR_LATER(ah) &&
  15. + (mac_status & 0x700) == 0) {
  16. + /*
  17. + * DMA is idle but the MAC is still stuck
  18. + * processing events
  19. + */
  20. + *reset = true;
  21. + return true;
  22. + }
  23. +
  24. ath_err(common,
  25. "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
  26. AH_RX_STOP_DMA_TIMEOUT / 1000,