Skip to content

Commit

Permalink
ARM: 7220/1: mmc: mmci: Fixup error handling for dma
Browse files Browse the repository at this point in the history
When getting a cmd irq during an ongoing data transfer
with dma, the dma job were never terminated. This is now
corrected.

Cc: <stable@vger.kernel.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Ulf Hansson authored and Russell King committed Dec 18, 2011
1 parent b63038d commit 3b6e3c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
}

if (!cmd->data || cmd->error) {
if (host->data)
if (host->data) {
/* Terminate the DMA transfer */
if (dma_inprogress(host))
mmci_dma_data_error(host);
mmci_stop_data(host);
}
mmci_request_end(host, cmd->mrq);
} else if (!(cmd->data->flags & MMC_DATA_READ)) {
mmci_start_data(host, cmd->data);
Expand Down

0 comments on commit 3b6e3c7

Please sign in to comment.