]> Pileus Git - ~andy/linux/blobdiff - drivers/mmc/host/tmio_mmc_pio.c
Merge branch 'pm-qos'
[~andy/linux] / drivers / mmc / host / tmio_mmc_pio.c
index fc3eb1a7fe246e86ff240165f77bf3dea78803dc..e21988901c367082f9fabb59eccb3b821b4b5843 100644 (file)
@@ -42,8 +42,8 @@
 #include <linux/pm_qos.h>
 #include <linux/pm_runtime.h>
 #include <linux/scatterlist.h>
-#include <linux/workqueue.h>
 #include <linux/spinlock.h>
+#include <linux/workqueue.h>
 
 #include "tmio_mmc.h"
 
@@ -247,6 +247,7 @@ static void tmio_mmc_reset_work(struct work_struct *work)
        /* Ready for new calls */
        host->mrq = NULL;
 
+       tmio_mmc_abort_dma(host);
        mmc_request_done(host->mmc, mrq);
 }
 
@@ -273,6 +274,9 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
        host->mrq = NULL;
        spin_unlock_irqrestore(&host->lock, flags);
 
+       if (mrq->cmd->error || (mrq->data && mrq->data->error))
+               tmio_mmc_abort_dma(host);
+
        mmc_request_done(host->mmc, mrq);
 }