* REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
@ 2018-06-12 22:12 John Stultz
2018-06-13 3:35 ` John Stultz
2018-06-13 4:13 ` Tony Lindgren
0 siblings, 2 replies; 6+ messages in thread
From: John Stultz @ 2018-06-12 22:12 UTC (permalink / raw)
To: Kalle Valo, Eyal Reizer; +Cc: Tony Lindgren, Valentin Schneider, lkml
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
2018-06-12 22:12 REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960 John Stultz
@ 2018-06-13 3:35 ` John Stultz
2018-06-13 4:13 ` Tony Lindgren
1 sibling, 0 replies; 6+ messages in thread
From: John Stultz @ 2018-06-13 3:35 UTC (permalink / raw)
To: Kalle Valo, Eyal Reizer; +Cc: Tony Lindgren, Valentin Schneider, lkml
On Tue, Jun 12, 2018 at 3:12 PM, John Stultz <john.stultz@linaro.org> wrote:
> 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?
This also effects the older HiKey board as well.
thanks
-john
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
2018-06-12 22:12 REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960 John Stultz
2018-06-13 3:35 ` John Stultz
@ 2018-06-13 4:13 ` Tony Lindgren
2018-06-13 14:42 ` Valentin Schneider
1 sibling, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2018-06-13 4:13 UTC (permalink / raw)
To: John Stultz; +Cc: Kalle Valo, Eyal Reizer, Valentin Schneider, lkml
* John Stultz <john.stultz@linaro.org> [180612 22:15]:
> 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)
Sorry to hear about that.
> 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?
Sounds like we need to ignore also -EACCES if runtime PM is
disabled for MMC. Care to try and see if the patch below
helps?
Regards,
Tony
8< ------------------------
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -155,7 +155,7 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue)
struct mmc_card *card = func->card;
ret = pm_runtime_get_sync(&card->dev);
- if (ret < 0) {
+ if (ret < 0 && ret != -EACCES) {
pm_runtime_put_noidle(&card->dev);
dev_err(glue->dev, "%s: failed to get_sync(%d)\n",
__func__, ret);
@@ -182,7 +182,7 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
/* Let runtime PM know the card is powered off */
error = pm_runtime_put(&card->dev);
- if (error < 0 && error != -EBUSY) {
+ if (error < 0 && error != -EBUSY && error != -EACCES) {
dev_err(&card->dev, "%s failed: %i\n", __func__, error);
return error;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
2018-06-13 4:13 ` Tony Lindgren
@ 2018-06-13 14:42 ` Valentin Schneider
2018-06-13 17:14 ` John Stultz
0 siblings, 1 reply; 6+ messages in thread
From: Valentin Schneider @ 2018-06-13 14:42 UTC (permalink / raw)
To: Tony Lindgren, John Stultz; +Cc: Kalle Valo, Eyal Reizer, lkml
Hi,
On 13/06/18 05:13, Tony Lindgren wrote:
> * John Stultz <john.stultz@linaro.org> [180612 22:15]:
>> 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)
>
> Sorry to hear about that.
>
>> 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?
>
> Sounds like we need to ignore also -EACCES if runtime PM is
> disabled for MMC. Care to try and see if the patch below
> helps?
>
I don't use wifi with my board (I have an USB ethernet adapter), but I do
get the same error message as John.
Reverting the patches works and I do see wlan0 being brought up. Sadly,
applying your patch doesn't seem to fix the issue - and actually it seems
to freeze my board on first boot with this error:
[ 11.169127] wlcore: ERROR timeout waiting for the hardware to complete initialization
On second boot it finally comes to life, but issuing ifconfig freezes it again.
$ dmesg | grep wl
[ 5.922661] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[ 5.933904] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[ 5.949158] wlcore: WARNING falling back to default config
[ 6.199806] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[ 6.210738] wlcore: WARNING Detected unconfigured mac address in nvs, derive from fuse instead.
[ 6.221644] wlcore: WARNING This default nvs file can be removed from the file system
[ 6.235180] wlcore: loaded
[ 6.820146] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 7.280611] wlcore: PHY firmware version: Rev 8.2.0.0.236
[ 7.388339] wlcore: firmware booted (Rev 8.9.0.0.69)
[ 7.409610] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 7.417815] wlcore: down
[ 10.628867] wlcore: ERROR timeout waiting for the hardware to complete initialization
Seems like it's not getting powered on, which might be why those mmc_power_*
calls were in there originally ?
> Regards,
>
> Tony
>
> 8< ------------------------
> diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
> --- a/drivers/net/wireless/ti/wlcore/sdio.c
> +++ b/drivers/net/wireless/ti/wlcore/sdio.c
> @@ -155,7 +155,7 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue)
> struct mmc_card *card = func->card;
>
> ret = pm_runtime_get_sync(&card->dev);
> - if (ret < 0) {
> + if (ret < 0 && ret != -EACCES) {
> pm_runtime_put_noidle(&card->dev);
> dev_err(glue->dev, "%s: failed to get_sync(%d)\n",
> __func__, ret);
> @@ -182,7 +182,7 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
>
> /* Let runtime PM know the card is powered off */
> error = pm_runtime_put(&card->dev);
> - if (error < 0 && error != -EBUSY) {
> + if (error < 0 && error != -EBUSY && error != -EACCES) {
> dev_err(&card->dev, "%s failed: %i\n", __func__, error);
>
> return error;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
2018-06-13 14:42 ` Valentin Schneider
@ 2018-06-13 17:14 ` John Stultz
2018-06-14 11:34 ` Tony Lindgren
0 siblings, 1 reply; 6+ messages in thread
From: John Stultz @ 2018-06-13 17:14 UTC (permalink / raw)
To: Valentin Schneider
Cc: Tony Lindgren, Kalle Valo, Eyal Reizer, lkml, Ryan Grachek
On Wed, Jun 13, 2018 at 7:42 AM, Valentin Schneider
<valentin.schneider@arm.com> wrote:
> On 13/06/18 05:13, Tony Lindgren wrote:
>> * John Stultz <john.stultz@linaro.org> [180612 22:15]:
>>> 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)
>>
>> Sorry to hear about that.
>>
>>> 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?
>>
>> Sounds like we need to ignore also -EACCES if runtime PM is
>> disabled for MMC. Care to try and see if the patch below
>> helps?
>>
>
> I don't use wifi with my board (I have an USB ethernet adapter), but I do
> get the same error message as John.
>
> Reverting the patches works and I do see wlan0 being brought up. Sadly,
> applying your patch doesn't seem to fix the issue - and actually it seems
> to freeze my board on first boot with this error:
>
> [ 11.169127] wlcore: ERROR timeout waiting for the hardware to complete initialization
>
> On second boot it finally comes to life, but issuing ifconfig freezes it again.
>
> $ dmesg | grep wl
> [ 5.922661] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
> [ 5.933904] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
> [ 5.949158] wlcore: WARNING falling back to default config
> [ 6.199806] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
> [ 6.210738] wlcore: WARNING Detected unconfigured mac address in nvs, derive from fuse instead.
> [ 6.221644] wlcore: WARNING This default nvs file can be removed from the file system
> [ 6.235180] wlcore: loaded
> [ 6.820146] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> [ 7.280611] wlcore: PHY firmware version: Rev 8.2.0.0.236
> [ 7.388339] wlcore: firmware booted (Rev 8.9.0.0.69)
> [ 7.409610] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> [ 7.417815] wlcore: down
> [ 10.628867] wlcore: ERROR timeout waiting for the hardware to complete initialization
>
>
> Seems like it's not getting powered on, which might be why those mmc_power_*
> calls were in there originally ?
Ryan Grachek came up with a different solution. I still need to
validate it, but it seems promising:
https://lkml.org/lkml/2018/6/13/481
thanks
-john
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
2018-06-13 17:14 ` John Stultz
@ 2018-06-14 11:34 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2018-06-14 11:34 UTC (permalink / raw)
To: John Stultz
Cc: Valentin Schneider, Kalle Valo, Eyal Reizer, lkml, Ryan Grachek
* John Stultz <john.stultz@linaro.org> [180613 17:17]:
> On Wed, Jun 13, 2018 at 7:42 AM, Valentin Schneider
> <valentin.schneider@arm.com> wrote:
> > On 13/06/18 05:13, Tony Lindgren wrote:
> >> * John Stultz <john.stultz@linaro.org> [180612 22:15]:
> >>> 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)
> >>
> >> Sorry to hear about that.
> >>
> >>> 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?
> >>
> >> Sounds like we need to ignore also -EACCES if runtime PM is
> >> disabled for MMC. Care to try and see if the patch below
> >> helps?
> >>
> >
> > I don't use wifi with my board (I have an USB ethernet adapter), but I do
> > get the same error message as John.
> >
> > Reverting the patches works and I do see wlan0 being brought up. Sadly,
> > applying your patch doesn't seem to fix the issue - and actually it seems
> > to freeze my board on first boot with this error:
> >
> > [ 11.169127] wlcore: ERROR timeout waiting for the hardware to complete initialization
> >
> > On second boot it finally comes to life, but issuing ifconfig freezes it again.
> >
> > $ dmesg | grep wl
> > [ 5.922661] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
> > [ 5.933904] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
> > [ 5.949158] wlcore: WARNING falling back to default config
> > [ 6.199806] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
> > [ 6.210738] wlcore: WARNING Detected unconfigured mac address in nvs, derive from fuse instead.
> > [ 6.221644] wlcore: WARNING This default nvs file can be removed from the file system
> > [ 6.235180] wlcore: loaded
> > [ 6.820146] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> > [ 7.280611] wlcore: PHY firmware version: Rev 8.2.0.0.236
> > [ 7.388339] wlcore: firmware booted (Rev 8.9.0.0.69)
> > [ 7.409610] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> > [ 7.417815] wlcore: down
> > [ 10.628867] wlcore: ERROR timeout waiting for the hardware to complete initialization
> >
> >
> > Seems like it's not getting powered on, which might be why those mmc_power_*
> > calls were in there originally ?
>
> Ryan Grachek came up with a different solution. I still need to
> validate it, but it seems promising:
> https://lkml.org/lkml/2018/6/13/481
Oh OK good to hear. Yeah that makes sense to me now.
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-14 11:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 22:12 REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960 John Stultz
2018-06-13 3:35 ` John Stultz
2018-06-13 4:13 ` Tony Lindgren
2018-06-13 14:42 ` Valentin Schneider
2018-06-13 17:14 ` John Stultz
2018-06-14 11:34 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).