diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-17 06:25:14 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-17 06:25:14 +0200 |
commit | ec5fd54c7559392139fa704a57185f4d4244dfde (patch) | |
tree | 05c138b1d5a350f5454a1a18bd051546e7cf8632 /dma/nwl_buffers.h | |
parent | 112030c40f88dde281073e00e4c24cc48daa99d2 (diff) | |
download | pcitool-ec5fd54c7559392139fa704a57185f4d4244dfde.tar.gz pcitool-ec5fd54c7559392139fa704a57185f4d4244dfde.tar.bz2 pcitool-ec5fd54c7559392139fa704a57185f4d4244dfde.tar.xz pcitool-ec5fd54c7559392139fa704a57185f4d4244dfde.zip |
Few fixes
Diffstat (limited to 'dma/nwl_buffers.h')
-rw-r--r-- | dma/nwl_buffers.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dma/nwl_buffers.h b/dma/nwl_buffers.h index 9e60461..c298612 100644 --- a/dma/nwl_buffers.h +++ b/dma/nwl_buffers.h @@ -113,10 +113,11 @@ static int dma_nwl_allocate_engine_buffers(nwl_dma_t *ctx, pcilib_nwl_engine_des char *base = info->base_addr; if (info->pages) return 0; - + // Or bidirectional specified by 0x0|addr, or read 0x0|addr and write 0x80|addr sub_use = info->desc.addr|(info->desc.direction == PCILIB_DMA_TO_DEVICE)?0x80:0x00; - flags = PCILIB_KMEM_FLAG_REUSE|PCILIB_KMEM_FLAG_EXCLUSIVE|PCILIB_KMEM_FLAG_HARDWARE|info->preserve?PCILIB_KMEM_FLAG_PERSISTENT:0; + flags = PCILIB_KMEM_FLAG_REUSE|PCILIB_KMEM_FLAG_EXCLUSIVE|PCILIB_KMEM_FLAG_HARDWARE|(info->preserve?PCILIB_KMEM_FLAG_PERSISTENT:0); + pcilib_kmem_handle_t *ring = pcilib_alloc_kernel_memory(ctx->pcilib, PCILIB_KMEM_TYPE_CONSISTENT, 1, PCILIB_NWL_DMA_PAGES * PCILIB_NWL_DMA_DESCRIPTOR_SIZE, PCILIB_NWL_ALIGNMENT, PCILIB_KMEM_USE(PCILIB_KMEM_USE_DMA_RING, sub_use), flags); pcilib_kmem_handle_t *pages = pcilib_alloc_kernel_memory(ctx->pcilib, PCILIB_KMEM_TYPE_PAGE, PCILIB_NWL_DMA_PAGES, 0, 0, PCILIB_KMEM_USE(PCILIB_KMEM_USE_DMA_PAGES, sub_use), flags); |