linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()
@ 2019-07-15 10:00 Baolin Wang
  2019-07-15 11:26 ` Adrian Hunter
  2019-07-22 13:41 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Baolin Wang @ 2019-07-15 10:00 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson, zhang.lyra, orsonzhai
  Cc: baolin.wang, vincent.guittot, linux-mmc, linux-kernel

When the SD host controller tries to probe again due to the derferred
probe mechanism, it will always keep the SD host device as runtime
resume state due to missing the runtime put operation in error path
last time.

Thus add the pm_runtime_put_noidle() in error path to make the PM runtime
counter balance, which can make the SD host device's PM runtime work well.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 drivers/mmc/host/sdhci-sprd.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index 6ee340a..603a5d9 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -624,6 +624,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
 	sdhci_cleanup_host(host);
 
 pm_runtime_disable:
+	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_set_suspended(&pdev->dev);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()
  2019-07-15 10:00 [PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() Baolin Wang
@ 2019-07-15 11:26 ` Adrian Hunter
  2019-07-22 13:41 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2019-07-15 11:26 UTC (permalink / raw)
  To: Baolin Wang, ulf.hansson, zhang.lyra, orsonzhai
  Cc: vincent.guittot, linux-mmc, linux-kernel

On 15/07/19 1:00 PM, Baolin Wang wrote:
> When the SD host controller tries to probe again due to the derferred
> probe mechanism, it will always keep the SD host device as runtime
> resume state due to missing the runtime put operation in error path
> last time.
> 
> Thus add the pm_runtime_put_noidle() in error path to make the PM runtime
> counter balance, which can make the SD host device's PM runtime work well.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-sprd.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index 6ee340a..603a5d9 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -624,6 +624,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
>  	sdhci_cleanup_host(host);
>  
>  pm_runtime_disable:
> +	pm_runtime_put_noidle(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  	pm_runtime_set_suspended(&pdev->dev);
>  
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()
  2019-07-15 10:00 [PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() Baolin Wang
  2019-07-15 11:26 ` Adrian Hunter
@ 2019-07-22 13:41 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2019-07-22 13:41 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Adrian Hunter, Chunyan Zhang, Orson Zhai, Vincent Guittot,
	linux-mmc, Linux Kernel Mailing List

On Mon, 15 Jul 2019 at 12:00, Baolin Wang <baolin.wang@linaro.org> wrote:
>
> When the SD host controller tries to probe again due to the derferred
> probe mechanism, it will always keep the SD host device as runtime
> resume state due to missing the runtime put operation in error path
> last time.
>
> Thus add the pm_runtime_put_noidle() in error path to make the PM runtime
> counter balance, which can make the SD host device's PM runtime work well.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

Applied for fixes and by adding a fixes/stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-sprd.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index 6ee340a..603a5d9 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -624,6 +624,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
>         sdhci_cleanup_host(host);
>
>  pm_runtime_disable:
> +       pm_runtime_put_noidle(&pdev->dev);
>         pm_runtime_disable(&pdev->dev);
>         pm_runtime_set_suspended(&pdev->dev);
>
> --
> 1.7.9.5
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-22 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 10:00 [PATCH] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() Baolin Wang
2019-07-15 11:26 ` Adrian Hunter
2019-07-22 13:41 ` Ulf Hansson

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).