* [PATCH] ath5k: fix spontaneus AR5312 freezes
@ 2015-02-03 21:21 Sergey Ryazanov
2015-02-06 6:42 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Ryazanov @ 2015-02-03 21:21 UTC (permalink / raw)
To: linux-wireless; +Cc: Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez
Sometimes while CPU have some load and ath5k doing the wireless
interface reset the whole WiSoC completely freezes. Set of tests shows
that using atomic delay function while we wait interface reset helps to
avoid such freezes.
The easiest way to reproduce this issue: create a station interface,
start continous scan with wpa_supplicant and load CPU by something. Or
just create multiple station interfaces and put them all in continous
scan.
This patch partially reverts the commit 1846ac3dbec0 ("ath5k: Use
usleep_range where possible"), which replaces initial udelay()
by usleep_range().
I do not know actual source of this issue, but all looks like that HW
freeze is caused by transaction on internal SoC bus, while wireless
block is in reset state.
Also I should note that I do not know how many chips are affected, but I
did not see this issue with chips, other than AR5312.
CC: Jiri Slaby <jirislaby@gmail.com>
CC: Nick Kossifidis <mickflemm@gmail.com>
CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Fixes: 1846ac3dbec0 ("ath5k: Use usleep_range where possible")
Reported-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
Tested-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
Tested-by: Eric Bree <ebree@nltinc.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
---
I would like to sincerely thank Christophe for provided board and
for his patience and perseverance in solving problems with the
delivery ;)
---
drivers/net/wireless/ath/ath5k/reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index a3399c4..b9b651e 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -478,7 +478,7 @@ ath5k_hw_wisoc_reset(struct ath5k_hw *ah, u32 flags)
regval = ioread32(reg);
iowrite32(regval | val, reg);
regval = ioread32(reg);
- usleep_range(100, 150);
+ udelay(100); /* NB: should be atomic */
/* Bring BB/MAC out of reset */
iowrite32(regval & ~val, reg);
--
2.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ath5k: fix spontaneus AR5312 freezes
2015-02-03 21:21 [PATCH] ath5k: fix spontaneus AR5312 freezes Sergey Ryazanov
@ 2015-02-06 6:42 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-02-06 6:42 UTC (permalink / raw)
To: Sergey Ryazanov
Cc: linux-wireless, Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez
> Sometimes while CPU have some load and ath5k doing the wireless
> interface reset the whole WiSoC completely freezes. Set of tests shows
> that using atomic delay function while we wait interface reset helps to
> avoid such freezes.
>
> The easiest way to reproduce this issue: create a station interface,
> start continous scan with wpa_supplicant and load CPU by something. Or
> just create multiple station interfaces and put them all in continous
> scan.
>
> This patch partially reverts the commit 1846ac3dbec0 ("ath5k: Use
> usleep_range where possible"), which replaces initial udelay()
> by usleep_range().
>
> I do not know actual source of this issue, but all looks like that HW
> freeze is caused by transaction on internal SoC bus, while wireless
> block is in reset state.
>
> Also I should note that I do not know how many chips are affected, but I
> did not see this issue with chips, other than AR5312.
>
> CC: Jiri Slaby <jirislaby@gmail.com>
> CC: Nick Kossifidis <mickflemm@gmail.com>
> CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
> Fixes: 1846ac3dbec0 ("ath5k: Use usleep_range where possible")
> Reported-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
> Tested-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
> Tested-by: Eric Bree <ebree@nltinc.com>
> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-06 6:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-03 21:21 [PATCH] ath5k: fix spontaneus AR5312 freezes Sergey Ryazanov
2015-02-06 6:42 ` Kalle Valo
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).