aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorJean Pihet <jpihet@mvista.com>2009-02-11 16:11:39 -0500
committerPierre Ossman <drzeus@drzeus.cx>2009-02-18 16:10:49 -0500
commitc232f457e409b34417166596ea3daf298ace95c9 (patch)
treef0ab268076cfd4ba680b707285263e6794541781 /drivers/mmc/host
parenteb25082657be3e7639e349fc926afdcbb0a4dc65 (diff)
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: Andy Lowe <alowe@mvista.com> Signed-off-by: Jean Pihet <jpihet@mvista.com> Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 3bfd0facb794..8d21a07f63de 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -417,8 +417,15 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
417 } 417 }
418 end_cmd = 1; 418 end_cmd = 1;
419 } 419 }
420 if (host->data) 420 if (host->data) {
421 mmc_dma_cleanup(host); 421 mmc_dma_cleanup(host);
422 OMAP_HSMMC_WRITE(host->base, SYSCTL,
423 OMAP_HSMMC_READ(host->base,
424 SYSCTL) | SRD);
425 while (OMAP_HSMMC_READ(host->base,
426 SYSCTL) & SRD)
427 ;
428 }
422 } 429 }
423 if ((status & DATA_TIMEOUT) || 430 if ((status & DATA_TIMEOUT) ||
424 (status & DATA_CRC)) { 431 (status & DATA_CRC)) {