From: Scott Wood <scottwood@freescale.com>
To: Zhang Wei-r63237 <Wei.Zhang@freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 4/4] Add DMA engine driver for Freescale MPC8xxx processors.
Date: Thu, 12 Jul 2007 13:57:20 -0500 [thread overview]
Message-ID: <46967990.1090203@freescale.com> (raw)
In-Reply-To: <46B96294322F7D458F9648B60E15112C6F3E46@zch01exm26.fsl.freescale.net>
Zhang Wei-r63237 wrote:
>>It'd be much simpler to allocate the entire ring at once. No need for
>>linked lists, DMA pools, etc. Just a single dma_alloc_coherent.
>>
>
>
> I use a flexible ld ring size here. If there is no more free ring, the
> driver can add new ld to the ring.
I don't think that's worth all the complexity that it adds. Most
drivers make do just fine with a fixed-size ring.
>>What benefit do we get out of using extended mode? If the
>>driver can do
>>everything it needs to with basic, with no performance
>>penalty, why not
>>always use basic?
>>
>
> Why there are extended mode in silicon? :)
I've been wondering that myself. :-)
> Since there are here, we use it.
"Because it's there" really isn't a good reason for adding complexity to
the code.
>>It'd be nice if we didn't have to stop the DMA in order to insert new
>>descriptors.
>
>
> Since there is only happen at no more free ld in the ring. We need to
> break the ld-ring and add new ld to it.
Or you could just block until a previous descriptor completes.
>>Why not just use the index into the ring as the cookie?
>
>
> The cookie will record all transfer by increased number. The ring index
> is less for all transfer.
I'm not sure I follow. All you need is a way to identify a currently
used descriptor, right?
>>>+ fsl_chan->id, stat);
>>>+ if (!stat)
>>>+ return IRQ_NONE;
>>>+ busy = stat & (FSL_DMA_SR_CB);
>>>+ stat &= ~(FSL_DMA_SR_CB | FSL_DMA_SR_CH);
>>
>>This masking must happen *before* the IRQ_NONE check.
>
> Really? FSL_DMA_SR_CH is also a stat of event.
Does the IRQ handler always clear the bit? If not, then it doesn't count.
> And I need the FSL_DMA_SR_CB status.
The busy assignment can still happen before the mask... just move the
IRQ_NONE check down.
-Scott
prev parent reply other threads:[~2007-07-12 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 9:45 [PATCH 4/4] Add DMA engine driver for Freescale MPC8xxx processors Zhang Wei
2007-07-11 16:34 ` Scott Wood
2007-07-12 10:06 ` Zhang Wei-r63237
2007-07-12 18:57 ` Scott Wood [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=46967990.1090203@freescale.com \
--to=scottwood@freescale.com \
--cc=Wei.Zhang@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).