From 53eb7ca76b981809e0362038f4a82930c8b1cc8f Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Fri, 27 May 2016 14:54:50 +0800 Subject: [PATCH] mmc: core: don't check card status when flushing cache It's meaningless to check the card's status which execute the on-going flush. As the status been responsed make no any sense here. Change-Id: I34197d1c93c01337dd2e68ec22e3ce8dd195c424 Signed-off-by: Shawn Lin --- drivers/mmc/core/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 5afb319bb40e..44432229acc5 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2785,8 +2785,9 @@ int mmc_flush_cache(struct mmc_card *card) if (mmc_card_mmc(card) && (card->ext_csd.cache_size > 0) && (card->ext_csd.cache_ctrl & 1)) { - err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_FLUSH_CACHE, 1, 0); + err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_FLUSH_CACHE, 1, 1, + true, false, false); if (err) pr_err("%s: cache flush error %d\n", mmc_hostname(card->host), err); -- 2.34.1