lkml.org 
[lkml]   [2022]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V1 1/2] mmc: core: Introduce new flag to force hardware reset
Date
Introduce new flag cqe_recovery_reset_always to allow vendors to force
hardware reset during cqe recovery.

Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
---
drivers/mmc/core/block.c | 2 +-
include/linux/mmc/host.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 1259ca22d625..496cdd8a2999 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1497,7 +1497,7 @@ void mmc_blk_cqe_recovery(struct mmc_queue *mq)
pr_debug("%s: CQE recovery start\n", mmc_hostname(host));

err = mmc_cqe_recovery(host);
- if (err)
+ if (err || host->cqe_recovery_reset_always)
mmc_blk_reset(mq->blkdata, host, MMC_BLK_CQE_RECOVERY);
else
mmc_blk_reset_success(mq->blkdata, MMC_BLK_CQE_RECOVERY);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index c193c50ccd78..3e2fe950b4ec 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -492,6 +492,7 @@ struct mmc_host {
int cqe_qdepth;
bool cqe_enabled;
bool cqe_on;
+ bool cqe_recovery_reset_always;

/* Inline encryption support */
#ifdef CONFIG_MMC_CRYPTO
--
2.17.1
\
 
 \ /
  Last update: 2022-06-03 07:17    [W:0.037 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site