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 */
97 pool->elements = kmalloc_array(LPFC_MBUF_POOL_SIZE, in lpfc_mem_alloc()
100 if (!pool->elements) in lpfc_mem_alloc()
106 pool->elements[i].virt = dma_pool_alloc(phba->lpfc_mbuf_pool, in lpfc_mem_alloc()
107 GFP_KERNEL, &pool->elements[i].phys); in lpfc_mem_alloc()
108 if (!pool->elements[i].virt) in lpfc_mem_alloc()
179 dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, in lpfc_mem_alloc()
180 pool->elements[i].phys); in lpfc_mem_alloc()
181 kfree(pool->elements); in lpfc_mem_alloc()
251 dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, in lpfc_mem_free()
252 pool->elements[i].phys); in lpfc_mem_free()
253 kfree(pool->elements); in lpfc_mem_free()
374 ret = pool->elements[pool->current_count].virt; in lpfc_mbuf_alloc()
375 *handle = pool->elements[pool->current_count].phys; in lpfc_mbuf_alloc()
401 pool->elements[pool->current_count].virt = virt; in __lpfc_mbuf_free()
402 pool->elements[pool->current_count].phys = dma; in __lpfc_mbuf_free()