]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mmc: omap_hsmmc: DMA unmap only once in case of MMC error
authorPer Forlin <per.forlin@linaro.org>
Mon, 7 Nov 2011 16:25:11 +0000 (21:55 +0530)
committerChris Ball <cjb@laptop.org>
Mon, 7 Nov 2011 18:38:35 +0000 (13:38 -0500)
commitad8ce7917b352db4628f1ae5e534b077b24914ea
treef3bc60927fad23754c13576f484029c82777eddd
parenta6029e1f75bb484c1f5bc68b6a8572e4024795bc
mmc: omap_hsmmc: DMA unmap only once in case of MMC error

Reported by Russell King:
mmcblk0: error -84 transferring data, sector 149201, nr 64,
cmd response 0x900, card status 0xb00
mmcblk0: retrying using single block read

WARNING: at lib/dma-debug.c:811 check_unmap
omap_hsmmc omap_hsmmc.0: DMA-API: device driver tries to free DMA memory
it has not allocated [device address=0x0000000080933000] [size=20480 bytes]

In case of an error dma_unmap() is issued in omap_hsmmc_dma_cleanup()
and then again in omap_hsmmc_post_req(). Resolve this by clearing the
host_cookie to indicate there is no DMA mapped memory to unmap.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Tested-by: Balaji T K <balajitk@ti.com>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/omap_hsmmc.c