/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to dma/nwl_engine.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-10-23 00:43:20 UTC
  • Revision ID: csa@dside.dyndns.org-20111023004320-523yoab3y82nketc
Properly perform synchronization of DMA buffers

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
        }
290
290
#endif /*  NWL_FIX_EOP_FOR_BIG_PACKETS */
291
291
        
292
 
        //sync
 
292
        pcilib_sync_kernel_memory(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_FROMDEVICE);
293
293
        void *buf = pcilib_kmem_get_block_ua(ctx->pcilib, info->pages, bufnum);
294
294
        ret = cb(cbattr, eop?PCILIB_DMA_FLAG_EOP:0, bufsize, buf);
 
295
        pcilib_sync_kernel_memory(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_TODEVICE);
295
296
        dma_nwl_return_buffer(ctx, info);
 
297
 
296
298
        
297
299
        res += bufsize;
298
300