mmc: tmio: Fix error handling when issuing CMD23
authorMasaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
Tue, 3 Apr 2018 21:57:03 +0000 (23:57 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 4 Apr 2018 10:21:27 +0000 (12:21 +0200)
If an error was detected when CMD23 was issued, command sequence should
be terminated with errors and CMD23 should be issued after retuning.

Fixes: 8b22c3c18be5 ("mmc: tmio: add CMD23 support")
Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <stable@vger.kernel.org> # 4.13+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc_core.c

index e30df9ad8197c4b59b1ed0b40c8037d2ef2b7322..3080299303045adc5908683b5509e4420ead2063 100644 (file)
@@ -913,7 +913,7 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
                host->check_scc_error(host);
 
        /* If SET_BLOCK_COUNT, continue with main command */
-       if (host->mrq) {
+       if (host->mrq && !mrq->cmd->error) {
                tmio_process_mrq(host, mrq);
                return;
        }