diff options
author | Takeshi Saito <takeshi.saito.xv@renesas.com> | 2019-05-15 20:23:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-24 08:21:08 +0100 |
commit | d64b58520670b91e0606e0864e2df66f319b5711 (patch) | |
tree | bd8b6dd02679862fe45af2e8bd94fb98128e2def | |
parent | e2a37708cfca2e9815fc9a2456263b4fbbcfc367 (diff) | |
download | linux-stable-d64b58520670b91e0606e0864e2df66f319b5711.tar.gz linux-stable-d64b58520670b91e0606e0864e2df66f319b5711.tar.bz2 linux-stable-d64b58520670b91e0606e0864e2df66f319b5711.zip |
mmc: tmio: fix SCC error handling to avoid false positive CRC error
[ Upstream commit 51b72656bb39fdcb8f3174f4007bcc83ad1d275f ]
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 <takeshi.saito.xv@renesas.com>
[wsa: updated comment and commit message, removed some braces]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/mmc/host/tmio_mmc_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 94c43c3d3ae5..35630ccbe9e5 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -926,8 +926,9 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host) if (mrq->cmd->error || (mrq->data && mrq->data->error)) tmio_mmc_abort_dma(host); + /* 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) { |