提交 c232f457 编写于 作者: J Jean Pihet 提交者: Pierre Ossman

omap_hsmmc: recover from transfer failures

Timeouts during a command that has a data phase can result in the next
command issued after the command that failed not being processed, i.e.  no
interrupt ever occurs to indicate the command has completed.  This failure
can result in a deadlock.

This patch resets the data state machine to clear the error in case of a
command timeout.

Tested on OMAP3430 chip and intensive MMC/SD device removal while
transferring data.
Signed-off-by: NAndy Lowe <alowe@mvista.com>
Signed-off-by: NJean Pihet <jpihet@mvista.com>
Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 eb250826
......@@ -417,8 +417,15 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
}
end_cmd = 1;
}
if (host->data)
if (host->data) {
mmc_dma_cleanup(host);
OMAP_HSMMC_WRITE(host->base, SYSCTL,
OMAP_HSMMC_READ(host->base,
SYSCTL) | SRD);
while (OMAP_HSMMC_READ(host->base,
SYSCTL) & SRD)
;
}
}
if ((status & DATA_TIMEOUT) ||
(status & DATA_CRC)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册