On Sat, Jul 04, 2009 at 11:41:46PM +0800, Ming Lei wrote:You missed an important statement: accessing the dma buffer during a dma transfer is not permitted without an intervening call to the dma_sync_* functions. DMA buffers have the idea of "ownership" - they initially start off being owned by the CPU. Upon dma_map_*(), ownership transfers to the DMA agent, and remains there until either a dma_unmap_*() or dma_sync_single_for_cpu(). In the case of dma_sync_single_for_cpu(), it can only be given back to the DMA agent using dma_sync_single_for_device(). The important point from the above is that _only_ the current owner may access the buffer. So, if you've mapped a buffer, accessing the buffer subsequently without a call to dma_sync_single_for_cpu() is illegal. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Artem Bityutskiy | [PATCH 18/44 take 2] [UBI] build unit implementation |
| James Morris | Re: LSM conversion to static interface |
git: | |
| Paul Jackson | [PATCH] cpuset sched_load_balance kmalloc fix |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Linus Torvalds | Re: [GIT]: Networking |
