linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Eyal Reizer <eyalr@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>, Guy Mishol <guym@ti.com>,
	Luca Coelho <luciano.coelho@intel.com>,
	Maital Hahn <maitalm@ti.com>,
	Maxim Altshul <maxim.altshul@ti.com>,
	Shahar Patury <shaharp@ti.com>,
	linux-wireless@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] wlcore: sdio: Fix flakey SDIO runtime PM handling
Date: Tue, 15 May 2018 13:27:48 -0700	[thread overview]
Message-ID: <20180515202747.GD98604@atomide.com> (raw)
In-Reply-To: <20180515154334.121621-1-tony@atomide.com>

* Tony Lindgren <tony@atomide.com> [180515 15:46]:
> We can have pm_runtime_get_sync() return 1, and we can have
> pm_runtime_put_sync() return -EBUSY. See rpm_suspend() and
> rpm_resume() for more information.
> 
> Fix the issue by returning 0 from wl12xx_sdio_power_on() on success.
> And use pm_runtime_put() instead of pm_runtime_put_sync() for
> wl12xx_sdio_power_off(), then the MMC subsystem will idle the bus
> when suitable.
> 
> Otherwise wlcore can sometimes get confused and may report bogus
> errors and WLAN connection can fail.
> @@ -180,7 +180,7 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
>  	sdio_release_host(func);
>  
>  	/* Let runtime PM know the card is powered off */
> -	return pm_runtime_put_sync(&card->dev);
> +	return pm_runtime_put(&card->dev);
>  }

Looks like we can still get -EBUSY here though. I think we
can just ignore the return value of pm_runtime_put() here.

Regards,

Tony

      reply	other threads:[~2018-05-15 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 15:43 [PATCH] wlcore: sdio: Fix flakey SDIO runtime PM handling Tony Lindgren
2018-05-15 20:27 ` Tony Lindgren [this message]

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=20180515202747.GD98604@atomide.com \
    --to=tony@atomide.com \
    --cc=eyalr@ti.com \
    --cc=guym@ti.com \
    --cc=kishon@ti.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=maitalm@ti.com \
    --cc=maxim.altshul@ti.com \
    --cc=shaharp@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).