diff options
author | Jarkko Lavinen <jarkko.lavinen@nokia.com> | 2008-12-05 05:31:46 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2009-03-24 16:30:04 -0400 |
commit | 82788ff532f75ecd23166e677c970139ff61c363 (patch) | |
tree | bfba87f7bd2ddc34d84c5a09ae17813c8504e167 | |
parent | 2a69567b875b0650ffe29a0f2441e2068e4e8294 (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>
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 576bfa7216b3..5ff2ca22beea 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) | |||
332 | /* | 332 | /* |
333 | * DMA clean up for command errors | 333 | * DMA clean up for command errors |
334 | */ | 334 | */ |
335 | static void mmc_dma_cleanup(struct mmc_omap_host *host) | 335 | static void mmc_dma_cleanup(struct mmc_omap_host *host, int errno) |
336 | { | 336 | { |
337 | host->data->error = -ETIMEDOUT; | 337 | host->data->error = errno; |
338 | 338 | ||
339 | if (host->use_dma && host->dma_ch != -1) { | 339 | if (host->use_dma && host->dma_ch != -1) { |
340 | dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, | 340 | 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) | |||
439 | end_cmd = 1; | 439 | end_cmd = 1; |
440 | } | 440 | } |
441 | if (host->data) { | 441 | if (host->data) { |
442 | mmc_dma_cleanup(host); | 442 | mmc_dma_cleanup(host, -ETIMEDOUT); |
443 | mmc_omap_reset_controller_fsm(host, SRD); | 443 | mmc_omap_reset_controller_fsm(host, SRD); |
444 | } | 444 | } |
445 | } | 445 | } |
@@ -447,9 +447,9 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) | |||
447 | (status & DATA_CRC)) { | 447 | (status & DATA_CRC)) { |
448 | if (host->data) { | 448 | if (host->data) { |
449 | if (status & DATA_TIMEOUT) | 449 | if (status & DATA_TIMEOUT) |
450 | mmc_dma_cleanup(host); | 450 | mmc_dma_cleanup(host, -ETIMEDOUT); |
451 | else | 451 | else |
452 | host->data->error = -EILSEQ; | 452 | mmc_dma_cleanup(host, -EILSEQ); |
453 | mmc_omap_reset_controller_fsm(host, SRD); | 453 | mmc_omap_reset_controller_fsm(host, SRD); |
454 | end_trans = 1; | 454 | end_trans = 1; |
455 | } | 455 | } |