2010-12-06 21:19:02

by greearb

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Ben Greear <[email protected]>
---
: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(-)

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index b4417d2..082b16d 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -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;
}

diff --git a/drivers/net/wireless/ath/debug.h b/drivers/net/wireless/ath/debug.h
index f207007..10cf682 100644
--- a/drivers/net/wireless/ath/debug.h
+++ b/drivers/net/wireless/ath/debug.h
@@ -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. */
--
1.7.2.3



2010-12-07 23:06:07

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

On Mon, Dec 6, 2010 at 2:02 PM, Luis R. Rodriguez
<[email protected]> wrote:
> On Mon, Dec 6, 2010 at 1:59 PM, Luis R. Rodriguez
> <[email protected]> wrote:
>> On Mon, Dec 06, 2010 at 01:13:07PM -0800, [email protected] wrote:
>>> 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.
>>>
>>> Signed-off-by: Ben Greear <[email protected]>
>>
>> Acked-by: Luis R. Rodriguez <[email protected]>
>
> 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

2010-12-06 22:00:01

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

On Mon, Dec 06, 2010 at 01:13:07PM -0800, [email protected] wrote:
> 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.
>
> Signed-off-by: Ben Greear <[email protected]>

Acked-by: Luis R. Rodriguez <[email protected]>

Luis

2010-12-08 14:30:10

by John W. Linville

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

On Tue, Dec 07, 2010 at 03:05:46PM -0800, Luis R. Rodriguez wrote:
> On Mon, Dec 6, 2010 at 2:02 PM, Luis R. Rodriguez
> <[email protected]> wrote:
> > On Mon, Dec 6, 2010 at 1:59 PM, Luis R. Rodriguez
> > <[email protected]> wrote:
> >> On Mon, Dec 06, 2010 at 01:13:07PM -0800, [email protected] wrote:
> >>> 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.
> >>>
> >>> Signed-off-by: Ben Greear <[email protected]>
> >>
> >> Acked-by: Luis R. Rodriguez <[email protected]>
> >
> > 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.

Signed-off-by: Ben Greear <[email protected]>
Acked-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: John W. Linville <[email protected]>

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-12-06 22:02:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [ath9k-devel] [PATCH] ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

On Mon, Dec 6, 2010 at 1:59 PM, Luis R. Rodriguez
<[email protected]> wrote:
> On Mon, Dec 06, 2010 at 01:13:07PM -0800, [email protected] wrote:
>> 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.
>>
>> Signed-off-by: Ben Greear <[email protected]>
>
> Acked-by: Luis R. Rodriguez <[email protected]>

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

Luis