From: "Ira W. Snyder" <iws@ovro.caltech.edu>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/4] fsldma: remove DMA_SLAVE support
Date: Wed, 29 Sep 2010 15:19:31 -0700 [thread overview]
Message-ID: <20100929221931.GE20748@ovro.caltech.edu> (raw)
In-Reply-To: <AANLkTik4_se70GkKb2FLwsiUtQGyaHgxsLn3MQhmv5jh@mail.gmail.com>
On Wed, Sep 29, 2010 at 02:52:16PM -0700, Dan Williams wrote:
> On Mon, Sep 27, 2010 at 3:57 PM, Ira W. Snyder <iws@ovro.caltech.edu> wrote:
> > Now that the generic DMAEngine API has support for scatterlist to
> > scatterlist copying, this implementation of the DMA_SLAVE API is no
> > longer necessary.
> >
> > In order to let device_control() continue to function, a stub
> > device_prep_slave_sg() function is provided. This allows custom device
> > configuration, such as enabling external control.
> >
>
> > + case DMA_SLAVE_CONFIG:
> > +
> > + cfg = (struct fsldma_slave_config *)arg;
>
> Now that I actually see someone trying to use the recommended
> extension model it comes across as unsafe, what guarantees that arg is
> pointing to a fsldma_slave_config. At at minimum you could ensure
> that this channel has been claimed for private usage which loosely
> implies that the client knows that it is talking to an fsldma channel.
> Even safer is to just assign you a one-off dma_ctrl_cmd
> (FSLDMA_EXTERNAL_START) for this purpose. Otherwise this and the
> other patches look good.
>
I agree, it is a very unsafe model.
I'll take your suggestion, and do that instead. A new patch will be
forthcoming shortly.
Thanks,
Ira
next prev parent reply other threads:[~2010-09-29 22:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 22:57 [PATCH RFCv3 0/4] dma: add support for scatterlist to scatterlist copy Ira W. Snyder
2010-09-27 22:57 ` [PATCH 1/4] " Ira W. Snyder
2010-09-27 22:57 ` [PATCH 2/4] fsldma: implement " Ira W. Snyder
2010-09-27 22:57 ` [PATCH 3/4] fsldma: remove DMA_SLAVE support Ira W. Snyder
2010-09-29 21:52 ` Dan Williams
2010-09-29 22:19 ` Ira W. Snyder [this message]
2010-09-27 22:57 ` [PATCH 4/4] ste_dma40: implement support for scatterlist to scatterlist copy Ira W. Snyder
2010-09-29 21:19 ` Dan Williams
2010-09-30 7:13 ` Per Friden
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=20100929221931.GE20748@ovro.caltech.edu \
--to=iws@ovro.caltech.edu \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.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