linux_dsm_epyc7002/drivers/net/wireless/ath
Luis R. Rodriguez 8ab2cd09fe ath9k: fix power save race conditions
ath9k has a race on putting the chip into network sleep and
having registers read from hardware. The race occurs because
although ath9k_ps_restore() locks its own callers it makes use
of some variables which get altered in the driver at different
code paths. The variables are the ps_enabled and ps_flags.

This is easily reprodicible in large network environments when
roaming with the wpa_supplicant simple bgscan. You'd get some
0xdeadbeef read out on certain registers such as:

ath: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000 != 0x00000000
ath: RX failed to go idle in 10 ms RXSM=0xdeadbeef

ath: timeout (100000 us) on reg 0x7000: 0xdeadbeef & 0x00000003 != 0x00000000
ath: Chip reset failed

The fix is to protect the ath9k_config(hw, IEEE80211_CONF_CHANGE_PS)
calls with a spin_lock_irqsave() which will disable contendors for
these variables from interrupt context, timers, re-entry from mac80211
on the same callback, and most importantly from ath9k_ps_restore()
which is the only call which will put the device into network sleep.

There are quite a few threads and bug reports on these a few of them are:

https://bugs.launchpad.net/ubuntu/karmic/+source/linux/+bug/407040
http://code.google.com/p/chromium-os/issues/detail?id=5709
http://code.google.com/p/chromium-os/issues/detail?id=5943

Stable fixes apply to [2.6.32+]

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-16 15:46:09 -04:00
..
ar9170 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-08-24 16:35:40 -04:00
ath5k ath5k: Use common crypt capabilities flags 2010-09-16 15:19:45 -04:00
ath9k ath9k: fix power save race conditions 2010-09-16 15:46:09 -04:00
carl9170 carl9170: Makefile, Kconfig files and MAINTAINERS 2010-09-14 16:03:42 -04:00
ath.h ath/ath9k: Replace common->splitmic with a flag 2010-09-16 15:19:45 -04:00
debug.c
debug.h ath9k: add a separate debug level for stuck beacons 2010-08-16 15:26:38 -04:00
hw.c
Kconfig carl9170: Makefile, Kconfig files and MAINTAINERS 2010-09-14 16:03:42 -04:00
key.c ath/ath9k: Replace common->splitmic with a flag 2010-09-16 15:19:45 -04:00
main.c
Makefile ath: Copy key cache management functions from ath9k to ath 2010-09-16 15:19:45 -04:00
reg.h ath: Copy key cache management functions from ath9k to ath 2010-09-16 15:19:45 -04:00
regd_common.h
regd.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
regd.h