Lines Matching refs:pool

83 	struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool;  in lpfc_mem_alloc()  local
115 pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) * in lpfc_mem_alloc()
117 if (!pool->elements) in lpfc_mem_alloc()
120 pool->max_count = 0; in lpfc_mem_alloc()
121 pool->current_count = 0; in lpfc_mem_alloc()
123 pool->elements[i].virt = pci_pool_alloc(phba->lpfc_mbuf_pool, in lpfc_mem_alloc()
124 GFP_KERNEL, &pool->elements[i].phys); in lpfc_mem_alloc()
125 if (!pool->elements[i].virt) in lpfc_mem_alloc()
127 pool->max_count++; in lpfc_mem_alloc()
128 pool->current_count++; in lpfc_mem_alloc()
193 pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, in lpfc_mem_alloc()
194 pool->elements[i].phys); in lpfc_mem_alloc()
195 kfree(pool->elements); in lpfc_mem_alloc()
219 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in lpfc_mem_free() local
252 for (i = 0; i < pool->current_count; i++) in lpfc_mem_free()
253 pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, in lpfc_mem_free()
254 pool->elements[i].phys); in lpfc_mem_free()
255 kfree(pool->elements); in lpfc_mem_free()
364 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in lpfc_mbuf_alloc() local
371 if (!ret && (mem_flags & MEM_PRI) && pool->current_count) { in lpfc_mbuf_alloc()
372 pool->current_count--; in lpfc_mbuf_alloc()
373 ret = pool->elements[pool->current_count].virt; in lpfc_mbuf_alloc()
374 *handle = pool->elements[pool->current_count].phys; in lpfc_mbuf_alloc()
397 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in __lpfc_mbuf_free() local
399 if (pool->current_count < pool->max_count) { in __lpfc_mbuf_free()
400 pool->elements[pool->current_count].virt = virt; in __lpfc_mbuf_free()
401 pool->elements[pool->current_count].phys = dma; in __lpfc_mbuf_free()
402 pool->current_count++; in __lpfc_mbuf_free()