Skip to content
Snippets Groups Projects
Commit 09b4f706 authored by Ludovic Barre's avatar Ludovic Barre Committed by Ulf Hansson
Browse files

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: default avatarLudovic Barre <ludovic.barre@st.com>
Tested-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 20427e5d
No related branches found
No related tags found
No related merge requests found
...@@ -1190,13 +1190,12 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data, ...@@ -1190,13 +1190,12 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
/* The error clause is handled above, success! */ /* The error clause is handled above, success! */
data->bytes_xfered = data->blksz * data->blocks; 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); mmci_request_end(host, data->mrq);
} else { else
mmci_start_command(host, data->stop, 0); mmci_start_command(host, data->stop, 0);
} }
} }
}
static void static void
mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment