[PATCH 24/26] mmc: sdhci: panic write: abort request in progress

From: Irina Tirdea
Date: Tue Oct 23 2012 - 09:46:33 EST


From: Adrian Hunter <adrian.hunter@xxxxxxxxx>

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Signed-off-by: Irina Tirdea <irina.tirdea@xxxxxxxxx>
---
drivers/mmc/host/sdhci.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 496adc8..9a24417 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1351,6 +1351,11 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)

sdhci_lock_irqsave(host, flags);

+ if (mmc_am_panic_task(mmc) && host->mrq) {
+ host->mrq->cmd->error = -EILSEQ;
+ sdhci_sched_tasklet(host, finish);
+ }
+
WARN_ON(host->mrq != NULL);

#ifndef SDHCI_USE_LEDS_CLASS
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/