Skip to contentSkip to conversation

ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

PATCH New greearb at gmail.com 3 participants 5 messages Dec 6, 2010 – Dec 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

From: Ben Greear <[email protected]>

This decreases spammage in the log. A single line message will still be printed, so users can be aware that problem exists.

---
:100644 100644 b4417d2... 082b16d... M drivers/net/wireless/ath/ath9k/recv.c
:100644 100644 f207007... 10cf682... M drivers/net/wireless/ath/debug.h

 drivers/net/wireless/ath/ath9k/recv.c |    8 ++++++--
 drivers/net/wireless/ath/debug.h      |    2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/recv.c +6 -2
index b4417d2..082b16d 100644
@@ -527,8 +527,12 @@ bool ath_stoprecv(struct ath_softc *sc)
 		sc->rx.rxlink = NULL;
 	spin_unlock_bh(&sc->rx.rxbuflock);
 
-	ATH_DBG_WARN(!stopped, "Could not stop RX, we could be "
-		     "confusing the DMA engine when we start RX up\n");
+	if (unlikely(!stopped)) {
+		ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL,
+			  "Could not stop RX, we could be "
+			  "confusing the DMA engine when we start RX up\n");
+		ATH_DBG_WARN_ON_ONCE(!stopped);
+	}
 	return stopped;
 }
 
drivers/net/wireless/ath/debug.h +2 -0
index f207007..10cf682 100644
@@ -71,12 +71,14 @@ enum ATH_DEBUG {
 void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
 	__attribute__ ((format (printf, 3, 4)));
 #define ATH_DBG_WARN(foo, arg...) WARN(foo, arg)
+#define ATH_DBG_WARN_ON_ONCE(foo) WARN_ON_ONCE(foo)
 #else
 static inline void __attribute__ ((format (printf, 3, 4)))
 ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
 {
 }
 #define ATH_DBG_WARN(foo, arg)
+#define ATH_DBG_WARN_ON_ONCE(foo)
 #endif /* CONFIG_ATH_DEBUG */
 
 /** Returns string describing opmode, or NULL if unknown mode. */
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 1/1 ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

Quoted 10 lines · Luis R. Rodriguez
Quoted 7 lines · greearb at gmail.com

From: Ben Greear <[email protected]>

This decreases spammage in the log. ?A single line message will still be printed, so users can be aware that problem exists.

You forgot to address linville, and no need to send to ath9k-devel if you already know the patch is good.

Luis

#3 lore raw

PATCH 1/1 ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

Quoted 9 lines · Luis R. Rodriguez
Quoted 7 lines · Luis R. Rodriguez
Quoted 6 lines · greearb at gmail.com

From: Ben Greear <[email protected]>

This decreases spammage in the log. ?A single line message will still be printed, so users can be aware that problem exists.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

You forgot to address linville, and no need to send to ath9k-devel if you already know the patch is good.

Ben, your patch did not get merged in today's pick of patches by John but I like it and want to resuse the same definition in my new patches so I will resubmit in my new series. Thanks.

Luis

#4 lore raw

PATCH 1/1 ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

Quoted 13 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez
Quoted 9 lines · Luis R. Rodriguez
Quoted 7 lines · greearb at gmail.com

From: Ben Greear <[email protected]>

This decreases spammage in the log. ?A single line message will still be printed, so users can be aware that problem exists.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

You forgot to address linville, and no need to send to ath9k-devel if you already know the patch is good.

Ben, your patch did not get merged in today's pick of patches by John but I like it and want to resuse the same definition in my new patches so I will resubmit in my new series. Thanks.

Put down the crack pipe... :-)

commit d7fd1b50a51be3fe6554fbab8953fa8a3ff4009b

Author: Ben Greear <[email protected]>
Date:   Mon Dec 6 13:13:07 2010 -0800

ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

This decreases spammage in the log. A single line message will still be printed, so users can be aware that problem exists.

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.