Possible discrepancy regarding streaming DMA mappings in DMA-mapping.txt?

William Jhun (wjhun@ayrnetworks.com)
Thu, 23 May 2002 16:24:25 -0700


In the explanation of streaming DMA mappings and holding onto a mapping
for multiple DMA operations, the file Documentation/DMA-mapping.txt
(line 507) says the following:

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/