If you need to use the same streaming DMA region multiple times
and touch the data in between the DMA transfers, just map it
with pci_map_{single,sg}, and after each DMA transfer call
either:
pci_dma_sync_single(dev, dma_handle, size, direction);
or:
pci_dma_sync_sg(dev, sglist, nents, direction);
as appropriate.
However, shouldn't pci_dma_sync_*() be called *before* each
PCI_DMA_TODEVICE DMA transfer (after the CPU write, of course) and
*after* each PCI_DMA_FROMDEVICE DMA transfer (before CPU access)? And,
of course, before and after a "bidirectional" DMA, if appropriate.
Thanks,
William
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/