Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Seungwon Jeon and committed by
Chris Ball
a99aa9b9 32d317c6

+3 -1
+3 -1
drivers/mmc/host/dw_mmc.c
··· 526 526 return -ENODEV; 527 527 528 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 531 return sg_len; 532 + } 531 533 532 534 host->using_dma = 1; 533 535