diff options
author | Xinming Hu | 2016-04-11 16:52:40 +0200 |
---|---|---|
committer | Kalle Valo | 2016-04-14 15:01:46 +0200 |
commit | c3ec0ff6425b86655aa34b5c6cb0f7b6d559c6b2 (patch) | |
tree | e1b59c86373bd1218a2915a5ebabe508b2c1e708 /drivers/net/wireless/marvell/mwifiex/main.c | |
parent | mwifiex: add default setting for pcie firmware download (diff) | |
download | kernel-qcow2-linux-c3ec0ff6425b86655aa34b5c6cb0f7b6d559c6b2.tar.gz kernel-qcow2-linux-c3ec0ff6425b86655aa34b5c6cb0f7b6d559c6b2.tar.xz kernel-qcow2-linux-c3ec0ff6425b86655aa34b5c6cb0f7b6d559c6b2.zip |
mwifiex: do not wait on semaphore during card removal
Host hang is observed if card is removed before firmware download
gets completed. In this case, firmware will be failed to download and
adapter structure gets freed.
In other thread, mwifiex_remove_card() waits on semaphore until the
firmware download fails. This wait is not necessary and may result in
invalid adapter access.
This patch uses down_trylock to return immediately so that hang issue
won't occur.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/main.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index 04b975cbb330..b459c70dc43f 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -1434,7 +1434,7 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) struct mwifiex_private *priv = NULL; int i; - if (down_interruptible(sem)) + if (down_trylock(sem)) goto exit_sem_err; if (!adapter) |