Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Issue 3367013: CHROMEOS: ath9k: fix power save race conditions (Closed)

Created:
10 years, 3 months ago by Paul Stewart
Modified:
9 years, 7 months ago
Reviewers:
Sam Leffler
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, sleffler+cc_chromium.org, Olof Johansson, vb
Base URL:
ssh://gitrw.chromium.org/kernel.git
Visibility:
Public.

Description

CHROMEOS: 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 Cc: stable@kernel.org [2.6.32+] Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>; [To be replaced by cherry-pick] BUG=chromium-os:5943, chromium-os:5709 TEST=Manual

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/main.c View 3 chunks +4 lines, -1 line 0 comments Download
M chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/recv.c View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Paul Stewart
10 years, 3 months ago (2010-09-07 18:06:59 UTC) #1
Sam Leffler
10 years, 3 months ago (2010-09-07 18:19:47 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698