mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
mmc: omap_hsmmc: Fix DTO and DCRC handling
DTO/DCRC errors were not being informed to the mmc core since commitae4bf788ee
("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:ae4bf788ee
("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>
This commit is contained in:
parent
52721d9d33
commit
408806f740
@ -1062,6 +1062,10 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)
|
||||
|
||||
if (status & (CTO_EN | CCRC_EN))
|
||||
end_cmd = 1;
|
||||
if (host->data || host->response_busy) {
|
||||
end_trans = !end_cmd;
|
||||
host->response_busy = 0;
|
||||
}
|
||||
if (status & (CTO_EN | DTO_EN))
|
||||
hsmmc_command_incomplete(host, -ETIMEDOUT, end_cmd);
|
||||
else if (status & (CCRC_EN | DCRC_EN))
|
||||
@ -1081,10 +1085,6 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)
|
||||
}
|
||||
dev_dbg(mmc_dev(host->mmc), "AC12 err: 0x%x\n", ac12);
|
||||
}
|
||||
if (host->data || host->response_busy) {
|
||||
end_trans = !end_cmd;
|
||||
host->response_busy = 0;
|
||||
}
|
||||
}
|
||||
|
||||
OMAP_HSMMC_WRITE(host->base, STAT, status);
|
||||
|
Loading…
Reference in New Issue
Block a user