aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2011-12-13 10:58:43 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-12-18 18:07:22 -0500
commit3b6e3c73851a9a4b0e6ed9d378206341dd65e8a5 (patch)
tree70fd5ffac327cc9027ed6d904ebc9b27e2ddb73c /drivers
parentb63038d6f4ca5d1849ce01d9fc5bb9cb426dec73 (diff)
ARM: 7220/1: mmc: mmci: Fixup error handling for dma
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/mmci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 826598115abd..0726e59fd418 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -755,8 +755,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
755 } 755 }
756 756
757 if (!cmd->data || cmd->error) { 757 if (!cmd->data || cmd->error) {
758 if (host->data) 758 if (host->data) {
759 /* Terminate the DMA transfer */
760 if (dma_inprogress(host))
761 mmci_dma_data_error(host);
759 mmci_stop_data(host); 762 mmci_stop_data(host);
763 }
760 mmci_request_end(host, cmd->mrq); 764 mmci_request_end(host, cmd->mrq);
761 } else if (!(cmd->data->flags & MMC_DATA_READ)) { 765 } else if (!(cmd->data->flags & MMC_DATA_READ)) {
762 mmci_start_data(host, cmd->data); 766 mmci_start_data(host, cmd->data);