linux-stable/drivers
Ulf Hansson 9a0f0bbac9 wlcore: sdio: Fixup power on/off sequence
[ Upstream commit 13e62626c5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:02:34 -07:00
..
accessibility
acpi acpi/nfit: Fix race accessing memdev in nfit_get_smbios_id() 2019-02-27 10:08:54 +01:00
amba
android binder: fix race that allows malicious free of live buffer 2018-12-05 19:32:11 +01:00
ata libata: Add NOLPM quirk for SAMSUNG MZ7TE512HMHP-000L1 SSD 2019-02-15 08:10:10 +01:00
atm atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:57 +01:00
auxdisplay auxdisplay: charlcd: fix x/y command parsing 2019-01-13 09:51:03 +01:00
base cacheinfo: Keep the old value if of_property_read_u32 fails 2019-02-12 19:47:26 +01:00
bcma
block block/swim3: Fix -EBUSY error when re-opening device after unmount 2019-02-12 19:47:18 +01:00
bluetooth Bluetooth: btrtl: Restore old logic to assume firmware is already loaded 2019-03-10 07:17:21 +01:00
bus
cdrom gdrom: fix a memory leak bug 2019-02-12 19:47:18 +01:00
char applicom: Fix potential Spectre v1 vulnerabilities 2019-03-10 07:17:20 +01:00
clk clk: qcom: gcc: Use active only source for CPUSS clocks 2019-03-13 14:02:27 -07:00
clocksource clocksource/drivers/integrator-ap: Add missing of_node_put() 2019-01-26 09:32:42 +01:00
connector
cpufreq cpufreq: Use struct kobj_attribute instead of struct global_attr 2019-03-10 07:17:15 +01:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:47:08 +01:00
crypto crypto: ux500 - Use proper enum in hash_set_dma_transfer 2019-02-12 19:47:17 +01:00
dax mm, devm_memremap_pages: fix shutdown handling 2019-01-13 09:51:04 +01:00
dca
devfreq
dio
dma dmaengine: imx-dma: fix wrong callback invoke 2019-02-12 19:47:24 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls 2019-02-20 10:25:48 +01:00
fmc
fpga fpga: altera-cvp: fix 'bad IO access' on x86_64 2019-02-12 19:46:59 +01:00
fsi fsi: master-ast-cf: select GENERIC_ALLOCATOR 2018-12-17 09:24:35 +01:00
gnss gnss: sirf: fix premature wakeup interrupt enable 2019-03-10 07:17:21 +01:00
gpio gpio: vf610: Mask all GPIO interrupts 2019-03-13 14:02:29 -07:00
gpu drm: Block fb changes for async plane updates 2019-03-05 17:58:53 +01:00
hid HID: debug: fix the ring buffer implementation 2019-02-12 19:47:24 +01:00
hsi
hv Drivers: hv: vmbus: Check for ring when getting debug info 2019-01-31 08:14:36 +01:00
hwmon hwmon: (tmp421) Correct the misspelling of the tmp442 compatible attribute in OF device ID table 2019-02-27 10:08:57 +01:00
hwspinlock
hwtracing intel_th: msu: Fix an off-by-one in attribute store 2019-01-13 09:51:10 +01:00
i2c i2c: sh_mobile: Add support for r8a774c0 (RZ/G2E) 2019-02-12 19:47:11 +01:00
ide ide: fix a typo in the settings proc file name 2019-01-31 08:14:42 +01:00
idle
iio iio: ti-ads8688: Update buffer allocation for timestamps 2019-02-15 08:10:10 +01:00
infiniband IB/ipoib: Fix for use-after-free in ipoib_cm_tx_start 2019-03-13 14:02:28 -07:00
input Input: elantech - enable 3rd button support on Fujitsu CELSIUS H780 2019-02-20 10:25:47 +01:00
iommu iommu/amd: Fix IOMMU page flush when detach device from a domain 2019-03-13 14:02:27 -07:00
ipack
irqchip irqchip/gic-v3-mbi: Fix uninitialized mbi_lock 2019-03-05 17:58:48 +01:00
isdn isdn: avm: Fix string plus integer warning from Clang 2019-02-27 10:08:58 +01:00
leds leds: lp5523: fix a missing check of return value of lp55xx_read 2019-02-27 10:08:57 +01:00
lightnvm lightnvm: pblk: add lock protection to list operations 2019-02-12 19:47:08 +01:00
macintosh
mailbox
mcb
md dm thin: fix bug where bio that overwrites thin block ignores FUA 2019-02-20 10:25:49 +01:00
media media: uvcvideo: Fix 'type' check leading to overflow 2019-03-13 14:02:26 -07:00
memory
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:47:10 +01:00
message
mfd mfd: mc13xxx: Fix a missing check of a register-read failure 2019-02-27 10:08:52 +01:00
misc eeprom: at24: add support for 24c2048 2019-02-20 10:25:35 +01:00
mmc mmc: sdhci-esdhc-imx: correct the fix of ERR004536 2019-03-05 17:58:53 +01:00
mtd mtd: rawnand: gpmi: fix MX28 bus master lockup problem 2019-02-15 08:10:10 +01:00
mux
net wlcore: sdio: Fixup power on/off sequence 2019-03-13 14:02:34 -07:00
nfc
ntb
nubus
nvdimm mm, devm_memremap_pages: fix shutdown handling 2019-01-13 09:51:04 +01:00
nvme nvme-multipath: drop optimization for static ANA group IDs 2019-03-05 17:58:51 +01:00
nvmem
of of: overlay: do not duplicate properties from overlay for new nodes 2019-02-06 17:30:16 +01:00
opp OPP: Use opp_table->regulators to verify no regulator case 2019-02-12 19:47:08 +01:00
oprofile
parisc
parport
pci PCI: Fix __initdata issue with "pci=disable_acs_redir" parameter 2019-02-23 09:07:26 +01:00
pcmcia
perf perf: arm_spe: handle devm_kasprintf() failure 2019-02-12 19:47:03 +01:00
phy phy: ath79-usb: Fix the main reset name to match the DT binding 2019-03-05 17:58:48 +01:00
pinctrl pinctrl: mcp23s08: spi: Fix regmap allocation for mcp23s18 2019-03-13 14:02:34 -07:00
platform platform/x86: Fix unmet dependency warning for SAMSUNG_Q10 2019-03-13 14:02:31 -07:00
pnp
power power: supply: olpc_battery: correct the temperature units 2019-01-13 09:51:10 +01:00
powercap
pps
ps3
ptp ptp: Fix pass zero to ERR_PTR() in ptp_clock_register 2019-02-12 19:47:01 +01:00
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc rtc: m41t80: Correct alarm month range with RTC reads 2019-01-09 17:38:48 +01:00
s390 s390/zcrypt: fix specification exception on z196 during ap probe 2019-02-20 10:25:48 +01:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:15:17 +01:00
scsi scsi: 53c700: pass correct "dev" to dma_alloc_attrs() 2019-03-13 14:02:31 -07:00
sfi
sh
siox
slimbus slimbus: ngd: mark PM functions as __maybe_unused 2018-12-19 19:19:49 +01:00
sn
soc soc: fsl: qbman: avoid race in clearing QMan interrupt 2019-03-13 14:02:33 -07:00
soundwire
spi spi: bcm2835: Unbreak the build of esoteric configs 2019-01-09 17:38:49 +01:00
spmi
ssb
staging staging: android: ashmem: Avoid range_alloc() allocation with ashmem_mutex held. 2019-03-10 07:17:16 +01:00
target scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes 2019-02-27 10:08:55 +01:00
tc
tee tee: optee: avoid possible double list_del() 2019-02-12 19:47:08 +01:00
thermal drivers: thermal: int340x_thermal: Fix sysfs race condition 2019-03-05 17:58:48 +01:00
thunderbolt thunderbolt: Prevent root port runtime suspend during NVM upgrade 2018-12-17 09:24:36 +01:00
tty serial: fsl_lpuart: fix maximum acceptable baud rate with over-sampling 2019-03-05 17:58:49 +01:00
uio
usb USB: serial: cp210x: fix GPIO in autosuspend 2019-03-10 07:17:21 +01:00
uwb
vfio vfio/type1: Fix unmap overflow off-by-one 2019-01-16 22:04:34 +01:00
vhost vhost: return EINVAL if iovecs size does not match the message size 2019-02-27 10:08:56 +01:00
video udlfb: handle unplug properly 2019-02-27 10:09:03 +01:00
virt vbox: fix link error with 'gcc -Og' 2019-02-12 19:46:59 +01:00
virtio
visorbus
vlynq
vme
w1
watchdog watchdog: mt7621_wdt/rt2880_wdt: Fix compilation problem 2019-02-27 10:08:52 +01:00
xen pvcalls-front: fix potential null dereference 2019-02-27 10:08:56 +01:00
zorro
Kconfig
Makefile