linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Streaming DMA mapping question
@ 2002-09-13 19:39 Adam Kropelin
  2002-09-13 19:36 ` David S. Miller
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Kropelin @ 2002-09-13 19:39 UTC (permalink / raw)
  To: linux-kernel

I'm working on revamping the DMA mapping of a driver and have been reading
Documentation/DMA-Mapping.txt and becoming one with it. On i386 I notice the
following discrepency:

According to the docs, you should either unmap or sync your DMA buffer before
touching it from the host. The i386 implementation of pci_unmap is empty --no
problem; there must not be any unmap work to do on this arch. But the 
implementation of pci_dma_sync does contain a flush_write_buffers() call. This
makes me think that perhaps if I'm going to modify the buffer before I submit it
back to the controller I need to do:

/* so I can read it; not necessary on i386 */
pci_dma_sync_single(...);

fiddle_with_buffer(...);

/* so adapter sees my changes; this is necessary on i386 */
pci_dma_sync_single(...);

Otherwise I don't see why it is safe to touch the buffer after pci_unmap.

Someone lend me a clue?

--Adam
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-09-16 21:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13 19:39 Streaming DMA mapping question Adam Kropelin
2002-09-13 19:36 ` David S. Miller
2002-09-13 20:21   ` Adam Kropelin
2002-09-13 20:28     ` David S. Miller
2002-09-13 20:52       ` Adam Kropelin
2002-09-13 20:46         ` David S. Miller
2002-09-14  3:51       ` Adam Kropelin
2002-09-16  3:30         ` David S. Miller
2002-09-16 21:06           ` Martin Diehl
2002-09-16 20:56             ` David S. Miller
2002-09-16 21:51               ` Martin Diehl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).