mmc: omap_hsmmc: Fix DTO and DCRC handling
authorKishon Vijay Abraham I <kishon@ti.com>
Tue, 16 Jun 2015 10:37:17 +0000 (16:07 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 24 Jul 2015 08:18:13 +0000 (10:18 +0200)
commit408806f740497c5d71f9c305b3d6aad260ff186d
treec63094c90505852a612dd481161240c71f49fe25
parent52721d9d3334c1cb1f76219a161084094ec634dc
mmc: omap_hsmmc: Fix DTO and DCRC handling

DTO/DCRC errors were not being informed to the mmc core since
commit ae4bf788ee9b ("mmc: omap_hsmmc: consolidate error report handling of
HSMMC IRQ"). This commit made sure 'end_trans' is never set on DTO/DCRC
errors. This is because after this commit 'host->data' is checked after
it has been cleared to NULL by omap_hsmmc_dma_cleanup().

Because 'end_trans' is never set, omap_hsmmc_xfer_done() is never invoked
making core layer not to be aware of DTO/DCRC errors. Because of this
any command invoked after DTO/DCRC error leads to a hang.

Fix this by checking for 'host->data' before it is actually cleared.

Fixes: ae4bf788ee9b ("mmc: omap_hsmmc: consolidate error report handling of
HSMMC IRQ")

CC: stable@vger.kernel.org
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/omap_hsmmc.c