]> git.baikalelectronics.ru Git - kernel.git/commit
wlcore: Fix timout errors after recovery
authorTony Lindgren <tony@atomide.com>
Tue, 19 Jun 2018 09:43:39 +0000 (02:43 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Jun 2018 15:45:12 +0000 (18:45 +0300)
commitcf8d4c777ef0cd047e70eaf28de3337b2ab8b397
tree4e1748c31993fbd249478987d56fdccaad83f785
parent5c07729d00aa9ab40cc25b68be16aff59d0b2036
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>
drivers/net/wireless/ti/wlcore/main.c