* fsldma driver questions
@ 2009-03-11 15:52 Crossley, Malcolm (GE EntSol, Intelligent Platforms)
2009-03-11 21:34 ` Timur Tabi
0 siblings, 1 reply; 2+ messages in thread
From: Crossley, Malcolm (GE EntSol, Intelligent Platforms) @ 2009-03-11 15:52 UTC (permalink / raw)
To: linuxppc-dev
Hi there,
I've been examining the fsl dma driver (drivers/dma/fsldma.c) to work
out how a typical dma engine driver works so I can port an Intel dma
engine driver to the new dmaengine interface.=20
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?
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 have access to a GE Fanuc SBC310 which has an 8641D containing a dma
engine this driver was written for. So I can test any patches.=20
Thanks for your time. Malcolm
--=20
Malcolm Crossley, Software Engineer,=20
GE Fanuc Intelligent Platforms
GE Fanuc Intelligent Platforms Ltd, registered in England and Wales
(3828642) at 100 Barbirolli Square, Manchester, M2 3AB, VAT GB729849476
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fsldma driver questions
2009-03-11 15:52 fsldma driver questions Crossley, Malcolm (GE EntSol, Intelligent Platforms)
@ 2009-03-11 21:34 ` Timur Tabi
0 siblings, 0 replies; 2+ messages in thread
From: Timur Tabi @ 2009-03-11 21:34 UTC (permalink / raw)
To: Crossley, Malcolm (GE EntSol, Intelligent Platforms); +Cc: linuxppc-dev
On Wed, Mar 11, 2009 at 10:52 AM, Crossley, Malcolm (GE EntSol,
Intelligent Platforms) <Malcolm.Crossley2@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-11 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 15:52 fsldma driver questions Crossley, Malcolm (GE EntSol, Intelligent Platforms)
2009-03-11 21:34 ` Timur Tabi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).