On Wed, Mar 11, 2009 at 10:52 AM, Crossley, Malcolm (GE EntSol, Intelligent Platforms) <malcolm.crossl...@gefanuc.com> wrote: > I have noticed that append_ld_queue() changes the next link descriptor > address field in the last link descriptor of the chain. The > append_ld_queue function is called from the fsl_dma_tx_submit() which > can called at any time by a kernel module using that channel. This could > result in the link descriptor being changed whilst the DMA engine is > running. Could this issue cause unexpected behavior of the DMA engine or > the driver?
I would need to study the code more thoroughly, but keep in mind that a DMA descriptor is read by the DMA controller only when it is about to be processed. It's okay to change the descriptor contents while the DMA buffer it references is being transferred. The new values in the descriptor won't be used until the DMA engine tries to use it the next time. > A second question I have is to do with the dma_halt() routine setting > the channel abort flag. The dma_halt() routine is called from > fsl_chan_xfer_ld_queue() after the dma engine has been detected as idle. > The dma_halt() routine sets the channel stop flag and the channel abort > flag. Whilst the dma engine could be idle, it may not have completed a > transfer AFAICT. Or if the engine is has no more transactions then a > channel abort does not need to be issued anyway? I would need to study the code to answer this question. I wrote a different driver that uses this DMA controller, so I'm familiar with the controller but not the code. -- Timur Tabi Linux kernel developer at Freescale _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev