All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH V2] mmc: mmc: Attempt to flush cache before reset
Date: Wed, 4 May 2016 13:13:57 +0200	[thread overview]
Message-ID: <CAPDyKFrFq5wDgr+FpTLH275BF3MQeW9MET3AsQ6HcKtCS9rhHg@mail.gmail.com> (raw)
In-Reply-To: <5729A6ED.4010009@intel.com>

On 4 May 2016 at 09:38, Adrian Hunter <adrian.hunter@intel.com> wrote:
> CMD0 or hardware reset may invalidate the cache, so it needs to be
> flushed before reset.
>
> In the case of recovery, we can't expect flushing the cache to work
> always, but have a go and ignore errors.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>
>
> Changes in V2:
>
>         Do flush in mmc_reset() instead of mmc_hw_reset()
>
>
>  drivers/mmc/core/mmc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 0cf42af33d0f..d4d1b77c1c1e 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1965,6 +1965,12 @@ static int mmc_reset(struct mmc_host *host)
>  {
>         struct mmc_card *card = host->card;
>
> +       /*
> +        * In the case of recovery, we can't expect flushing the cache to work
> +        * always, but we have a go and ignore errors.
> +        */
> +       mmc_flush_cache(host->card);
> +
>         if ((host->caps & MMC_CAP_HW_RESET) && host->ops->hw_reset &&
>              mmc_can_reset(card)) {
>                 /* If the card accept RST_n signal, send it. */
> --
> 1.9.1
>
>

      reply	other threads:[~2016-05-04 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28  7:48 [PATCH] mmc: core: Attempt to flush cache before reset Adrian Hunter
2016-05-02  8:31 ` Ulf Hansson
2016-05-04  7:38   ` [PATCH V2] mmc: mmc: " Adrian Hunter
2016-05-04 11:13     ` Ulf Hansson [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=CAPDyKFrFq5wDgr+FpTLH275BF3MQeW9MET3AsQ6HcKtCS9rhHg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=linux-mmc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.