diff options
author | Ludovic Barre <ludovic.barre@st.com> | 2018-11-07 12:30:40 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-12-17 10:26:24 +0300 |
commit | 09b4f706736fb9f9af763d8af41bf6f99944dc0c (patch) | |
tree | 9d8e599816288e37de64e77319cab82032d458e7 /drivers/mmc/host/mmci.c | |
parent | 20427e5db3f96fc054c6a6ad95606906b834deb1 (diff) | |
download | linux-09b4f706736fb9f9af763d8af41bf6f99944dc0c.tar.xz |
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>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r-- | drivers/mmc/host/mmci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 82bab35fff41..13fa640d86d6 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -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); - } } } |