From f649debf15dac1fc6e0793c961a0230b812c62eb Mon Sep 17 00:00:00 2001 From: Vijay Viswanath Date: Fri, 14 Oct 2016 09:37:37 +0530 Subject: [PATCH] mmc: core: Avoid frequent enable/disable of Auto BKOPS During suspend/resume, the driver writes to AUTOBKOPS_EN bit in EXT_CSD register of eMMC which is R/W/E. Even after power off R/W/E bit will retain it's value, as it will be stored in NAND flash. Multiple writes can wear out the specific NAND block which store the system data(AUTO BKOPS bit in this case). So to avoid this, enabling/disabling of autobkops has been removed from suspend and resume. The background operations, if any, will stop when sleep command is sent during suspend process. Change-Id: I8aa7eda86beafacb3337be81c5a7f1f1e86f4998 Signed-off-by: Vijay Viswanath --- drivers/mmc/core/mmc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 89288bd1eaa4..a3f650f5ee9f 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -2514,12 +2514,6 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend) goto out; } - if (mmc_card_doing_auto_bkops(host->card)) { - err = mmc_set_auto_bkops(host->card, false); - if (err) - goto out; - } - err = mmc_flush_cache(host->card); if (err) goto out; @@ -2599,9 +2593,6 @@ static int mmc_partial_init(struct mmc_host *host) pr_debug("%s: %s: reading and comparing ext_csd successful\n", mmc_hostname(host), __func__); - if (mmc_card_support_auto_bkops(host->card)) - (void)mmc_set_auto_bkops(host->card, true); - if (card->ext_csd.cmdq_support && (card->host->caps2 & MMC_CAP2_CMD_QUEUE)) { err = mmc_select_cmdq(card);