diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-07-02 11:45:08 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-07-02 11:45:08 +0000 |
commit | ddfaee36ba3cf5c5f2d76b01a8f3b8912bfecbd6 (patch) | |
tree | afaca9ab45da38a30c79a4a595ef7d08c9577397 | |
parent | a9c39a27b5d17870a6d7d2e1b10eed867cfab9ef (diff) | |
download | upstream-ddfaee36ba3cf5c5f2d76b01a8f3b8912bfecbd6.tar.gz upstream-ddfaee36ba3cf5c5f2d76b01a8f3b8912bfecbd6.tar.bz2 upstream-ddfaee36ba3cf5c5f2d76b01a8f3b8912bfecbd6.zip |
ath9k: make DMA stop related messages debug-only (#11862, #9654)
A long time ago, ath9k had issues during reset where the DMA engine
would stay active and could potentially corrupt memory.
To debug those issues, the driver would print warnings whenever they
occur.
Nowadays, these issues are gone and the primary cause of these messages
is if the MAC is stuck during reset or busy processing a long
transmission. This is fairly harmless, yet these messages continue to
worry users.
To reduce the number of bogus bug reports, turn these messages into
debug messages and count their occurence in the "reset" debugfs file.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 46158
-rw-r--r-- | package/kernel/mac80211/patches/393-ath9k-make-DMA-stop-related-messages-debug-only.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/393-ath9k-make-DMA-stop-related-messages-debug-only.patch b/package/kernel/mac80211/patches/393-ath9k-make-DMA-stop-related-messages-debug-only.patch new file mode 100644 index 0000000000..34af6d2acf --- /dev/null +++ b/package/kernel/mac80211/patches/393-ath9k-make-DMA-stop-related-messages-debug-only.patch @@ -0,0 +1,74 @@ +From: Felix Fietkau <nbd@openwrt.org> +Date: Thu, 2 Jul 2015 13:35:05 +0200 +Subject: [PATCH] ath9k: make DMA stop related messages debug-only + +A long time ago, ath9k had issues during reset where the DMA engine +would stay active and could potentially corrupt memory. +To debug those issues, the driver would print warnings whenever they +occur. + +Nowadays, these issues are gone and the primary cause of these messages +is if the MAC is stuck during reset or busy processing a long +transmission. This is fairly harmless, yet these messages continue to +worry users. + +To reduce the number of bogus bug reports, turn these messages into +debug messages and count their occurence in the "reset" debugfs file. + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> +--- + +--- a/drivers/net/wireless/ath/ath9k/debug.c ++++ b/drivers/net/wireless/ath/ath9k/debug.c +@@ -765,6 +765,8 @@ static int read_file_reset(struct seq_fi + [RESET_TYPE_BEACON_STUCK] = "Stuck Beacon", + [RESET_TYPE_MCI] = "MCI Reset", + [RESET_TYPE_CALIBRATION] = "Calibration error", ++ [RESET_TX_DMA_ERROR] = "Tx DMA stop error", ++ [RESET_RX_DMA_ERROR] = "Rx DMA stop error", + }; + int i; + +--- a/drivers/net/wireless/ath/ath9k/debug.h ++++ b/drivers/net/wireless/ath/ath9k/debug.h +@@ -50,6 +50,8 @@ enum ath_reset_type { + RESET_TYPE_BEACON_STUCK, + RESET_TYPE_MCI, + RESET_TYPE_CALIBRATION, ++ RESET_TX_DMA_ERROR, ++ RESET_RX_DMA_ERROR, + __RESET_TYPE_MAX + }; + +--- a/drivers/net/wireless/ath/ath9k/recv.c ++++ b/drivers/net/wireless/ath/ath9k/recv.c +@@ -496,10 +496,9 @@ bool ath_stoprecv(struct ath_softc *sc) + + if (!(ah->ah_flags & AH_UNPLUGGED) && + unlikely(!stopped)) { +- ath_err(ath9k_hw_common(sc->sc_ah), +- "Could not stop RX, we could be " +- "confusing the DMA engine when we start RX up\n"); +- ATH_DBG_WARN_ON_ONCE(!stopped); ++ ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, ++ "Failed to stop Rx DMA\n"); ++ RESET_STAT_INC(sc, RESET_RX_DMA_ERROR); + } + return stopped && !reset; + } +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1896,8 +1896,11 @@ bool ath_drain_all_txq(struct ath_softc + npend |= BIT(i); + } + +- if (npend) +- ath_err(common, "Failed to stop TX DMA, queues=0x%03x!\n", npend); ++ if (npend) { ++ RESET_STAT_INC(sc, RESET_TX_DMA_ERROR); ++ ath_dbg(common, RESET, ++ "Failed to stop TX DMA, queues=0x%03x!\n", npend); ++ } + + for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { + if (!ATH_TXQ_SETUP(sc, i)) |