From: Andy Shevchenko Date: Mon, 15 Jul 2013 12:04:41 +0000 (+0300) Subject: dma: dw: return DMA_PAUSED only if cookie status is DMA_IN_PROGRESS X-Git-Tag: v3.12-rc1~68^2~62 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=effd5cf6fe71f5efaf59917e7090a3a1f3eabee5;p=linux.git dma: dw: return DMA_PAUSED only if cookie status is DMA_IN_PROGRESS To obey a usual practice let's return DMA_PAUSED status only if dma_cookie_status returned DMA_IN_PROGRESS. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index 5f2ee5ff8fa4..89eb89f22284 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -1107,7 +1107,7 @@ dwc_tx_status(struct dma_chan *chan, if (ret != DMA_SUCCESS) dma_set_residue(txstate, dwc_get_residue(dwc)); - if (dwc->paused) + if (dwc->paused && ret == DMA_IN_PROGRESS) return DMA_PAUSED; return ret;