]>
Commit | Line | Data |
---|---|---|
7a7567a2 GKH |
1 | From 51b72656bb39fdcb8f3174f4007bcc83ad1d275f Mon Sep 17 00:00:00 2001 |
2 | From: Takeshi Saito <takeshi.saito.xv@renesas.com> | |
3 | Date: Wed, 15 May 2019 20:23:46 +0200 | |
4 | Subject: mmc: tmio: fix SCC error handling to avoid false positive CRC error | |
5 | ||
6 | From: Takeshi Saito <takeshi.saito.xv@renesas.com> | |
7 | ||
8 | commit 51b72656bb39fdcb8f3174f4007bcc83ad1d275f upstream. | |
9 | ||
10 | If an SCC error occurs during a read/write command execution, a false | |
11 | positive CRC error message is output. | |
12 | ||
13 | mmcblk0: response CRC error sending r/w cmd command, card status 0x900 | |
14 | ||
15 | check_scc_error() checks SCC_RVSREQ.RVSERR bit. RVSERR detects a | |
16 | correction error in the next (up or down) delay tap position. However, | |
17 | since the command is successful, only retuning needs to be executed. | |
18 | This has been confirmed by HW engineers. | |
19 | ||
20 | Thus, on SCC error, set retuning flag instead of setting an error code. | |
21 | ||
22 | Fixes: b85fb0a1c8ae ("mmc: tmio: Fix SCC error detection") | |
23 | Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com> | |
24 | [wsa: updated comment and commit message, removed some braces] | |
25 | Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> | |
26 | Reviewed-by: Simon Horman <horms+renesas@verge.net.au> | |
27 | Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
28 | Cc: stable@vger.kernel.org | |
29 | Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> | |
30 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
31 | ||
32 | --- | |
33 | drivers/mmc/host/tmio_mmc_core.c | 3 ++- | |
34 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
35 | ||
36 | --- a/drivers/mmc/host/tmio_mmc_core.c | |
37 | +++ b/drivers/mmc/host/tmio_mmc_core.c | |
38 | @@ -842,8 +842,9 @@ static void tmio_mmc_finish_request(stru | |
39 | if (mrq->cmd->error || (mrq->data && mrq->data->error)) | |
40 | tmio_mmc_abort_dma(host); | |
41 | ||
42 | + /* SCC error means retune, but executed command was still successful */ | |
43 | if (host->check_scc_error && host->check_scc_error(host)) | |
44 | - mrq->cmd->error = -EILSEQ; | |
45 | + mmc_retune_needed(host->mmc); | |
46 | ||
47 | /* If SET_BLOCK_COUNT, continue with main command */ | |
48 | if (host->mrq && !mrq->cmd->error) { |