From: Lars-Peter Clausen <lars@metafoo.de>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dmaengine: care sd_dma_address/len in dmaengine_prep_slave_single()
Date: Thu, 08 Mar 2012 10:48:30 +0100 [thread overview]
Message-ID: <4F58806E.9090500@metafoo.de> (raw)
In-Reply-To: <87pqe04qtk.wl%kuninori.morimoto.gx@renesas.com>
On 01/31/2012 02:13 AM, Kuninori Morimoto wrote:
> dmaengine_prep_slave_single() is helper macro of dmaengine.
> But it doesn't have sg_dma_address/len() settings which are required.
> And it used void *buf in parameter, but it should be dma_addr_t.
> This patch fixes up it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Hi,
Any news regarding this patch? The dmaengine_prep_slave_single in upstream
is not really usable as it is right now.
Thanks,
- Lars
> ---
> V1 -> v2
>
> - based on latest linus/master branch
>
> include/linux/dmaengine.h | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 679b349..97eaf57 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -606,11 +606,16 @@ static inline int dmaengine_slave_config(struct dma_chan *chan,
> }
>
> static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
> - struct dma_chan *chan, void *buf, size_t len,
> + struct dma_chan *chan, dma_addr_t buf, size_t len,
> enum dma_transfer_direction dir, unsigned long flags)
> {
> struct scatterlist sg;
> - sg_init_one(&sg, buf, len);
> +
> + sg_init_table(&sg, 1);
> + sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf)),
> + len, offset_in_page(buf));
> + sg_dma_address(&sg) = buf;
> + sg_dma_len(&sg) = len;
>
> return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
> }
next prev parent reply other threads:[~2012-03-08 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 9:25 [PATCH] dmaengine: care sd_dma_address/len in dmaengine_prep_slave_single() Kuninori Morimoto
2012-01-30 9:56 ` Vinod Koul
2012-01-31 1:13 ` [PATCH v2] " Kuninori Morimoto
2012-02-01 18:22 ` Russell King - ARM Linux
2012-04-25 14:18 ` Lars-Peter Clausen
2012-04-25 14:29 ` Russell King - ARM Linux
2012-03-08 9:48 ` Lars-Peter Clausen [this message]
2012-03-09 0:18 ` Kuninori Morimoto
2012-03-10 11:12 ` Lars-Peter Clausen
2012-03-13 0:46 ` Kuninori Morimoto
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=4F58806E.9090500@metafoo.de \
--to=lars@metafoo.de \
--cc=dan.j.williams@intel.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=vinod.koul@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.