mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: dma_sync_sg_for_cpu applied to a single scatterlist element
Date: Mon, 15 Mar 2010 18:59:45 -0400	[thread overview]
Message-ID: <1268693985.2853.62.camel@mulgrave.site> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1003151721190.1332-100000@iolanthe.rowland.org>

On Mon, 2010-03-15 at 17:30 -0400, Alan Stern wrote:
> This is addressed to James Bottomley as he is the author of
> Documentation/DMA-API.txt, but anyone else who can contribute is
> invited to do so.
> 
> Suppose a scatter-gather transfer with multiple scatterlist elements
> has been mapped via dma_map_sg().  Is it then valid to call 
> dma_sync_sg_for_cpu() with the "sg" argument pointing to one of the 
> mapped scatterlist elements (not necessarily the first one) and the 
> "nelems" argument set to 1?

It's not the design of the API, but I'm guessing, given the way the API
works on most arch's that it will work.  However, if you just want a
single element sync'd, won't dma_sync_single_for_cpu do that
transparently (as in just feed in the address and length from the sg
list), without mucking with the sg API?

James



  reply	other threads:[~2010-03-15 22:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 21:30 Alan Stern
2010-03-15 22:59 ` James Bottomley [this message]
2010-03-16 14:30   ` Alan Stern
2010-03-16 22:28     ` FUJITA Tomonori
2010-03-17 15:22       ` Alan Stern
2010-03-18  1:46         ` FUJITA Tomonori
2010-03-18 14:13           ` Alan Stern
2010-03-15 23:16 ` FUJITA Tomonori

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=1268693985.2853.62.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®