]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/mmc/host/mmci.c
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / mmc / host / mmci.c
index b5972440c1bf606e677ad312a9a391576f859f70..0c6420bb2f00fe9f9433000ec27e51af2c5cd4ca 100644 (file)
@@ -507,6 +507,7 @@ static void mmci_dma_data_error(struct mmci_host *host)
 {
        dev_err(mmc_dev(host->mmc), "error during DMA transfer!\n");
        dmaengine_terminate_all(host->dma_current);
+       host->dma_in_progress = false;
        host->dma_current = NULL;
        host->dma_desc_current = NULL;
        host->data->host_cookie = 0;
@@ -565,6 +566,7 @@ static void mmci_dma_finalize(struct mmci_host *host, struct mmc_data *data)
                mmci_dma_release(host);
        }
 
+       host->dma_in_progress = false;
        host->dma_current = NULL;
        host->dma_desc_current = NULL;
 }
@@ -665,6 +667,7 @@ static int mmci_dma_start_data(struct mmci_host *host, unsigned int datactrl)
        dev_vdbg(mmc_dev(host->mmc),
                 "Submit MMCI DMA job, sglen %d blksz %04x blks %04x flags %08x\n",
                 data->sg_len, data->blksz, data->blocks, data->flags);
+       host->dma_in_progress = true;
        dmaengine_submit(host->dma_desc_current);
        dma_async_issue_pending(host->dma_current);
 
@@ -740,8 +743,10 @@ static void mmci_post_request(struct mmc_host *mmc, struct mmc_request *mrq,
                if (host->dma_desc_current == next->dma_desc)
                        host->dma_desc_current = NULL;
 
-               if (host->dma_current == next->dma_chan)
+               if (host->dma_current == next->dma_chan) {
+                       host->dma_in_progress = false;
                        host->dma_current = NULL;
+               }
 
                next->dma_desc = NULL;
                next->dma_chan = NULL;