[PATCH V4 04/14] DMA: PL330: Add DMA_CYCLIC capability
From: Russell King - ARM Linux <hidden>
Date: 2011-07-25 10:57:54
Also in:
linux-samsung-soc
On Mon, Jul 25, 2011 at 04:18:04PM +0530, Vinod Koul wrote:
On Mon, 2011-07-25 at 11:36 +0100, Russell King - ARM Linux wrote:quoted
On Mon, Jul 25, 2011 at 07:31:45PM +0900, Boojin Kim wrote:quoted
quoted
On Mon, Jul 25, 2011 at 10:28:22AM +0900, Boojin Kim wrote:quoted
+static void pl330_tasklet_cyclic(unsigned long data) +{ + struct dma_pl330_chan *pch = (struct dma_pl330_chan *)data; + struct dma_pl330_desc *desc, *_dt; + unsigned long flags; + LIST_HEAD(list); + + spin_lock_irqsave(&pch->lock, flags);...quoted
+ callback = desc->txd.callback; + if (callback) + callback(desc->txd.callback_param);On this again - what if the callback wants to terminate the DMA activity because there's no more audio data to be sent/received from the device?Do you mean what is happened if the callback() is called after channel is terminated ? Or What is happened if Callback() calls 'dma_release_channel()' to terminate DMA?No. I mean what if the callback wants to call dmaengine_terminate_all().you are supposed to drop the lock here, that way callback can call any DMA API, otherwise it will result in deadlock. This make me wonder you haven't read the documentation at all, please ensure you have read Documentation/dmaengine.txt before next posting
I know that very well thank you. Please look at my previous post in the previous round of patches, and the response from Boojin Kim to see why I used this as an *EXAMPLE* to get this fixed.