diff options
author | Tony Lindgren <tony@atomide.com> | 2018-06-19 12:43:39 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-06-27 18:45:12 +0300 |
commit | db68052bdf581eb5e7f74da4a5bb5933113dbaaf (patch) | |
tree | 4e1748c31993fbd249478987d56fdccaad83f785 /drivers/net/wireless/ti | |
parent | 3ebbabea4219816ff148209473e074adaaa5f610 (diff) | |
download | linux-db68052bdf581eb5e7f74da4a5bb5933113dbaaf.tar.xz |
wlcore: Fix timout errors after recovery
After enabling runtime PM, if we force hardware reset multiple times with:
# echo 1 > /sys/kernel/debug/ieee80211/phy0/wlcore/start_recovery
We will after few tries get the following error:
wlcore: ERROR timeout waiting for the hardware to complete initialization
And then wlcore is unable to reconnect until after the wlcore related modules
are reloaded.
Let's fix this by moving pm_runtime_put() earlier before we restart the hardware.
And let's use the sync version to make sure we're done before we restart.
Note that we still will get -EBUSY warning from wl12xx_sdio_set_power() but let's
fix that separately once we know exactly why we get the warning.
Reported-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 8eccd0d1f329..398d6d983046 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -977,6 +977,7 @@ static void wl1271_recovery_work(struct work_struct *work) } wlcore_op_stop_locked(wl); + pm_runtime_put_sync(wl->dev); ieee80211_restart_hw(wl->hw); @@ -986,8 +987,6 @@ static void wl1271_recovery_work(struct work_struct *work) */ wlcore_wake_queues(wl, WLCORE_QUEUE_STOP_REASON_FW_RESTART); - pm_runtime_put(wl->dev); - out_unlock: wl->watchdog_recovery = false; clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags); |