diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2011-03-03 05:17:20 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-03-06 14:42:27 -0500 |
commit | e518076ef8cb56adb558ff56ad5bfa0cd9f3abd9 (patch) | |
tree | ce195fa32ee663a23a346ac042b70b01385ab58d | |
parent | 418e74070662e1ae7d9bb5202f773d35c9a7f05e (diff) |
dw_dmac: Mark all tx_descriptors with DMA_CRTL_ACK after xfer finish
dwc_desc_get checks all descriptors for DMA_CTRL_ACK before allocating them for
transfers. And descriptors are not marked with DMA_CRTL_ACK after transfer
finishes. Thus descriptor once used is not usable again. This patch marks
descriptors with DMA_CRTL_ACK after dma xfer finishes
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/dw_dmac.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 711ebe954f5b..6ab440e532bf 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -198,6 +198,7 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc) | |||
198 | dma_async_tx_callback callback; | 198 | dma_async_tx_callback callback; |
199 | void *param; | 199 | void *param; |
200 | struct dma_async_tx_descriptor *txd = &desc->txd; | 200 | struct dma_async_tx_descriptor *txd = &desc->txd; |
201 | struct dw_desc *child; | ||
201 | 202 | ||
202 | dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie); | 203 | dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie); |
203 | 204 | ||
@@ -206,6 +207,12 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc) | |||
206 | param = txd->callback_param; | 207 | param = txd->callback_param; |
207 | 208 | ||
208 | dwc_sync_desc_for_cpu(dwc, desc); | 209 | dwc_sync_desc_for_cpu(dwc, desc); |
210 | |||
211 | /* async_tx_ack */ | ||
212 | list_for_each_entry(child, &desc->tx_list, desc_node) | ||
213 | async_tx_ack(&child->txd); | ||
214 | async_tx_ack(&desc->txd); | ||
215 | |||
209 | list_splice_init(&desc->tx_list, &dwc->free_list); | 216 | list_splice_init(&desc->tx_list, &dwc->free_list); |
210 | list_move(&desc->desc_node, &dwc->free_list); | 217 | list_move(&desc->desc_node, &dwc->free_list); |
211 | 218 | ||