mmc: mmci: send stop command if sbc error issue

Refer to "4.15 set block count command" of sd specification:
Host needs to issue CMD12 if any error is detected in
the CMD18 and CMD25 operations.

In sbc case, the data->stop is fill by framework.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Ludovic Barre 2018-11-07 10:30:40 +01:00 committed by Ulf Hansson
parent 20427e5db3
commit 09b4f70673
1 changed files with 2 additions and 3 deletions

View File

@ -1190,11 +1190,10 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
/* The error clause is handled above, success! */
data->bytes_xfered = data->blksz * data->blocks;
if (!data->stop || host->mrq->sbc) {
if (!data->stop || (host->mrq->sbc && !data->error))
mmci_request_end(host, data->mrq);
} else {
else
mmci_start_command(host, data->stop, 0);
}
}
}