* [PATCH V1 0/2] Introduce new flag to force hardware reset
@ 2022-06-03 5:15 Sarthak Garg
2022-06-03 5:15 ` [PATCH V1 1/2] mmc: core: " Sarthak Garg
2022-06-03 5:15 ` [PATCH V1 2/2] mmc: sdhci-msm: Enable force hw reset during cqe recovery Sarthak Garg
0 siblings, 2 replies; 5+ messages in thread
From: Sarthak Garg @ 2022-06-03 5:15 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, linux-arm-msm, quic_kamasali,
quic_rampraka, quic_pragalla, quic_sayalil, Sarthak Garg
Introduce new flag cqe_recovery_reset_always in mmc_host to allow vendors
to force hardware reset during cqe recovery as per their needs.
Sarthak Garg (2):
mmc: core: Introduce new flag to force hardware reset
mmc: sdhci-msm: Enable force hw reset during cqe recovery
drivers/mmc/core/block.c | 2 +-
drivers/mmc/host/sdhci-msm.c | 3 +++
include/linux/mmc/host.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V1 1/2] mmc: core: Introduce new flag to force hardware reset
2022-06-03 5:15 [PATCH V1 0/2] Introduce new flag to force hardware reset Sarthak Garg
@ 2022-06-03 5:15 ` Sarthak Garg
2022-06-03 5:33 ` Adrian Hunter
2022-06-03 5:15 ` [PATCH V1 2/2] mmc: sdhci-msm: Enable force hw reset during cqe recovery Sarthak Garg
1 sibling, 1 reply; 5+ messages in thread
From: Sarthak Garg @ 2022-06-03 5:15 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, linux-arm-msm, quic_kamasali,
quic_rampraka, quic_pragalla, quic_sayalil, Sarthak Garg,
Jens Axboe, Avri Altman, Chaitanya Kulkarni, Christian Löhle,
Bean Huo, Vincent Whitchurch, Dmitry Osipenko, Stephen Boyd
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V1 2/2] mmc: sdhci-msm: Enable force hw reset during cqe recovery
2022-06-03 5:15 [PATCH V1 0/2] Introduce new flag to force hardware reset Sarthak Garg
2022-06-03 5:15 ` [PATCH V1 1/2] mmc: core: " Sarthak Garg
@ 2022-06-03 5:15 ` Sarthak Garg
1 sibling, 0 replies; 5+ messages in thread
From: Sarthak Garg @ 2022-06-03 5:15 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, linux-arm-msm, quic_kamasali,
quic_rampraka, quic_pragalla, quic_sayalil, Sarthak Garg,
Andy Gross, Bjorn Andersson
Enable force hw reset during cqe recovery to make recovery more robust.
Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
---
drivers/mmc/host/sdhci-msm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index e395411fb6fd..7fc40bd16031 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2781,6 +2781,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)
msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY;
+ /* Enable force hw reset during cqe recovery */
+ msm_host->mmc->cqe_recovery_reset_always = true;
+
/* Set the timeout value to max possible */
host->max_timeout_count = 0xF;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V1 1/2] mmc: core: Introduce new flag to force hardware reset
2022-06-03 5:15 ` [PATCH V1 1/2] mmc: core: " Sarthak Garg
@ 2022-06-03 5:33 ` Adrian Hunter
2025-05-14 10:48 ` Sarthak Garg
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Hunter @ 2022-06-03 5:33 UTC (permalink / raw)
To: Sarthak Garg, ulf.hansson
Cc: linux-mmc, linux-kernel, linux-arm-msm, quic_kamasali,
quic_rampraka, quic_pragalla, quic_sayalil, Jens Axboe,
Avri Altman, Chaitanya Kulkarni, Christian Löhle, Bean Huo,
Vincent Whitchurch, Dmitry Osipenko, Stephen Boyd
On 3/06/22 08:15, Sarthak Garg wrote:
> 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>
You should re-base on top of "mmc: block: Fix CQE recovery reset success"
Also you may want to consider fixes / stable tags.
Otherwise, for both patches:
Acked-by: Adrian Hunter <adrian.hunter@intel.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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V1 1/2] mmc: core: Introduce new flag to force hardware reset
2022-06-03 5:33 ` Adrian Hunter
@ 2025-05-14 10:48 ` Sarthak Garg
0 siblings, 0 replies; 5+ messages in thread
From: Sarthak Garg @ 2025-05-14 10:48 UTC (permalink / raw)
To: Adrian Hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, linux-arm-msm, quic_kamasali,
quic_rampraka, quic_pragalla, quic_sayalil, Jens Axboe,
Avri Altman, Chaitanya Kulkarni, Christian Löhle, Bean Huo,
Vincent Whitchurch, Dmitry Osipenko, Stephen Boyd
On 6/3/2022 11:03 AM, Adrian Hunter wrote:
> On 3/06/22 08:15, Sarthak Garg wrote:
>> 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>
>
> You should re-base on top of "mmc: block: Fix CQE recovery reset success"
>
> Also you may want to consider fixes / stable tags.
>
> Otherwise, for both patches:
>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
>
Missed your minor comment. Seems like above mentioned rebase change is
merged now so will repost in V2 by rebasing on the tip.
Moreover no fixes / stable tag needed.
>> ---
>> 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-14 10:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-03 5:15 [PATCH V1 0/2] Introduce new flag to force hardware reset Sarthak Garg
2022-06-03 5:15 ` [PATCH V1 1/2] mmc: core: " Sarthak Garg
2022-06-03 5:33 ` Adrian Hunter
2025-05-14 10:48 ` Sarthak Garg
2022-06-03 5:15 ` [PATCH V1 2/2] mmc: sdhci-msm: Enable force hw reset during cqe recovery Sarthak Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox