diff options
author | Ryo Kataoka <ryo.kataoka.wt@renesas.com> | 2019-07-11 21:15:18 +0900 |
---|---|---|
committer | Ryo Kataoka <ryo.kataoka.wt@renesas.com> | 2019-07-11 21:15:18 +0900 |
commit | bf95bdcff0583d769cbb9e25fdba4664c20396de (patch) | |
tree | 09d3ab3bd83b945474b138ee3511998f486bb5c4 | |
parent | 9aa6649bb252b987708de0d2eba078ad3ef7aff4 (diff) | |
parent | 789115b49be1b6529a27d55c06e37aed45192dc4 (diff) | |
download | renesas-bsp-bf95bdcff0583d769cbb9e25fdba4664c20396de.tar.gz |
Merge branch 'rcar-3.9.4/dmae.rc1' into v4.14.75-ltsi/rcar-3.9.6
* rcar-3.9.4/dmae.rc1:
dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
Revert "dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid"
-rw-r--r-- | drivers/dma/sh/rcar-dmac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 979efc62cca6e..66d73bff6b360 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1397,6 +1397,7 @@ static enum dma_status rcar_dmac_tx_status(struct dma_chan *chan, enum dma_status status; unsigned long flags; unsigned int residue; + bool cyclic; status = dma_cookie_status(chan, cookie, txstate); if (status == DMA_COMPLETE || !txstate) @@ -1404,10 +1405,11 @@ static enum dma_status rcar_dmac_tx_status(struct dma_chan *chan, spin_lock_irqsave(&rchan->lock, flags); residue = rcar_dmac_chan_get_residue(rchan, cookie); + cyclic = rchan->desc.running ? rchan->desc.running->cyclic : false; spin_unlock_irqrestore(&rchan->lock, flags); /* if there's no residue, the cookie is complete */ - if (!residue && !rchan->desc.running->cyclic) + if (!residue && !cyclic) return DMA_COMPLETE; dma_set_residue(txstate, residue); |