From: "John W. Linville" <linville@tuxdriver.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: Re: [PATCH 2.6.39 v2] ath9k_hw: fix stopping rx DMA during resets
Date: Fri, 8 Apr 2011 13:17:48 -0400 [thread overview]
Message-ID: <20110408171747.GA2550@tuxdriver.com> (raw)
In-Reply-To: <4D9EFA5F.3040900@openwrt.org>
On Fri, Apr 08, 2011 at 02:06:55PM +0200, Felix Fietkau wrote:
> During PHY errors, the MAC can sometimes fail to enter an idle state on older
> hardware (before AR9380) after an rx stop has been requested.
>
> This typically shows up in the kernel log with messages like these:
>
> ath: Could not stop RX, we could be confusing the DMA engine when we start RX up
> ------------[ cut here ]------------
> WARNING: at drivers/net/wireless/ath/ath9k/recv.c:504 ath_stoprecv+0xcc/0xf0 [ath9k]()
> Call Trace:
> [<8023f0e8>] dump_stack+0x8/0x34
> [<80075050>] warn_slowpath_common+0x78/0xa4
> [<80075094>] warn_slowpath_null+0x18/0x24
> [<80d66d60>] ath_stoprecv+0xcc/0xf0 [ath9k]
> [<80d642cc>] ath_set_channel+0xbc/0x270 [ath9k]
> [<80d65254>] ath_radio_disable+0x4a4/0x7fc [ath9k]
>
> When this happens, the state that the MAC enters is easy to identify and
> does not result in bogus DMA traffic, however to ensure a working state
> after a channel change, the hardware should still be reset.
>
> This patch adds detection for this specific MAC state, after which the above
> warnings completely disappear in my tests.
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> Cc: stable@kernel.org
> Cc: Kyungwan Nam <Kyungwan.Nam@Atheros.com>
>
> ---
> v2: remove a redundant ath9k_hw_stopdmarecv call, print the MAC DMA state when the error still occurs
>
> drivers/net/wireless/ath/ath9k/hw.c | 9 ---------
> drivers/net/wireless/ath/ath9k/mac.c | 25 ++++++++++++++++++++++---
> drivers/net/wireless/ath/ath9k/mac.h | 2 +-
> drivers/net/wireless/ath/ath9k/recv.c | 6 +++---
> 4 files changed, 26 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index 1b5bd13..c8a2d0d 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -1249,15 +1249,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
> ah->txchainmask = common->tx_chainmask;
> ah->rxchainmask = common->rx_chainmask;
> - if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) {
This patch seems a bit busted...? I tried to fix it up manually but
the errors just keep coming...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2011-04-08 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 12:06 [PATCH 2.6.39 v2] ath9k_hw: fix stopping rx DMA during resets Felix Fietkau
2011-04-08 17:17 ` John W. Linville [this message]
2011-04-08 18:00 ` Felix Fietkau
2011-04-08 18:13 ` [PATCH 2.6.39 v3] " Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110408171747.GA2550@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.com \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).