summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBean Huo <beanhuo@micron.com>2021-04-14 23:22:36 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2021-04-15 13:43:46 +0200
commit5b96247c68d891ffdfd103315d04989e7feaa4ed (patch)
tree8d4cf05e0094e4800f4091aa6c2e50965e5154d2 /drivers
parent5e52a168be3775c06cce279b03d156efbad5478b (diff)
downloadlinux-5b96247c68d891ffdfd103315d04989e7feaa4ed.tar.bz2
mmc: core: Let eMMC sanitize not retry in case of timeout/failure
Not all commands need to be retried in case of a timeout/failure. This is the case for the eMMC sanitize command, for example, which is issued through the ioctl interface. More precisely, in case of timeout, retrying could make the user wait for a very long time as each retry loop could last for a couple of minutes. Therefore, let's not use retries for the eMMC sanitize command. Signed-off-by: Bean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20210414212236.346813-3-huobean@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/mmc_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 1ca0c89081be..cdf02d88fe92 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -1028,8 +1028,8 @@ int mmc_sanitize(struct mmc_card *card, unsigned int timeout_ms)
mmc_retune_hold(host);
- err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_SANITIZE_START,
- 1, timeout_ms);
+ err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_SANITIZE_START,
+ 1, timeout_ms, 0, true, false, 0);
if (err)
pr_err("%s: Sanitize failed err=%d\n", mmc_hostname(host), err);