Commit 4dafd00c authored by Sudhakar Rajashekhara's avatar Sudhakar Rajashekhara Committed by Kevin Hilman

mmc: fix mmc_davinci_xfer_done() function

In mmc_davinci_xfer_done() function data direction variable
is being modified before the call to davinci_abort_dma().
But inside the davinci_abort_dma() function data direction
variable is being checked to select the channel to abort.

Without this patch, davinci_abort_dma() function always
aborts, TX channel dma.
Signed-off-by: default avatarSudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: default avatarVipin Bhandari <vipin.bhandari@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent b73ac972
......@@ -827,7 +827,6 @@ static void
mmc_davinci_xfer_done(struct mmc_davinci_host *host, struct mmc_data *data)
{
host->data = NULL;
host->data_dir = DAVINCI_MMC_DATADIR_NONE;
if (host->do_dma) {
davinci_abort_dma(host);
......@@ -838,6 +837,7 @@ mmc_davinci_xfer_done(struct mmc_davinci_host *host, struct mmc_data *data)
: DMA_FROM_DEVICE);
host->do_dma = false;
}
host->data_dir = DAVINCI_MMC_DATADIR_NONE;
if (!data->stop || (host->cmd && host->cmd->error)) {
mmc_request_done(host->mmc, data->mrq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment