From: James Hogan Date: Wed, 29 Jun 2011 08:28:43 +0000 (+0100) Subject: mmc: dw_mmc: fix stop when fallen back to PIO X-Git-Tag: v3.1-rc1~321^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03e8cb534e7cc3f71a07528a44da7ce68e5b5708;p=pandora-kernel.git mmc: dw_mmc: fix stop when fallen back to PIO There are several situations when dw_mci_submit_data_dma() decides to fall back to PIO mode instead of using DMA, due to a short (to avoid overhead) or "complex" (e.g. with unaligned buffers) transaction, even though host->use_dma is set. However dw_mci_stop_dma() decides whether to stop DMA or set the EVENT_XFER_COMPLETE event based on host->use_dma. When falling back to PIO mode this results in data timeout errors getting missed and the driver locking up. Therefore add host->using_dma to indicate whether the current transaction is using dma or not, and adjust dw_mci_stop_dma() to use that instead. Signed-off-by: James Hogan Acked-by: Will Newton Tested-by: Jaehoon Chung Signed-off-by: Chris Ball --- Reading git-diff-tree failed