diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2012-02-29 15:15:43 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:06:51 +0200 |
commit | a6031489766def3da20dfe173310207dca95b06c (patch) | |
tree | 0e77c13cc292134c0ca20b3bf2c967bc302abdd1 /drivers | |
parent | ddf179a33044c1b6b9dabce1fc166335f7a53a75 (diff) |
cw1200: Do not allow device to suspend when it is not fully awake.
Patch fixes a race between device wakeup and device_suspend. The race
might confuse state machine in firmware.
ST-Ericsson ID: 419543
Change-Id: I07fa22879b3735fe4d5a1f70f5660a693a1b0211
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/cw1200/bh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/cw1200/bh.c b/drivers/staging/cw1200/bh.c index 1acc972b6d4..fe8ecc1287f 100644 --- a/drivers/staging/cw1200/bh.c +++ b/drivers/staging/cw1200/bh.c @@ -292,7 +292,8 @@ static int cw1200_bh(void *arg) rx = atomic_xchg(&priv->bh_rx, 0); tx = atomic_xchg(&priv->bh_tx, 0); term = atomic_xchg(&priv->bh_term, 0); - suspend = atomic_read(&priv->bh_suspend); + suspend = pending_tx ? + 0 : atomic_read(&priv->bh_suspend); (rx || tx || term || suspend); }), status); |