REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960

From: John Stultz
Date: Tue Jun 12 2018 - 18:12:46 EST


Hey Folks,
I noticed with linus/master wifi wasn't coming up on HiKey960. I
bisected it down and it seems to be due to:

60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power") and
728a9dc61f13 ("wlcore: sdio: Fix flakey SDIO runtime PM handling")


When wifi fails to load, the only useful error message I see is:
[ 8.466097] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
to get_sync(-13)

Reverting those two changes gets wifi working again for me:
[ 8.754953] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[ 8.761778] random: crng init done
[ 8.765185] random: 7 urandom warning(s) missed due to ratelimiting
[ 8.779149] wlcore: loaded
...
[ 12.945903] wlcore: PHY firmware version: Rev 8.2.0.0.237
[ 13.058077] wlcore: firmware booted (Rev 8.9.0.0.70)


Any suggestions how to resolve this w/o a revert?

thanks
-john