From 39125f647c27a19abf85b25c753fc97832708d38 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 24 Oct 2011 23:14:38 +0200 Subject: Fix DMA synchronization for writes as well --- dma/nwl_engine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dma/nwl_engine.c b/dma/nwl_engine.c index 1fc147f..037ab02 100644 --- a/dma/nwl_engine.c +++ b/dma/nwl_engine.c @@ -242,7 +242,10 @@ int dma_nwl_write_fragment(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, } void *buf = pcilib_kmem_get_block_ua(ctx->pcilib, info->pages, bufnum); + + pcilib_kmem_sync_block(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_FROMDEVICE, bufnum); memcpy(buf, data, block_size); + pcilib_kmem_sync_block(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_TODEVICE, bufnum); err = dma_nwl_push_buffer(ctx, info, block_size, (flags&PCILIB_DMA_FLAG_EOP)&&((pos + block_size) == size), timeout); if (err) { -- cgit v1.2.3