summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2017-04-14 14:51:18 -0700
committerKalle Valo <kvalo@codeaurora.org>2017-04-20 10:21:52 +0300
commit9ae3fbd109d9d89c442a3412e41fc532a9829ea8 (patch)
treea532673eb0e16ca58cf3c28d7ff07177457bb476 /drivers/net/wireless/marvell
parent3c8cb9ad032d737b874e402c59eb51e3c991a144 (diff)
downloadblackbird-obmc-linux-9ae3fbd109d9d89c442a3412e41fc532a9829ea8.tar.gz
blackbird-obmc-linux-9ae3fbd109d9d89c442a3412e41fc532a9829ea8.zip
mwifiex: reset timeout flag when resetting device
If we reset because of a command timeout, we should reset this flag. Otherwise, we might erroneously think the next command after reset is timing out, and trigger another reset. The above behavior effectively neuters the automatic card_reset() behavior, as it means we will never recover from a command timeout properly (and in fact, we might enter an infinite loop: timeout -> reset -> (fake) timeout -> reset -> ... This fixes a bug introduced with introduction of PCIe function level reset support, but it was carried into the SDIO driver when it was converted to use the same codepaths. And this is currently mostly a problem only in the SDIO driver, because it's the only one with automatic card_reset() support (e.g., on command timeout). But it will be a problem for PCIe too, as I'm working on supporting automatic card_reset() for PCIe. Fixes: c742e623e941 ("mwifiex: sdio card reset enhancement") Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index cd21bbf4412f..fdeb0bbb884c 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1441,6 +1441,7 @@ mwifiex_reinit_sw(struct mwifiex_adapter *adapter)
init_waitqueue_head(&adapter->init_wait_q);
adapter->is_suspended = false;
adapter->hs_activated = false;
+ adapter->is_cmd_timedout = 0;
init_waitqueue_head(&adapter->hs_activate_wait_q);
init_waitqueue_head(&adapter->cmd_wait_q.wait);
adapter->cmd_wait_q.status = 0;
OpenPOWER on IntegriCloud