Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Yunpeng Gao <yunpeng.gao@intel.com>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: blk: add emmc cache flush in shutdown callback
Date: Mon, 14 Jul 2014 18:51:20 +0900	[thread overview]
Message-ID: <53C3A818.7030107@samsung.com> (raw)
In-Reply-To: <1405330459-2335-1-git-send-email-yunpeng.gao@intel.com>

Hi,

On 07/14/2014 06:34 PM, Yunpeng Gao wrote:
> If eMMC Cache feature enabled, we'd better flush
> eMMC cache in the shutdown callback. Otherwise
> data corruption issue may be observed.

I knew mmc_flush_cache() is called into mmc_shutdown() (driver/mmc/core/mmc.c)
Which data corruption is occurred? Could you explain more?

Best Regards,
Jaehoon Chung 

> 
> Signed-off-by: Yunpeng Gao <yunpeng.gao@intel.com>
> ---
>  drivers/mmc/card/block.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 452782b..8a4010e 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -2509,6 +2509,10 @@ static int _mmc_blk_suspend(struct mmc_card *card)
>  static void mmc_blk_shutdown(struct mmc_card *card)
>  {
>  	_mmc_blk_suspend(card);
> +
> +	mmc_claim_host(card->host);
> +	mmc_flush_cache(card);
> +	mmc_release_host(card->host);
>  }
>  
>  #ifdef CONFIG_PM
> 


  reply	other threads:[~2014-07-14  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14  9:34 [PATCH] mmc: blk: add emmc cache flush in shutdown callback Yunpeng Gao
2014-07-14  9:51 ` Jaehoon Chung [this message]
2014-07-14 11:09   ` Gao, Yunpeng

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=53C3A818.7030107@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=yunpeng.gao@intel.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