All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k: fix DMA stop sequence for AR9003+
@ 2015-06-02  8:38 Felix Fietkau
  2015-06-08  8:40 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2015-06-02  8:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo

AR93xx and newer needs to stop rx before tx to avoid getting the DMA
engine or MAC into a stuck state.
This should reduce/fix the occurence of "Failed to stop Tx DMA" logspam.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/main.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index d285e3a..cfd45cb 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -216,11 +216,13 @@ static bool ath_prepare_reset(struct ath_softc *sc)
 	ath_stop_ani(sc);
 	ath9k_hw_disable_interrupts(ah);
 
-	if (!ath_drain_all_txq(sc))
-		ret = false;
-
-	if (!ath_stoprecv(sc))
-		ret = false;
+	if (AR_SREV_9300_20_OR_LATER(ah)) {
+		ret &= ath_stoprecv(sc);
+		ret &= ath_drain_all_txq(sc);
+	} else {
+		ret &= ath_drain_all_txq(sc);
+		ret &= ath_stoprecv(sc);
+	}
 
 	return ret;
 }
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: ath9k: fix DMA stop sequence for AR9003+
  2015-06-02  8:38 [PATCH] ath9k: fix DMA stop sequence for AR9003+ Felix Fietkau
@ 2015-06-08  8:40 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-06-08  8:40 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless


> AR93xx and newer needs to stop rx before tx to avoid getting the DMA
> engine or MAC into a stuck state.
> This should reduce/fix the occurence of "Failed to stop Tx DMA" logspam.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-08  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02  8:38 [PATCH] ath9k: fix DMA stop sequence for AR9003+ Felix Fietkau
2015-06-08  8:40 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.