[lkml]   [2019]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5.1 37/70] mmc: tmio: fix SCC error handling to avoid false positive CRC error
From: Takeshi Saito <>

commit 51b72656bb39fdcb8f3174f4007bcc83ad1d275f upstream.

If an SCC error occurs during a read/write command execution, a false
positive CRC error message is output.

mmcblk0: response CRC error sending r/w cmd command, card status 0x900

check_scc_error() checks SCC_RVSREQ.RVSERR bit. RVSERR detects a
correction error in the next (up or down) delay tap position. However,
since the command is successful, only retuning needs to be executed.
This has been confirmed by HW engineers.

Thus, on SCC error, set retuning flag instead of setting an error code.

Fixes: b85fb0a1c8ae ("mmc: tmio: Fix SCC error detection")
Signed-off-by: Takeshi Saito <>
[wsa: updated comment and commit message, removed some braces]
Signed-off-by: Wolfram Sang <>
Reviewed-by: Simon Horman <>
Reviewed-by: Yoshihiro Shimoda <>
Signed-off-by: Ulf Hansson <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/mmc/host/tmio_mmc_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -842,8 +842,9 @@ static void tmio_mmc_finish_request(stru
if (mrq->cmd->error || (mrq->data && mrq->data->error))

+ /* SCC error means retune, but executed command was still successful */
if (host->check_scc_error && host->check_scc_error(host))
- mrq->cmd->error = -EILSEQ;
+ mmc_retune_needed(host->mmc);

/* If SET_BLOCK_COUNT, continue with main command */
if (host->mrq && !mrq->cmd->error) {

 \ /
  Last update: 2019-06-09 18:46    [W:0.245 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site