From 4d970531648b069cb3c4a00156ebab04d0c697c5 Mon Sep 17 00:00:00 2001 From: Yifeng Zhao Date: Wed, 20 Nov 2024 17:38:58 +0800 Subject: [PATCH] mmc: cqhci: add emmc hardware reset after cqe recovery When an eMMC error occurs due to changes in hardware conditions (such as temperature, voltage, etc.), it may not return to normal without reinitializing the eMMC. In this case, adding hardware reset and reinitialization can solve the problem. Change-Id: Ie2164175c59402d06fcb0d774aaba6d712f947d9 Signed-off-by: Yifeng Zhao --- drivers/mmc/host/cqhci-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c index c14d7251d0bb..6db5bf147525 100644 --- a/drivers/mmc/host/cqhci-core.c +++ b/drivers/mmc/host/cqhci-core.c @@ -1120,6 +1120,9 @@ static void cqhci_recovery_finish(struct mmc_host *mmc) cqhci_set_irqs(cq_host, CQHCI_IS_MASK); + /* Add emmc hardware reset after cqe recovery. */ + mmc_hw_reset(mmc->card); + pr_debug("%s: cqhci: recovery done\n", mmc_hostname(mmc)); }