diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2011-03-03 11:17:20 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-03-06 20:42:27 +0100 |
commit | e518076ef8cb56adb558ff56ad5bfa0cd9f3abd9 (patch) | |
tree | ce195fa32ee663a23a346ac042b70b01385ab58d /drivers/dma | |
parent | dw_dmac: Change value of DWC_MAX_COUNT to 4095. (diff) | |
download | linux-e518076ef8cb56adb558ff56ad5bfa0cd9f3abd9.tar.xz linux-e518076ef8cb56adb558ff56ad5bfa0cd9f3abd9.zip |
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>
Diffstat (limited to 'drivers/dma')
-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) dma_async_tx_callback callback; void *param; struct dma_async_tx_descriptor *txd = &desc->txd; + struct dw_desc *child; dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie); @@ -206,6 +207,12 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc) param = txd->callback_param; dwc_sync_desc_for_cpu(dwc, desc); + + /* async_tx_ack */ + list_for_each_entry(child, &desc->tx_list, desc_node) + async_tx_ack(&child->txd); + async_tx_ack(&desc->txd); + list_splice_init(&desc->tx_list, &dwc->free_list); list_move(&desc->desc_node, &dwc->free_list); |