ath9k: Fix TX queue draining
authorSujith <Sujith.Manoharan@atheros.com>
Mon, 14 Dec 2009 09:27:08 +0000 (14:57 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 23:04:14 +0000 (15:04 -0800)
commit e8009e9850d59000d518296af372888911a129bd upstream.

When TX DMA termination has failed, the HW has to be reset
completely. Doing a fast channel change in this case is insufficient.
Also, change the debug level of a couple of messages to FATAL.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/mac.c
drivers/net/wireless/ath/ath9k/xmit.c

index d4d9d828aff44121a70d4a0991f3586aed3ea6d4..110c16dd465c798f076f56886021d3dd2e9124ee 100644 (file)
@@ -155,7 +155,7 @@ bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q)
                wait = wait_time;
                while (ath9k_hw_numtxpending(ah, q)) {
                        if ((--wait) == 0) {
-                               DPRINTF(ah->ah_sc, ATH_DBG_QUEUE,
+                               DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
                                        "Failed to stop TX DMA in 100 "
                                        "msec after killing last frame\n");
                                break;
index 47539094524e49b96cf22d942e86942aaec7a3bb..2e0b86be382efe56910c0ba20558ec73270b89e0 100644 (file)
@@ -1076,10 +1076,10 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
        if (npend) {
                int r;
 
-               DPRINTF(sc, ATH_DBG_XMIT, "Unable to stop TxDMA. Reset HAL!\n");
+               DPRINTF(sc, ATH_DBG_FATAL, "Unable to stop TxDMA. Reset HAL!\n");
 
                spin_lock_bh(&sc->sc_resetlock);
-               r = ath9k_hw_reset(ah, sc->sc_ah->curchan, true);
+               r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
                if (r)
                        DPRINTF(sc, ATH_DBG_FATAL,
                                "Unable to reset hardware; reset status %d\n",