projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
711b9ce
)
dmaengine: at_hdmac: set residue as total len in atc_tx_status
author
Nicolas Ferre
<nicolas.ferre@atmel.com>
Fri, 6 May 2011 17:56:51 +0000
(19:56 +0200)
committer
Vinod Koul
<vinod.koul@intel.com>
Mon, 9 May 2011 06:12:45 +0000
(11:42 +0530)
If transfer status is !=DMA_SUCCESS, return total transfer len as residue,
instead of zero.
Idea from dw_dmac patch by Viresh Kumar.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/at_hdmac.c
patch
|
blob
|
history
diff --git
a/drivers/dma/at_hdmac.c
b/drivers/dma/at_hdmac.c
index f52c9e38d88976936317b9da793bae7356083790..ba0b5ec4e4c29820c141acd8f27b18b19fa6c794 100644
(file)
--- a/
drivers/dma/at_hdmac.c
+++ b/
drivers/dma/at_hdmac.c
@@
-1026,7
+1026,12
@@
atc_tx_status(struct dma_chan *chan,
spin_unlock_bh(&atchan->lock);
- dma_set_tx_state(txstate, last_complete, last_used, 0);
+ if (ret != DMA_SUCCESS)
+ dma_set_tx_state(txstate, last_complete, last_used,
+ atc_first_active(atchan)->len);
+ else
+ dma_set_tx_state(txstate, last_complete, last_used, 0);
+
dev_vdbg(chan2dev(chan), "tx_status: %d (d%d, u%d)\n",
cookie, last_complete ? last_complete : 0,
last_used ? last_used : 0);