aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJarkko Lavinen <jarkko.lavinen@nokia.com>2008-12-05 12:31:46 +0200
committerPierre Ossman <drzeus@drzeus.cx>2009-03-24 21:30:04 +0100
commit82788ff532f75ecd23166e677c970139ff61c363 (patch)
treebfba87f7bd2ddc34d84c5a09ae17813c8504e167 /drivers/mmc
parent2a69567b875b0650ffe29a0f2441e2068e4e8294 (diff)
omap_hsmmc: Do dma cleanup also with data CRC errors
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 576bfa7216b..5ff2ca22bee 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -332,9 +332,9 @@ mmc_omap_cmd_done(struct mmc_omap_host *host, struct mmc_command *cmd)
/*
* DMA clean up for command errors
*/
-static void mmc_dma_cleanup(struct mmc_omap_host *host)
+static void mmc_dma_cleanup(struct mmc_omap_host *host, int errno)
{
- host->data->error = -ETIMEDOUT;
+ host->data->error = errno;
if (host->use_dma && host->dma_ch != -1) {
dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len,
@@ -439,7 +439,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
end_cmd = 1;
}
if (host->data) {
- mmc_dma_cleanup(host);
+ mmc_dma_cleanup(host, -ETIMEDOUT);
mmc_omap_reset_controller_fsm(host, SRD);
}
}
@@ -447,9 +447,9 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
(status & DATA_CRC)) {
if (host->data) {
if (status & DATA_TIMEOUT)
- mmc_dma_cleanup(host);
+ mmc_dma_cleanup(host, -ETIMEDOUT);
else
- host->data->error = -EILSEQ;
+ mmc_dma_cleanup(host, -EILSEQ);
mmc_omap_reset_controller_fsm(host, SRD);
end_trans = 1;
}