Commit 65862be0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

dmaengine: dw: don't perform DMA when dmaengine_submit is called

commit dd8ecfca upstream.

Accordingly to discussion [1] and followed up documentation the DMA controller
driver shouldn't start any DMA operations when dmaengine_submit() is called.

This patch fixes the workflow in dw_dmac driver to follow the documentation.

[1] http://www.spinics.net/lists/arm-kernel/msg125987.htmlSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Cc: "Petallo, MauriceX R" <mauricex.r.petallo@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 491f27a0
...@@ -7,7 +7,6 @@ TODO for slave dma ...@@ -7,7 +7,6 @@ TODO for slave dma
- imx-dma - imx-dma
- imx-sdma - imx-sdma
- mxs-dma.c - mxs-dma.c
- dw_dmac
- intel_mid_dma - intel_mid_dma
4. Check other subsystems for dma drivers and merge/move to dmaengine 4. Check other subsystems for dma drivers and merge/move to dmaengine
5. Remove dma_slave_config's dma direction. 5. Remove dma_slave_config's dma direction.
...@@ -680,17 +680,9 @@ static dma_cookie_t dwc_tx_submit(struct dma_async_tx_descriptor *tx) ...@@ -680,17 +680,9 @@ static dma_cookie_t dwc_tx_submit(struct dma_async_tx_descriptor *tx)
* possible, perhaps even appending to those already submitted * possible, perhaps even appending to those already submitted
* for DMA. But this is hard to do in a race-free manner. * for DMA. But this is hard to do in a race-free manner.
*/ */
if (list_empty(&dwc->active_list)) {
dev_vdbg(chan2dev(tx->chan), "%s: started %u\n", __func__,
desc->txd.cookie);
list_add_tail(&desc->desc_node, &dwc->active_list);
dwc_dostart(dwc, dwc_first_active(dwc));
} else {
dev_vdbg(chan2dev(tx->chan), "%s: queued %u\n", __func__,
desc->txd.cookie);
dev_vdbg(chan2dev(tx->chan), "%s: queued %u\n", __func__, desc->txd.cookie);
list_add_tail(&desc->desc_node, &dwc->queue); list_add_tail(&desc->desc_node, &dwc->queue);
}
spin_unlock_irqrestore(&dwc->lock, flags); spin_unlock_irqrestore(&dwc->lock, flags);
...@@ -1095,9 +1087,12 @@ dwc_tx_status(struct dma_chan *chan, ...@@ -1095,9 +1087,12 @@ dwc_tx_status(struct dma_chan *chan,
static void dwc_issue_pending(struct dma_chan *chan) static void dwc_issue_pending(struct dma_chan *chan)
{ {
struct dw_dma_chan *dwc = to_dw_dma_chan(chan); struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
unsigned long flags;
if (!list_empty(&dwc->queue)) spin_lock_irqsave(&dwc->lock, flags);
dwc_scan_descriptors(to_dw_dma(chan->device), dwc); if (list_empty(&dwc->active_list))
dwc_dostart_first_queued(dwc);
spin_unlock_irqrestore(&dwc->lock, flags);
} }
static int dwc_alloc_chan_resources(struct dma_chan *chan) static int dwc_alloc_chan_resources(struct dma_chan *chan)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment