mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
dmaengine: cppi41: fix cppi41_dma_tx_status() logic
It makes sense to set residue when channel is in progress. Otherwise it should be 0 since transfer is completed. Meanwhile this patch doesn't prevent to set residue value anyway. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
4f68b09ea3
commit
a08f2673dd
1 changed files with 2 additions and 4 deletions
|
@ -420,11 +420,9 @@ static enum dma_status cppi41_dma_tx_status(struct dma_chan *chan,
|
||||||
struct cppi41_channel *c = to_cpp41_chan(chan);
|
struct cppi41_channel *c = to_cpp41_chan(chan);
|
||||||
enum dma_status ret;
|
enum dma_status ret;
|
||||||
|
|
||||||
/* lock */
|
|
||||||
ret = dma_cookie_status(chan, cookie, txstate);
|
ret = dma_cookie_status(chan, cookie, txstate);
|
||||||
if (txstate && ret == DMA_COMPLETE)
|
|
||||||
txstate->residue = c->residue;
|
dma_set_residue(txstate, c->residue);
|
||||||
/* unlock */
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue