linux/drivers/net/wireless/ti/wlcore
Ulf Hansson 13e62626c5 wlcore: sdio: Fixup power on/off sequence
During "wlan-up", we are programming the FW into the WiFi-chip. However,
re-programming the FW doesn't work, unless a power cycle of the WiFi-chip
is made in-between the programmings.

To conform to this requirement and to fix the regression in a simple way,
let's start by allowing that the SDIO card (WiFi-chip) may stay powered on
(runtime resumed) when wl12xx_sdio_power_off() returns. The intent with the
current code is to treat this scenario as an error, but unfortunate this
doesn't work as expected, so let's fix this.

The other part is to guarantee that a power cycle of the SDIO card has been
completed when wl12xx_sdio_power_on() returns, as to allow the FW
programming to succeed. However, relying solely on runtime PM to deal with
this isn't sufficient. For example, userspace may prevent runtime suspend
via sysfs for the device that represents the SDIO card, leading to that the
mmc core also keeps it powered on. For this reason, let's instead do a
brute force power cycle in wl12xx_sdio_power_on().

Fixes: 728a9dc61f ("wlcore: sdio: Fix flakey SDIO runtime PM handling")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-01-22 18:23:49 +02:00
..
acx.c wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
acx.h wlcore: fix unused function warning 2017-12-14 14:44:31 +02:00
boot.c
boot.h
cmd.c wlcore: Fix memory leak in wlcore_cmd_wait_for_event_or_timeout 2018-07-04 18:14:09 +03:00
cmd.h
conf.h
debug.h
debugfs.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
debugfs.h
event.c
event.h
hw_ops.h
ini.h
init.c
init.h
io.c
io.h
Kconfig
main.c wlcore: Add support for optional wakeirq 2018-10-05 11:33:31 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ps.c wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
ps.h wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
rx.c wlcore: Set rx_status boottime_ns field on rx 2018-07-31 10:24:10 +03:00
rx.h
scan.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
scan.h
sdio.c wlcore: sdio: Fixup power on/off sequence 2019-01-22 18:23:49 +02:00
spi.c wlcore: add missing nvs file name info for wilink8 2017-08-24 12:51:22 +03:00
sysfs.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
sysfs.h
testmode.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
testmode.h
tx.c wlcore: Enable runtime PM autosuspend support 2018-06-27 18:45:24 +03:00
tx.h
vendor_cmd.c wlcore: Fix the return value in case of error in 'wlcore_vendor_cmd_smart_config_start()' 2018-11-06 18:53:14 +02:00
vendor_cmd.h
wl12xx_80211.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wlcore_i.h wlcore: Add support for runtime PM 2018-06-27 18:44:47 +03:00
wlcore.h wlcore: Add support for optional wakeirq 2018-10-05 11:33:31 +03:00