Skip to contentSkip to conversation

mmc: rpmb: do not force a retune before RPMB switch

PATCH Superseded Jorge Ramirez-Ortiz 3 participants 3 messages Dec 11, 2023 – Jan 3, 2024 MMC, SD and SDIO

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: rpmb: do not force a retune before RPMB switch

Requesting a retune before switching to the RPMB partition has been observed to cause CRC errors on the RPMB reads (-EILSEQ).

Since RPMB reads can not be retried, the clients would be directly affected by the errors.

This commit disables the retune request prior to switching to the RPMB
partition: mmc_retune_pause() no longer triggers a retune before the pause period begins.

This was verified with the sdhci-of-arasan driver (ZynqMP) configured for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both cases, the error was easy to reproduce triggering every few tenths of reads.

---
v2:
mmc_retune_pause() no longer can trigger a retune. Keeping Avri Altman Acked-by since they are functionally equivalent.
v1:
modify mmc_retune_pause to optionally trigger a retune.

 drivers/mmc/core/host.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/core/host.c +1 -2
index 096093f7be00..ed44920e92df 100644
@@ -119,13 +119,12 @@ void mmc_retune_enable(struct mmc_host *host)
 
 /*
  * Pause re-tuning for a small set of operations.  The pause begins after the
- * next command and after first doing re-tuning.
+ * next command.
  */
 void mmc_retune_pause(struct mmc_host *host)
 {
 	if (!host->retune_paused) {
 		host->retune_paused = 1;
-		mmc_retune_needed(host);
 		mmc_retune_hold(host);
 	}
 }

--
2.34.1

Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Jorge Ramirez-Ortiz

Requesting a retune before switching to the RPMB partition has been observed to cause CRC errors on the RPMB reads (-EILSEQ).

Since RPMB reads can not be retried, the clients would be directly affected by the errors.

This commit disables the retune request prior to switching to the RPMB
partition: mmc_retune_pause() no longer triggers a retune before the pause period begins.

Quoted 7 lines

This was verified with the sdhci-of-arasan driver (ZynqMP) configured for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both cases, the error was easy to reproduce triggering every few tenths of reads.

Quoted 31 lines

---
v2:
mmc_retune_pause() no longer can trigger a retune. Keeping Avri Altman Acked-by since they are functionally equivalent.
v1:
modify mmc_retune_pause to optionally trigger a retune.

 drivers/mmc/core/host.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/core/host.c +1 -3
index 096093f7be00..ed44920e92df 100644
@@ -119,13 +119,12 @@ void mmc_retune_enable(struct mmc_host *host)
 
 /*
  * Pause re-tuning for a small set of operations.  The pause begins after the
- * next command and after first doing re-tuning.
+ * next command.
  */
 void mmc_retune_pause(struct mmc_host *host)
 {
 	if (!host->retune_paused) {
 		host->retune_paused = 1;
-		mmc_retune_needed(host);
 		mmc_retune_hold(host);
 	}
 }
--

2.34.1

#2 lore raw
In reply to Jorge Ramirez-Ortiz
Quoted 11 lines · Jorge Ramirez-Ortiz

Requesting a retune before switching to the RPMB partition has been observed to cause CRC errors on the RPMB reads (-EILSEQ).

Since RPMB reads can not be retried, the clients would be directly affected by the errors.

This commit disables the retune request prior to switching to the RPMB
partition: mmc_retune_pause() no longer triggers a retune before the pause period begins.

Quoted 7 lines

This was verified with the sdhci-of-arasan driver (ZynqMP) configured for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both cases, the error was easy to reproduce triggering every few tenths of reads.

This seems reasonable, but I would like to see some justification from a performance point of view in the commit message too.

Moreover, please bump the version number of the patch at each iteration and add a version summary of what has changed. That helps the review process.

Kind regards
Uffe

Quoted 31 lines

---
v2:
mmc_retune_pause() no longer can trigger a retune. Keeping Avri Altman Acked-by since they are functionally equivalent.
v1:
modify mmc_retune_pause to optionally trigger a retune.

 drivers/mmc/core/host.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/core/host.c +1 -3
index 096093f7be00..ed44920e92df 100644
@@ -119,13 +119,12 @@ void mmc_retune_enable(struct mmc_host *host)
 
 /*
  * Pause re-tuning for a small set of operations.  The pause begins after the
- * next command and after first doing re-tuning.
+ * next command.
  */
 void mmc_retune_pause(struct mmc_host *host)
 {
        if (!host->retune_paused) {
                host->retune_paused = 1;
-               mmc_retune_needed(host);
                mmc_retune_hold(host);
        }
 }
--

2.34.1