I'm testing SH-Mobile SDHI driver in DMA mode with a new DMA controller using 'bonnie++' and getting DMA error after which the tmio_mmc_dma.c code falls back to PIO but all commands time out after that. It turned out that the fallback code calls tmio_mmc_enable_dma() with RX/TX channels already freed and pointers to them cleared, so that the function bails out early instead of clearing the DMA bit in the CTL_DMA_ENABLE register. Fixing the RX/TX channel check so that it takes place only when enabling DMA helps with the PIO fallback. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx> --- The patch is against Chris Ball's 'mmc.git' repo, 'master' branch. drivers/mmc/host/tmio_mmc_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: mmc/drivers/mmc/host/tmio_mmc_dma.c =================================================================== --- mmc.orig/drivers/mmc/host/tmio_mmc_dma.c +++ mmc/drivers/mmc/host/tmio_mmc_dma.c @@ -25,7 +25,7 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) { - if (!host->chan_tx || !host->chan_rx) + if (enable && !(host->chan_tx && host->chan_rx)) return; #if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html