Lines Matching full:elements
45 #define LPFC_MBUF_POOL_SIZE 64 /* max elements in MBUF safety pool */
47 #define LPFC_DEVICE_DATA_POOL_SIZE 64 /* max elements in device data pool */
48 #define LPFC_RRQ_POOL_SIZE 256 /* max elements in non-DMA pool */
49 #define LPFC_MBX_POOL_SIZE 256 /* max elements in MBX non-DMA pool */
98 pool->elements = kmalloc_array(LPFC_MBUF_POOL_SIZE, in lpfc_mem_alloc()
101 if (!pool->elements) in lpfc_mem_alloc()
107 pool->elements[i].virt = dma_pool_alloc(phba->lpfc_mbuf_pool, in lpfc_mem_alloc()
108 GFP_KERNEL, &pool->elements[i].phys); in lpfc_mem_alloc()
109 if (!pool->elements[i].virt) in lpfc_mem_alloc()
180 dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, in lpfc_mem_alloc()
181 pool->elements[i].phys); in lpfc_mem_alloc()
182 kfree(pool->elements); in lpfc_mem_alloc()
252 dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, in lpfc_mem_free()
253 pool->elements[i].phys); in lpfc_mem_free()
254 kfree(pool->elements); in lpfc_mem_free()
388 ret = pool->elements[pool->current_count].virt; in lpfc_mbuf_alloc()
389 *handle = pool->elements[pool->current_count].phys; in lpfc_mbuf_alloc()
415 pool->elements[pool->current_count].virt = virt; in __lpfc_mbuf_free()
416 pool->elements[pool->current_count].phys = dma; in __lpfc_mbuf_free()