[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120730203412.GA5311@gobelin>
Date: Mon, 30 Jul 2012 22:34:32 +0200
From: karl.beldan@...il.com
To: linux-kernel@...r.kernel.org
Cc: karl.beldan@...il.com
Subject: Re: About dma_sync_single_for_{cpu,device}
On Mon, Jul 30, 2012 at 10:24:01PM +0200, karl.beldan@...il.com wrote:
> I was expecting the following to work:
> addr = dma_map_single(dev, buffer, size, DMA_TO_DEVICE);
Sorry, I forgot this (invalidate):
dma_sync_single_for_device(dev, buffer, pattern_size, DMA_FROM_DEVICE);
> dev_send(buffer);
> // wait for irq (don't peek in the buffer) ... got irq
> dma_sync_single_single_for_cpu(dev, buffer, pattern_size, DMA_FROM_DEVICE);
> if (!xfer_done(buffer)) // not RAM value
> dma_sync_single_for_device(dev, buffer, pattern_size, DMA_FROM_DEVICE);
> [...]
Karl
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists