summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2022-05-31 20:19:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-14 18:41:46 +0200
commit6f00f191d5c1bbdeeaca6fc4ada7157f422c0ceb (patch)
treeb2bc22aa97bce7e2691c52895b0c2370dd7d6e2d
parent8063a9f0085bf1001cbfc8e5d96df4a4c1b2a54a (diff)
downloadlinux-6f00f191d5c1bbdeeaca6fc4ada7157f422c0ceb.tar.gz
linux-6f00f191d5c1bbdeeaca6fc4ada7157f422c0ceb.zip
mmc: block: Fix CQE recovery reset success
commit a051246b786af7e4a9d9219cc7038a6e8a411531 upstream. The intention of the use of mmc_blk_reset_success() in mmc_blk_cqe_recovery() was to prevent repeated resets when retrying and getting the same error. However, that may not be the case - any amount of time and I/O may pass before another recovery is needed, in which case there would be no reason to deny it the opportunity to recover via a reset if necessary. CQE recovery is expected seldom and failure to recover (if the clear tasks command fails), even more seldom, so it is better to allow the reset always, which can be done by calling mmc_blk_reset_success() always. Fixes: 1e8e55b67030c6 ("mmc: block: Add CQE support") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20220531171922.76080-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/mmc/core/block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 52e4106bcb6e..57f5e0a4d7d7 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1482,8 +1482,7 @@ void mmc_blk_cqe_recovery(struct mmc_queue *mq)
err = mmc_cqe_recovery(host);
if (err)
mmc_blk_reset(mq->blkdata, host, MMC_BLK_CQE_RECOVERY);
- else
- mmc_blk_reset_success(mq->blkdata, MMC_BLK_CQE_RECOVERY);
+ mmc_blk_reset_success(mq->blkdata, MMC_BLK_CQE_RECOVERY);
pr_debug("%s: CQE recovery done\n", mmc_hostname(host));
}