linux-stable/drivers/net
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
..
appletalk
arcnet
bonding bonding: update nest level on unlink 2019-01-22 21:40:31 +01:00
caif
can can: flexcan: fix NULL pointer exception during bringup 2019-01-31 08:14:39 +01:00
dsa net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode 2019-03-10 07:17:20 +01:00
ethernet net: macb: Apply RXUBR workaround only to versions with errata 2019-03-13 14:02:31 -07:00
fddi
fjes
hamradio net/hamradio/6pack: use mod_timer() to rearm timers 2019-01-09 17:38:32 +01:00
hippi
hyperv hv_netvsc: Fix IP header checksum for coalesced packets 2019-03-10 07:17:17 +01:00
ieee802154 ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done 2019-01-13 09:50:58 +01:00
ipvlan ipvlan, l3mdev: fix broken l3s mode wrt local routes 2019-02-06 17:30:06 +01:00
netdevsim
phy net: phy: phylink: fix uninitialized variable in phylink_get_mac_state 2019-03-10 07:17:18 +01:00
plip
ppp net: Fix usage of pskb_trim_rcsum 2019-01-31 08:14:31 +01:00
slip
team team: Free BPF filter when unregistering netdev 2019-03-10 07:17:17 +01:00
usb qmi_wwan: Add support for Quectel EG12/EM12 2019-03-10 07:17:17 +01:00
vmxnet3
wan net/wan: fix a double free in x25_asy_open_tty() 2019-01-09 17:38:32 +01:00
wimax
wireless wlcore: sdio: Fixup power on/off sequence 2019-03-13 14:02:34 -07:00
xen-netback xen-netback: fix occasional leak of grant ref mappings under memory pressure 2019-03-10 07:17:19 +01:00
dummy.c
eql.c
geneve.c geneve: correctly handle ipv6.disable module parameter 2019-03-10 07:17:17 +01:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: loopback: clear skb->tstamp before netif_rx() 2018-11-13 11:08:20 -08:00
macsec.c
macvlan.c macvlan: return correct error value 2018-12-21 14:15:20 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c failover: Add missing check to validate 'slave_dev' in net_failover_slave_unregister 2018-11-13 11:08:28 -08:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: do not free skb before reading its length 2018-12-05 19:31:59 +01:00
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: remove unnecessary memory barrier 2019-03-10 07:17:19 +01:00
veth.c
virtio_net.c virtio_net: Account for tx bytes and packets on sending xdp_frames 2019-02-12 19:47:23 +01:00
vrf.c
vsockmon.c
vxlan.c vxlan: test dev->flags & IFF_UP before calling netif_rx() 2019-02-23 09:07:25 +01:00
xen-netfront.c xen/netfront: tolerate frags with no data 2019-01-09 17:38:34 +01:00