mmc: core: Add new flag to force hardware reset
PATCH 1/1 mmc: core: Add new flag to force hardware reset
Entering the recovery system itself indicates a transmission error. In this situation, we intend to execute the mmc_blk_reset function to clear any anomalies that may be caused by errors. We have previously discussed with several MMC device manufacturers, and they expressed their desire for us to reset the device when errors occur to ensure stable operation. We aim to make this code compatible with all devices and ensure its stable performance, so we would like to add this patch
--- drivers/mmc/core/block.c | 2 +- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/block.c +1 -1
@@ -1503,7 +1503,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 );mmc_blk_reset_success (mq->blkdata,MMC_BLK_CQE_RECOVERY );
include/linux/mmc/host.h +1 -0
@@ -518,6 +518,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
Signature · 1 line
2.29.0
Quoted 10 lines · Michael Wu
Entering the recovery system itself indicates a transmission error. In this situation, we intend to execute the
mmc_blk_resetfunction to clear any anomalies that may be caused by errors. We have previously discussed with several MMC device manufacturers, and they expressed their desire for us to reset the device when errors occur to ensure stable operation. We aim to make this code compatible with all devices and ensure its stable performance, so we would like to add this patchSigned-off-by Michael Wu <[email protected]>
like: https://lore.kernel.org/linux-mmc/[email protected]/
You should enable it in the vendor host.
Quoted 33 lines
--- drivers/mmc/core/block.c | 2 +- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/mmc/core/block.c +1
-1@@ -1503,7 +1503,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 );mmc_blk_reset_success (mq->blkdata,MMC_BLK_CQE_RECOVERY );include/linux/mmc/host.h +1
-1@@ -518,6 +518,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.29.0
- trimmed cc-list, + Sartak Garg
Quoted 11 lines · Wenchao Chen
Quoted 9 lines · Michael Wu
Entering the recovery system itself indicates a transmission error. In this situation, we intend to execute the
mmc_blk_resetfunction to clear any anomalies that may be caused by errors. We have previously discussed with several MMC device manufacturers, and they expressed their desire for us to reset the device when errors occur to ensure stable operation. We aim to make this code compatible with all devices and ensure its stable performance, so we would like to add this patch
Quoted 3 lines
Quoted 1 line
Signed-off-by Michael Wu <[email protected]>
Looks like this series didn't make it. I was awaiting a rebase from Sartak to apply it, but apparently something got in his way for a new submission.
Quoted 2 lines
You should enable it in the vendor host.
Yes! We don't want unused code in the core. We need a user of it too.
May I suggest that you pick up Sartak's patch for the core and thus add another patch for the host driver you care about and then re-submit it as a small series.
Kind regards
Uffe
Quoted 34 lines
Quoted 34 lines
--- drivers/mmc/core/block.c | 2 +- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/mmc/core/block.c +1
-1@@ -1503,7 +1503,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 );mmc_blk_reset_success (mq->blkdata,MMC_BLK_CQE_RECOVERY );include/linux/mmc/host.h +1
-1@@ -518,6 +518,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.29.0
Quoted 63 lines · Ulf Hansson
- trimmed cc-list, + Sartak Garg
Quoted 11 lines · Wenchao Chen
Quoted 9 lines · Michael Wu
Entering the recovery system itself indicates a transmission error. In this situation, we intend to execute the
mmc_blk_resetfunction to clear any anomalies that may be caused by errors. We have previously discussed with several MMC device manufacturers, and they expressed their desire for us to reset the device when errors occur to ensure stable operation. We aim to make this code compatible with all devices and ensure its stable performance, so we would like to add this patchQuoted 3 lines
Quoted 1 line
Signed-off-by Michael Wu <[email protected]>Looks like this series didn't make it. I was awaiting a rebase from Sartak to apply it, but apparently something got in his way for a new submission.
Quoted 2 lines
You should enable it in the vendor host.
Yes! We don't want unused code in the core. We need a user of it too.
May I suggest that you pick up Sartak's patch for the core and thus add another patch for the host driver you care about and then re-submit it as a small series.
Kind regards
UffeQuoted 29 lines
Quoted 29 lines
--- drivers/mmc/core/block.c | 2 +- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/mmc/core/block.c +1
-1@@ -1503,7 +1503,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 );mmc_blk_reset_success (mq->blkdata,MMC_BLK_CQE_RECOVERY );include/linux/mmc/host.h +1
-0@@ -518,6 +518,7 @@ struct mmc_host {int cqe_qdepth;bool cqe_enabled;bool cqe_on; +bool cqe_recovery_reset_always;
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
include/linux/mmc/host.h +0
-1/* Inline encryption support */ #ifdef CONFIG_MMC_CRYPTO --2.29.0
Dear Ulf,
I have tested Sartak's patch and it is also able to resolve the issue we are currently facing. Therefore, I would like to inquire about the expected timeline for merging Sartak's patch.
Signature · 2 lines
Regards, Michael Wu
Quoted 65 lines · Michael Wu
Quoted 63 lines · Ulf Hansson
- trimmed cc-list, + Sartak Garg
Quoted 11 lines · Wenchao Chen
Quoted 9 lines · Michael Wu
Entering the recovery system itself indicates a transmission error. In this situation, we intend to execute the
mmc_blk_resetfunction to clear any anomalies that may be caused by errors. We have previously discussed with several MMC device manufacturers, and they expressed their desire for us to reset the device when errors occur to ensure stable operation. We aim to make this code compatible with all devices and ensure its stable performance, so we would like to add this patchQuoted 3 lines
Quoted 1 line
Signed-off-by Michael Wu <[email protected]>Looks like this series didn't make it. I was awaiting a rebase from Sartak to apply it, but apparently something got in his way for a new submission.
Quoted 2 lines
You should enable it in the vendor host.
Yes! We don't want unused code in the core. We need a user of it too.
May I suggest that you pick up Sartak's patch for the core and thus add another patch for the host driver you care about and then re-submit it as a small series.
Kind regards
UffeQuoted 29 lines
Quoted 29 lines
--- drivers/mmc/core/block.c | 2 +- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/mmc/core/block.c +1
-1@@ -1503,7 +1503,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 );mmc_blk_reset_success (mq->blkdata,MMC_BLK_CQE_RECOVERY );include/linux/mmc/host.h +1
-0@@ -518,6 +518,7 @@ struct mmc_host {int cqe_qdepth;bool cqe_enabled;bool cqe_on; +bool cqe_recovery_reset_always;
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
include/linux/mmc/host.h +0
-1/* Inline encryption support */ #ifdef CONFIG_MMC_CRYPTO --2.29.0
Dear Ulf,
I have tested Sartak's patch and it is also able to resolve the issue we are currently facing. Therefore, I would like to inquire about the expected timeline for merging Sartak's patch.
Hi Michael,
There is another series [1] that Adrian is working on that is related to the problem in $subject patch. Perhaps you can take a look and try it out instead of Sartak's patch, which seems to have gotten stalled.
Kind regards
Uffe
Quoted 67 lines · Ulf Hansson
Quoted 65 lines · Michael Wu
Quoted 63 lines · Ulf Hansson
- trimmed cc-list, + Sartak Garg
Quoted 11 lines · Wenchao Chen
Quoted 9 lines · Michael Wu
Entering the recovery system itself indicates a transmission error. In this situation, we intend to execute the
mmc_blk_resetfunction to clear any anomalies that may be caused by errors. We have previously discussed with several MMC device manufacturers, and they expressed their desire for us to reset the device when errors occur to ensure stable operation. We aim to make this code compatible with all devices and ensure its stable performance, so we would like to add this patchQuoted 3 lines
Quoted 1 line
Signed-off-by Michael Wu <[email protected]>Looks like this series didn't make it. I was awaiting a rebase from Sartak to apply it, but apparently something got in his way for a new submission.
Quoted 2 lines
You should enable it in the vendor host.
Yes! We don't want unused code in the core. We need a user of it too.
May I suggest that you pick up Sartak's patch for the core and thus add another patch for the host driver you care about and then re-submit it as a small series.
Kind regards
UffeQuoted 29 lines
Quoted 29 lines
--- drivers/mmc/core/block.c | 2 +- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/mmc/core/block.c +1
-1@@ -1503,7 +1503,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 );mmc_blk_reset_success (mq->blkdata,MMC_BLK_CQE_RECOVERY );include/linux/mmc/host.h +1
-0@@ -518,6 +518,7 @@ struct mmc_host {int cqe_qdepth;bool cqe_enabled;bool cqe_on; +bool cqe_recovery_reset_always;
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
include/linux/mmc/host.h +0
-1/* Inline encryption support */ #ifdef CONFIG_MMC_CRYPTO --2.29.0
Dear Ulf,
I have tested Sartak's patch and it is also able to resolve the issue we are currently facing. Therefore, I would like to inquire about the expected timeline for merging Sartak's patch.
Hi Sartak
Any updates?
Quoted 11 lines
Hi Michael,
There is another series [1] that Adrian is working on that is related to the problem in $subject patch. Perhaps you can take a look and try it out instead of Sartak's patch, which seems to have gotten stalled.
Kind regards
Uffe