[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: dma_sync_sg_for_cpu applied to a single scatterlist element
On Mon, 15 Mar 2010 17:30:19 -0400 (EDT)
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?

As James said, probably it works. As long as passed scatterlist
elements points to mapped regions, it works.

However, I think that the latest DMA-API.txt makes it clear that only
dma_sync_single_for_{cpu|device} supports a partial sync. So it's not
recommended, I guess.

 \ /
  Last update: 2010-03-16 00:19    [W:0.041 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site