2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00
linux-next/drivers/net/wireless/ti
Ido Yariv 645865fc37 wlcore: Fix sdio out-of-sync power state
wl12xx_sdio_power_off() manually powers down the card regardless of the
runtime pm state. If wl12xx_sdio_power_on() is called before the card
was suspended by runtime PM, it will not power up the card.

As part of the HW detection, the chip's power is toggled. Since this
happens in the context of probing sdio, the power reference counter will
be higher than zero. As a result, when wl12xx_sdio_power_off() is
called, the chip will be powered down while still having a positive
power reference counter. If the interface is quickly activated, the
driver might try to transfer data to a powered off chip.

Fix this by ensuring that wl12xx_sdio_power_on() explicitly powers on
the chip in case runtime pm claims the chip is already powered on. To
avoid cases in which it is not possible to determine if the chip was
really powered on (card's power reference counter is positive), operate
on the mmc_card instead of the function.

Also verify that the chip is indeed powered on before powering off, to
avoid wrong reference counter values in error cases.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22 10:46:33 +03:00
..
wl12xx wl18xx: sane defaults for HT capabilities 2012-06-21 16:48:20 +03:00
wl18xx wl18xx: use %zu for size_t arguments in printk calls 2012-06-21 16:48:21 +03:00
wl1251 wl1251: fix oops on early interrupt 2012-05-25 11:16:16 -04:00
wlcore wlcore: Fix sdio out-of-sync power state 2012-06-22 10:46:33 +03:00
Kconfig wl18xx: add new module 2012-06-05 15:54:04 +03:00
Makefile wl18xx: add new module 2012-06-05 15:54:04 +03:00