mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Baolin Wang <baolin.wang@linaro.org>, ulf.hansson@linaro.org
Cc: zhang.lyra@gmail.com, orsonzhai@gmail.com,
	linus.walleij@linaro.org, vincent.guittot@linaro.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: host: sdhci: Fix the incorrect soft reset operation when runtime resuming
Date: Mon, 15 Jul 2019 14:19:35 +0300	[thread overview]
Message-ID: <c54077a4-3aae-c95c-8491-db5f05b0305c@intel.com> (raw)
In-Reply-To: <4c5812f54e5094fa54a85bdc86687a523df254b3.1563184923.git.baolin.wang@linaro.org>

On 15/07/19 1:58 PM, Baolin Wang wrote:
> In sdhci_runtime_resume_host() function, we will always do software reset
> for all, but according to the specification, we should issue reset command
> and reinitialize the SD/eMMC card.

Where does it say that?

>                                    However, we only do reinitialize the
> SD/eMMC card when the SD/eMMC card are power down during runtime suspend.
> 
> Thus for those platforms that do not power down the SD/eMMC card during
> runtime suspend, we should not do software reset for all.
>                                                           To fix this
> issue, we can add one condition to validate the MMC_CAP_AGGRESSIVE_PM
> to decide if we can do software reset for all or just reset command
> and data lines.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
>  drivers/mmc/host/sdhci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 9715834..470c5e0 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -3333,7 +3333,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host)
>  			host->ops->enable_dma(host);
>  	}
>  
> -	sdhci_init(host, 0);
> +	sdhci_init(host, !(mmc->caps & MMC_CAP_AGGRESSIVE_PM));

We have done a full reset for a long time, so it would be surprising to need
to change it.

What problem is it causing?

>  
>  	if (mmc->ios.power_mode != MMC_POWER_UNDEFINED &&
>  	    mmc->ios.power_mode != MMC_POWER_OFF) {
> 

  reply	other threads:[~2019-07-15 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 10:58 Baolin Wang
2019-07-15 11:19 ` Adrian Hunter [this message]
2019-07-15 11:37   ` Baolin Wang
2019-07-15 12:37     ` Adrian Hunter
2019-07-16  5:37       ` Baolin Wang

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=c54077a4-3aae-c95c-8491-db5f05b0305c@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=baolin.wang@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=zhang.lyra@gmail.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

all inboxes | Powered by JetHome®