]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k: make DMA stop related messages debug-only
authorFelix Fietkau <nbd@openwrt.org>
Thu, 2 Jul 2015 11:40:29 +0000 (13:40 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Jul 2015 13:56:41 +0000 (16:56 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/debug.c
drivers/net/wireless/ath/ath9k/debug.h
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c

index dbf8f495964217e1b5799fb165155ff3c88b4894..da32c8faad94f1b58f2157c046e5db1bdb04f6f3 100644 (file)
@@ -765,6 +765,8 @@ static int read_file_reset(struct seq_file *file, void *data)
                [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;
 
index a8e9319958e6eca7a645610c24c6b46adc142f3b..cd68c5f0e751a57ed6341e56d710234f92b0f5db 100644 (file)
@@ -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
 };
 
index 6c75fb1ab77d45ba8b6dab67a7fe6bb3b1f3dc98..d3189daf99965e6059d1ce407c99600a822ed69f 100644 (file)
@@ -491,10 +491,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;
 }
index 3ad79bb4f2c21c94b6c41c526a7e033e0937ed77..2c627f1233da6514b365ea923c84a1f36552965c 100644 (file)
@@ -1883,8 +1883,11 @@ bool ath_drain_all_txq(struct ath_softc *sc)
                        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))