Skip to content

Commit 6738025

Browse files
ldtsstorulf
authored andcommitted
mmc: core: 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. With this commit, systems that were utilizing OP-TEE to access RPMB variables will experience an enhanced performance. Specifically, when OP-TEE is configured to employ RPMB as a secure storage solution, it not only writes the data but also the secure filesystem within the partition. As a result, retrieving any variable involves multiple RPMB reads, typically around five. For context, on ZynqMP, each retune request consumed approximately 8ms. Consequently, reading any RPMB variable used to take at the very minimum 40ms. After droping the need to retune before switching to the RPMB partition, this is no longer the case. Signed-off-by: Jorge Ramirez-Ortiz <[email protected]> Acked-by: Avri Altman <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 77e01b4 commit 6738025

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mmc/core/host.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,12 @@ void mmc_retune_enable(struct mmc_host *host)
119119

120120
/*
121121
* Pause re-tuning for a small set of operations. The pause begins after the
122-
* next command and after first doing re-tuning.
122+
* next command.
123123
*/
124124
void mmc_retune_pause(struct mmc_host *host)
125125
{
126126
if (!host->retune_paused) {
127127
host->retune_paused = 1;
128-
mmc_retune_needed(host);
129128
mmc_retune_hold(host);
130129
}
131130
}

0 commit comments

Comments
 (0)