summaryrefslogtreecommitdiffstats
path: root/dma/nwl_engine.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-10-23 02:43:20 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-10-23 02:43:20 +0200
commit8af9de82916ff76129d01ede66fc4406818c525c (patch)
tree3327adb667efa9426b630ba841a16a598c0f9e0c /dma/nwl_engine.c
parent24f29cbd62e9b2f30aba8f2357084baf6b70fa17 (diff)
downloadpcitool-8af9de82916ff76129d01ede66fc4406818c525c.tar.gz
pcitool-8af9de82916ff76129d01ede66fc4406818c525c.tar.bz2
pcitool-8af9de82916ff76129d01ede66fc4406818c525c.tar.xz
pcitool-8af9de82916ff76129d01ede66fc4406818c525c.zip
Properly perform synchronization of DMA buffers
Diffstat (limited to 'dma/nwl_engine.c')
-rw-r--r--dma/nwl_engine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dma/nwl_engine.c b/dma/nwl_engine.c
index 277ad23..0b5924d 100644
--- a/dma/nwl_engine.c
+++ b/dma/nwl_engine.c
@@ -289,10 +289,12 @@ int dma_nwl_stream_read(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, uin
}
#endif /* NWL_FIX_EOP_FOR_BIG_PACKETS */
- //sync
+ pcilib_sync_kernel_memory(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_FROMDEVICE);
void *buf = pcilib_kmem_get_block_ua(ctx->pcilib, info->pages, bufnum);
ret = cb(cbattr, eop?PCILIB_DMA_FLAG_EOP:0, bufsize, buf);
+ pcilib_sync_kernel_memory(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_TODEVICE);
dma_nwl_return_buffer(ctx, info);
+
res += bufsize;