diff options
author | Seungwon Jeon <tgih.jun@samsung.com> | 2012-04-09 20:53:32 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-04-20 20:30:37 -0400 |
commit | a99aa9b9b4f4f3e496d17a1b4e0ff63fb0c9f31d (patch) | |
tree | d3d7bb12cbabce20789671d07055e305b8138c1a /drivers/mmc/host/dw_mmc.c | |
parent | 32d317c60e56c2a34463b51fc0336cc96b3e1735 (diff) |
mmc: dw_mmc: Fix switch from DMA to PIO
When dw_mci_pre_dma_transfer returns failure in some reasons,
dw_mci_submit_data will prepare to switch the PIO mode from DMA.
After switching to PIO mode, DMA(IDMAC in particular) is still
enabled. This makes the corruption in handling interrupt and
the driver lock-up.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bf3c9b456aaf..f3b0fcd002df 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -526,8 +526,10 @@ static int dw_mci_submit_data_dma(struct dw_mci *host, struct mmc_data *data) | |||
526 | return -ENODEV; | 526 | return -ENODEV; |
527 | 527 | ||
528 | sg_len = dw_mci_pre_dma_transfer(host, data, 0); | 528 | sg_len = dw_mci_pre_dma_transfer(host, data, 0); |
529 | if (sg_len < 0) | 529 | if (sg_len < 0) { |
530 | host->dma_ops->stop(host); | ||
530 | return sg_len; | 531 | return sg_len; |
532 | } | ||
531 | 533 | ||
532 | host->using_dma = 1; | 534 | host->using_dma = 1; |
533 | 535 | ||