From: Timur Tabi <timur@freescale.com>
To: "Crossley, Malcolm (GE EntSol,
Intelligent Platforms)" <Malcolm.Crossley2@gefanuc.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: fsldma driver questions
Date: Wed, 11 Mar 2009 16:34:24 -0500 [thread overview]
Message-ID: <ed82fe3e0903111434u264217b5o1f8a0e6811d55308@mail.gmail.com> (raw)
In-Reply-To: <FF6D174B07759740B0259F914CE6D7D305B1A61D@LONMLVEM04.e2k.ad.ge.com>
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
prev parent reply other threads:[~2009-03-11 21:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 15:52 fsldma driver questions Crossley, Malcolm (GE EntSol, Intelligent Platforms)
2009-03-11 21:34 ` Timur Tabi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed82fe3e0903111434u264217b5o1f8a0e6811d55308@mail.gmail.com \
--to=timur@freescale.com \
--cc=Malcolm.Crossley2@gefanuc.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).