From: Tony Lindgren <tony@atomide.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Kalle Valo <kvalo@codeaurora.org>, Eyal Reizer <eyalr@ti.com>,
Valentin Schneider <Valentin.Schneider@arm.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: REGRESSION: "wlcore: sdio: allow pm to handle sdio power" breaks wifi on HiKey960
Date: Tue, 12 Jun 2018 21:13:19 -0700 [thread overview]
Message-ID: <20180613041319.GA112168@atomide.com> (raw)
In-Reply-To: <CALAqxLW=nrX-S9eibsTc+S_4YsZ166OJgZGj_1TZRWZ2ut7aFQ@mail.gmail.com>
* 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;
next prev parent reply other threads:[~2018-06-13 4:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 22:12 John Stultz
2018-06-13 3:35 ` John Stultz
2018-06-13 4:13 ` Tony Lindgren [this message]
2018-06-13 14:42 ` Valentin Schneider
2018-06-13 17:14 ` John Stultz
2018-06-14 11:34 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180613041319.GA112168@atomide.com \
--to=tony@atomide.com \
--cc=Valentin.Schneider@arm.com \
--cc=eyalr@ti.com \
--cc=john.stultz@linaro.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome