tleleu / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
f2c60e
From: "kernel-team@fedoraproject.org" <kernel-team@fedoraproject.org>
f2c60e
Date: Wed, 6 Feb 2013 09:57:47 -0500
f2c60e
Subject: [PATCH] ath9k: rx dma stop check
f2c60e
f2c60e
---
f2c60e
 drivers/net/wireless/ath/ath9k/mac.c | 12 +++++++++++-
f2c60e
 1 file changed, 11 insertions(+), 1 deletion(-)
f2c60e
f2c60e
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
f2c60e
index bba85d1a6cd1..ebbee8f17130 100644
f2c60e
--- a/drivers/net/wireless/ath/ath9k/mac.c
f2c60e
+++ b/drivers/net/wireless/ath/ath9k/mac.c
f2c60e
@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
f2c60e
 {
f2c60e
 #define AH_RX_STOP_DMA_TIMEOUT 10000   /* usec */
f2c60e
 	struct ath_common *common = ath9k_hw_common(ah);
f2c60e
-	u32 mac_status, last_mac_status = 0;
f2c60e
+	u32 mac_status = 0, last_mac_status = 0;
f2c60e
 	int i;
f2c60e
 
f2c60e
 	/* Enable access to the DMA observation bus */
f2c60e
@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
f2c60e
 	}
f2c60e
 
f2c60e
 	if (i == 0) {
f2c60e
+		if (!AR_SREV_9300_20_OR_LATER(ah) &&
f2c60e
+		    (mac_status & 0x700) == 0) {
f2c60e
+			/*
f2c60e
+			 * DMA is idle but the MAC is still stuck
f2c60e
+			 * processing events
f2c60e
+			 */
f2c60e
+			*reset = true;
f2c60e
+			return true;
f2c60e
+		}
f2c60e
+
f2c60e
 		ath_err(common,
f2c60e
 			"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
f2c60e
 			AH_RX_STOP_DMA_TIMEOUT / 1000,