Lines Matching +full:dma +full:- +full:pool
4 * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term *
6 * Copyright (C) 2004-2014 Emulex. All rights reserved. *
9 * Portions Copyright (C) 2004-2005 Christoph Hellwig *
17 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
45 #define LPFC_MBUF_POOL_SIZE 64 /* max elements in MBUF safety pool */
46 #define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA 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 */
54 int max_xri = phba->sli4_hba.max_cfg_param.max_xri; in lpfc_mem_alloc_active_rrq_pool_s4()
57 return -ENOMEM; in lpfc_mem_alloc_active_rrq_pool_s4()
58 bytes = ((BITS_PER_LONG - 1 + max_xri) / BITS_PER_LONG) * in lpfc_mem_alloc_active_rrq_pool_s4()
60 phba->cfg_rrq_xri_bitmap_sz = bytes; in lpfc_mem_alloc_active_rrq_pool_s4()
61 phba->active_rrq_pool = mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE, in lpfc_mem_alloc_active_rrq_pool_s4()
63 if (!phba->active_rrq_pool) in lpfc_mem_alloc_active_rrq_pool_s4()
64 return -ENOMEM; in lpfc_mem_alloc_active_rrq_pool_s4()
70 * lpfc_mem_alloc - create and allocate all PCI and memory pools
75 * lpfc_hrb_pool. Creates and allocates kmalloc-backed mempools
78 * Notes: Not interrupt-safe. Must be called with no locks held. If any
83 * -ENOMEM on failure (if any memory allocations fail)
88 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in lpfc_mem_alloc() local
92 phba->lpfc_mbuf_pool = dma_pool_create("lpfc_mbuf_pool", &phba->pcidev->dev, in lpfc_mem_alloc()
95 if (!phba->lpfc_mbuf_pool) in lpfc_mem_alloc()
98 pool->elements = kmalloc_array(LPFC_MBUF_POOL_SIZE, in lpfc_mem_alloc()
101 if (!pool->elements) in lpfc_mem_alloc()
104 pool->max_count = 0; in lpfc_mem_alloc()
105 pool->current_count = 0; 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()
111 pool->max_count++; in lpfc_mem_alloc()
112 pool->current_count++; in lpfc_mem_alloc()
115 phba->mbox_mem_pool = mempool_create_kmalloc_pool(LPFC_MBX_POOL_SIZE, in lpfc_mem_alloc()
117 if (!phba->mbox_mem_pool) in lpfc_mem_alloc()
120 phba->nlp_mem_pool = mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE, in lpfc_mem_alloc()
122 if (!phba->nlp_mem_pool) in lpfc_mem_alloc()
125 if (phba->sli_rev == LPFC_SLI_REV4) { in lpfc_mem_alloc()
126 phba->rrq_pool = in lpfc_mem_alloc()
129 if (!phba->rrq_pool) in lpfc_mem_alloc()
131 phba->lpfc_hrb_pool = dma_pool_create("lpfc_hrb_pool", in lpfc_mem_alloc()
132 &phba->pcidev->dev, in lpfc_mem_alloc()
134 if (!phba->lpfc_hrb_pool) in lpfc_mem_alloc()
137 phba->lpfc_drb_pool = dma_pool_create("lpfc_drb_pool", in lpfc_mem_alloc()
138 &phba->pcidev->dev, in lpfc_mem_alloc()
140 if (!phba->lpfc_drb_pool) in lpfc_mem_alloc()
142 phba->lpfc_hbq_pool = NULL; in lpfc_mem_alloc()
144 phba->lpfc_hbq_pool = dma_pool_create("lpfc_hbq_pool", in lpfc_mem_alloc()
145 &phba->pcidev->dev, LPFC_BPL_SIZE, align, 0); in lpfc_mem_alloc()
146 if (!phba->lpfc_hbq_pool) in lpfc_mem_alloc()
148 phba->lpfc_hrb_pool = NULL; in lpfc_mem_alloc()
149 phba->lpfc_drb_pool = NULL; in lpfc_mem_alloc()
152 if (phba->cfg_EnableXLane) { in lpfc_mem_alloc()
153 phba->device_data_mem_pool = mempool_create_kmalloc_pool( in lpfc_mem_alloc()
156 if (!phba->device_data_mem_pool) in lpfc_mem_alloc()
159 phba->device_data_mem_pool = NULL; in lpfc_mem_alloc()
164 dma_pool_destroy(phba->lpfc_drb_pool); in lpfc_mem_alloc()
165 phba->lpfc_drb_pool = NULL; in lpfc_mem_alloc()
167 dma_pool_destroy(phba->lpfc_hrb_pool); in lpfc_mem_alloc()
168 phba->lpfc_hrb_pool = NULL; in lpfc_mem_alloc()
170 mempool_destroy(phba->rrq_pool); in lpfc_mem_alloc()
171 phba->rrq_pool = NULL; in lpfc_mem_alloc()
173 mempool_destroy(phba->nlp_mem_pool); in lpfc_mem_alloc()
174 phba->nlp_mem_pool = NULL; in lpfc_mem_alloc()
176 mempool_destroy(phba->mbox_mem_pool); in lpfc_mem_alloc()
177 phba->mbox_mem_pool = NULL; in lpfc_mem_alloc()
179 while (i--) 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()
184 dma_pool_destroy(phba->lpfc_mbuf_pool); in lpfc_mem_alloc()
185 phba->lpfc_mbuf_pool = NULL; in lpfc_mem_alloc()
187 return -ENOMEM; in lpfc_mem_alloc()
193 phba->lpfc_nvmet_drb_pool = in lpfc_nvmet_mem_alloc()
195 &phba->pcidev->dev, LPFC_NVMET_DATA_BUF_SIZE, in lpfc_nvmet_mem_alloc()
197 if (!phba->lpfc_nvmet_drb_pool) { in lpfc_nvmet_mem_alloc()
199 "6024 Can't enable NVME Target - no memory\n"); in lpfc_nvmet_mem_alloc()
200 return -ENOMEM; in lpfc_nvmet_mem_alloc()
206 * lpfc_mem_free - Frees memory allocated by lpfc_mem_alloc
218 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in lpfc_mem_free() local
223 dma_pool_destroy(phba->lpfc_nvmet_drb_pool); in lpfc_mem_free()
224 phba->lpfc_nvmet_drb_pool = NULL; in lpfc_mem_free()
226 dma_pool_destroy(phba->lpfc_drb_pool); in lpfc_mem_free()
227 phba->lpfc_drb_pool = NULL; in lpfc_mem_free()
229 dma_pool_destroy(phba->lpfc_hrb_pool); in lpfc_mem_free()
230 phba->lpfc_hrb_pool = NULL; in lpfc_mem_free()
232 dma_pool_destroy(phba->lpfc_hbq_pool); in lpfc_mem_free()
233 phba->lpfc_hbq_pool = NULL; in lpfc_mem_free()
235 mempool_destroy(phba->rrq_pool); in lpfc_mem_free()
236 phba->rrq_pool = NULL; in lpfc_mem_free()
238 /* Free NLP memory pool */ in lpfc_mem_free()
239 mempool_destroy(phba->nlp_mem_pool); in lpfc_mem_free()
240 phba->nlp_mem_pool = NULL; in lpfc_mem_free()
241 if (phba->sli_rev == LPFC_SLI_REV4 && phba->active_rrq_pool) { in lpfc_mem_free()
242 mempool_destroy(phba->active_rrq_pool); in lpfc_mem_free()
243 phba->active_rrq_pool = NULL; in lpfc_mem_free()
246 /* Free mbox memory pool */ in lpfc_mem_free()
247 mempool_destroy(phba->mbox_mem_pool); in lpfc_mem_free()
248 phba->mbox_mem_pool = NULL; in lpfc_mem_free()
250 /* Free MBUF memory pool */ in lpfc_mem_free()
251 for (i = 0; i < pool->current_count; i++) in lpfc_mem_free()
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()
256 dma_pool_destroy(phba->lpfc_mbuf_pool); in lpfc_mem_free()
257 phba->lpfc_mbuf_pool = NULL; in lpfc_mem_free()
259 /* Free Device Data memory pool */ in lpfc_mem_free()
260 if (phba->device_data_mem_pool) { in lpfc_mem_free()
261 /* Ensure all objects have been returned to the pool */ in lpfc_mem_free()
262 while (!list_empty(&phba->luns)) { in lpfc_mem_free()
263 device_data = list_first_entry(&phba->luns, in lpfc_mem_free()
266 list_del(&device_data->listentry); in lpfc_mem_free()
267 mempool_free(device_data, phba->device_data_mem_pool); in lpfc_mem_free()
269 mempool_destroy(phba->device_data_mem_pool); in lpfc_mem_free()
271 phba->device_data_mem_pool = NULL; in lpfc_mem_free()
276 * lpfc_mem_free_all - Frees all PCI and driver memory
281 * kmalloc-backed mempools for LPFC_MBOXQ_t and lpfc_nodelist. Also frees
289 struct lpfc_sli *psli = &phba->sli; in lpfc_mem_free_all()
293 /* Free memory used in mailbox queue back to mailbox memory pool */ in lpfc_mem_free_all()
294 list_for_each_entry_safe(mbox, next_mbox, &psli->mboxq, list) { in lpfc_mem_free_all()
295 mp = (struct lpfc_dmabuf *)(mbox->ctx_buf); in lpfc_mem_free_all()
297 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_mem_free_all()
300 list_del(&mbox->list); in lpfc_mem_free_all()
301 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_mem_free_all()
303 /* Free memory used in mailbox cmpl list back to mailbox memory pool */ in lpfc_mem_free_all()
304 list_for_each_entry_safe(mbox, next_mbox, &psli->mboxq_cmpl, list) { in lpfc_mem_free_all()
305 mp = (struct lpfc_dmabuf *)(mbox->ctx_buf); in lpfc_mem_free_all()
307 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_mem_free_all()
310 list_del(&mbox->list); in lpfc_mem_free_all()
311 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_mem_free_all()
313 /* Free the active mailbox command back to the mailbox memory pool */ in lpfc_mem_free_all()
314 spin_lock_irq(&phba->hbalock); in lpfc_mem_free_all()
315 psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; in lpfc_mem_free_all()
316 spin_unlock_irq(&phba->hbalock); in lpfc_mem_free_all()
317 if (psli->mbox_active) { in lpfc_mem_free_all()
318 mbox = psli->mbox_active; in lpfc_mem_free_all()
319 mp = (struct lpfc_dmabuf *)(mbox->ctx_buf); in lpfc_mem_free_all()
321 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_mem_free_all()
324 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_mem_free_all()
325 psli->mbox_active = NULL; in lpfc_mem_free_all()
331 /* Free DMA buffer memory pool */ in lpfc_mem_free_all()
332 dma_pool_destroy(phba->lpfc_sg_dma_buf_pool); in lpfc_mem_free_all()
333 phba->lpfc_sg_dma_buf_pool = NULL; in lpfc_mem_free_all()
335 dma_pool_destroy(phba->lpfc_cmd_rsp_buf_pool); in lpfc_mem_free_all()
336 phba->lpfc_cmd_rsp_buf_pool = NULL; in lpfc_mem_free_all()
339 if (phba->cgn_i) { in lpfc_mem_free_all()
340 dma_free_coherent(&phba->pcidev->dev, in lpfc_mem_free_all()
342 phba->cgn_i->virt, phba->cgn_i->phys); in lpfc_mem_free_all()
343 kfree(phba->cgn_i); in lpfc_mem_free_all()
344 phba->cgn_i = NULL; in lpfc_mem_free_all()
348 if (phba->rx_monitor) { in lpfc_mem_free_all()
349 lpfc_rx_monitor_destroy_ring(phba->rx_monitor); in lpfc_mem_free_all()
350 kfree(phba->rx_monitor); in lpfc_mem_free_all()
351 phba->rx_monitor = NULL; in lpfc_mem_free_all()
355 kfree(psli->iocbq_lookup); in lpfc_mem_free_all()
356 psli->iocbq_lookup = NULL; in lpfc_mem_free_all()
362 * lpfc_mbuf_alloc - Allocate an mbuf from the lpfc_mbuf_pool PCI pool
363 * @phba: HBA which owns the pool to allocate from
365 * @handle: used to return the DMA-mapped address of the mbuf
367 * Description: Allocates a DMA-mapped buffer from the lpfc_mbuf_pool PCI pool.
370 * HBA's pool.
372 * Notes: Not interrupt-safe. Must be called with no locks held. Takes
373 * phba->hbalock.
382 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in lpfc_mbuf_alloc() local
386 ret = dma_pool_alloc(phba->lpfc_mbuf_pool, GFP_KERNEL, handle); in lpfc_mbuf_alloc()
388 spin_lock_irqsave(&phba->hbalock, iflags); in lpfc_mbuf_alloc()
389 if (!ret && (mem_flags & MEM_PRI) && pool->current_count) { in lpfc_mbuf_alloc()
390 pool->current_count--; in lpfc_mbuf_alloc()
391 ret = pool->elements[pool->current_count].virt; in lpfc_mbuf_alloc()
392 *handle = pool->elements[pool->current_count].phys; in lpfc_mbuf_alloc()
394 spin_unlock_irqrestore(&phba->hbalock, iflags); in lpfc_mbuf_alloc()
399 * __lpfc_mbuf_free - Free an mbuf from the lpfc_mbuf_pool PCI pool (locked)
400 * @phba: HBA which owns the pool to return to
402 * @dma: the DMA-mapped address of the lpfc_mbuf_pool to be freed
407 * Notes: Must be called with phba->hbalock held to synchronize access to
413 __lpfc_mbuf_free(struct lpfc_hba * phba, void *virt, dma_addr_t dma) in __lpfc_mbuf_free() argument
415 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool; in __lpfc_mbuf_free() local
417 if (pool->current_count < pool->max_count) { in __lpfc_mbuf_free()
418 pool->elements[pool->current_count].virt = virt; in __lpfc_mbuf_free()
419 pool->elements[pool->current_count].phys = dma; in __lpfc_mbuf_free()
420 pool->current_count++; in __lpfc_mbuf_free()
422 dma_pool_free(phba->lpfc_mbuf_pool, virt, dma); in __lpfc_mbuf_free()
428 * lpfc_mbuf_free - Free an mbuf from the lpfc_mbuf_pool PCI pool (unlocked)
429 * @phba: HBA which owns the pool to return to
431 * @dma: the DMA-mapped address of the lpfc_mbuf_pool to be freed
436 * Notes: Takes phba->hbalock. Can be called with or without other locks held.
441 lpfc_mbuf_free(struct lpfc_hba * phba, void *virt, dma_addr_t dma) in lpfc_mbuf_free() argument
445 spin_lock_irqsave(&phba->hbalock, iflags); in lpfc_mbuf_free()
446 __lpfc_mbuf_free(phba, virt, dma); in lpfc_mbuf_free()
447 spin_unlock_irqrestore(&phba->hbalock, iflags); in lpfc_mbuf_free()
452 * lpfc_nvmet_buf_alloc - Allocate an nvmet_buf from the
453 * lpfc_sg_dma_buf_pool PCI pool
454 * @phba: HBA which owns the pool to allocate from
456 * @handle: used to return the DMA-mapped address of the nvmet_buf
458 * Description: Allocates a DMA-mapped buffer from the lpfc_sg_dma_buf_pool
459 * PCI pool. Allocates from generic dma_pool_alloc function.
470 ret = dma_pool_alloc(phba->lpfc_sg_dma_buf_pool, GFP_KERNEL, handle); in lpfc_nvmet_buf_alloc()
475 * lpfc_nvmet_buf_free - Free an nvmet_buf from the lpfc_sg_dma_buf_pool
476 * PCI pool
477 * @phba: HBA which owns the pool to return to
479 * @dma: the DMA-mapped address of the lpfc_sg_dma_buf_pool to be freed
484 lpfc_nvmet_buf_free(struct lpfc_hba *phba, void *virt, dma_addr_t dma) in lpfc_nvmet_buf_free() argument
486 dma_pool_free(phba->lpfc_sg_dma_buf_pool, virt, dma); in lpfc_nvmet_buf_free()
490 * lpfc_els_hbq_alloc - Allocate an HBQ buffer
493 * Description: Allocates a DMA-mapped HBQ buffer from the lpfc_hrb_pool PCI
494 * pool along a non-DMA-mapped container for it.
496 * Notes: Not interrupt-safe. Must be called with no locks held.
511 hbqbp->dbuf.virt = dma_pool_alloc(phba->lpfc_hbq_pool, GFP_KERNEL, in lpfc_els_hbq_alloc()
512 &hbqbp->dbuf.phys); in lpfc_els_hbq_alloc()
513 if (!hbqbp->dbuf.virt) { in lpfc_els_hbq_alloc()
517 hbqbp->total_size = LPFC_BPL_SIZE; in lpfc_els_hbq_alloc()
522 * lpfc_els_hbq_free - Frees an HBQ buffer allocated with lpfc_els_hbq_alloc
526 * Description: Frees both the container and the DMA-mapped buffer returned by
536 dma_pool_free(phba->lpfc_hbq_pool, hbqbp->dbuf.virt, hbqbp->dbuf.phys); in lpfc_els_hbq_free()
542 * lpfc_sli4_rb_alloc - Allocate an SLI4 Receive buffer
545 * Description: Allocates a DMA-mapped receive buffer from the lpfc_hrb_pool PCI
546 * pool along a non-DMA-mapped container for it.
548 * Notes: Not interrupt-safe. Must be called with no locks held.
563 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc()
564 &dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc()
565 if (!dma_buf->hbuf.virt) { in lpfc_sli4_rb_alloc()
569 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc()
570 &dma_buf->dbuf.phys); in lpfc_sli4_rb_alloc()
571 if (!dma_buf->dbuf.virt) { in lpfc_sli4_rb_alloc()
572 dma_pool_free(phba->lpfc_hrb_pool, dma_buf->hbuf.virt, in lpfc_sli4_rb_alloc()
573 dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc()
577 dma_buf->total_size = LPFC_DATA_BUF_SIZE; in lpfc_sli4_rb_alloc()
582 * lpfc_sli4_rb_free - Frees a receive buffer
584 * @dmab: DMA Buffer container returned by lpfc_sli4_hbq_alloc
586 * Description: Frees both the container and the DMA-mapped buffers returned by
596 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_rb_free()
597 dma_pool_free(phba->lpfc_drb_pool, dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_rb_free()
602 * lpfc_sli4_nvmet_alloc - Allocate an SLI4 Receive buffer
605 * Description: Allocates a DMA-mapped receive buffer from the lpfc_hrb_pool PCI
606 * pool along a non-DMA-mapped container for it.
621 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_nvmet_alloc()
622 &dma_buf->hbuf.phys); in lpfc_sli4_nvmet_alloc()
623 if (!dma_buf->hbuf.virt) { in lpfc_sli4_nvmet_alloc()
627 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_nvmet_drb_pool, in lpfc_sli4_nvmet_alloc()
628 GFP_KERNEL, &dma_buf->dbuf.phys); in lpfc_sli4_nvmet_alloc()
629 if (!dma_buf->dbuf.virt) { in lpfc_sli4_nvmet_alloc()
630 dma_pool_free(phba->lpfc_hrb_pool, dma_buf->hbuf.virt, in lpfc_sli4_nvmet_alloc()
631 dma_buf->hbuf.phys); in lpfc_sli4_nvmet_alloc()
635 dma_buf->total_size = LPFC_NVMET_DATA_BUF_SIZE; in lpfc_sli4_nvmet_alloc()
640 * lpfc_sli4_nvmet_free - Frees a receive buffer
642 * @dmab: DMA Buffer container returned by lpfc_sli4_rbq_alloc
644 * Description: Frees both the container and the DMA-mapped buffers returned by
654 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_nvmet_free()
655 dma_pool_free(phba->lpfc_nvmet_drb_pool, in lpfc_sli4_nvmet_free()
656 dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_nvmet_free()
661 * lpfc_in_buf_free - Free a DMA buffer
665 * Description: Frees the given DMA buffer in the appropriate way given if the
668 * Notes: Takes phba->hbalock. Can be called with or without other locks held.
681 if (phba->sli3_options & LPFC_SLI3_HBQ_ENABLED) { in lpfc_in_buf_free()
684 spin_lock_irqsave(&phba->hbalock, flags); in lpfc_in_buf_free()
685 if (!phba->hbq_in_use) { in lpfc_in_buf_free()
686 spin_unlock_irqrestore(&phba->hbalock, flags); in lpfc_in_buf_free()
689 list_del(&hbq_entry->dbuf.list); in lpfc_in_buf_free()
690 if (hbq_entry->tag == -1) { in lpfc_in_buf_free()
691 (phba->hbqs[LPFC_ELS_HBQ].hbq_free_buffer) in lpfc_in_buf_free()
696 spin_unlock_irqrestore(&phba->hbalock, flags); in lpfc_in_buf_free()
698 lpfc_mbuf_free(phba, mp->virt, mp->phys); in lpfc_in_buf_free()
705 * lpfc_rq_buf_free - Free a RQ DMA buffer
709 * Description: Frees the given DMA buffer in the appropriate way given by
712 * Notes: Takes phba->hbalock. Can be called with or without other locks held.
730 rqbp = rqb_entry->hrq->rqbp; in lpfc_rq_buf_free()
732 spin_lock_irqsave(&phba->hbalock, flags); in lpfc_rq_buf_free()
733 list_del(&rqb_entry->hbuf.list); in lpfc_rq_buf_free()
734 hrqe.address_lo = putPaddrLow(rqb_entry->hbuf.phys); in lpfc_rq_buf_free()
735 hrqe.address_hi = putPaddrHigh(rqb_entry->hbuf.phys); in lpfc_rq_buf_free()
736 drqe.address_lo = putPaddrLow(rqb_entry->dbuf.phys); in lpfc_rq_buf_free()
737 drqe.address_hi = putPaddrHigh(rqb_entry->dbuf.phys); in lpfc_rq_buf_free()
738 rc = lpfc_sli4_rq_put(rqb_entry->hrq, rqb_entry->drq, &hrqe, &drqe); in lpfc_rq_buf_free()
743 rqb_entry->hrq->queue_id, in lpfc_rq_buf_free()
744 rqb_entry->hrq->host_index, in lpfc_rq_buf_free()
745 rqb_entry->hrq->hba_index, in lpfc_rq_buf_free()
746 rqb_entry->hrq->entry_count, in lpfc_rq_buf_free()
747 rqb_entry->drq->host_index, in lpfc_rq_buf_free()
748 rqb_entry->drq->hba_index); in lpfc_rq_buf_free()
749 (rqbp->rqb_free_buffer)(phba, rqb_entry); in lpfc_rq_buf_free()
751 list_add_tail(&rqb_entry->hbuf.list, &rqbp->rqb_buffer_list); in lpfc_rq_buf_free()
752 rqbp->buffer_count++; in lpfc_rq_buf_free()
755 spin_unlock_irqrestore(&phba->hbalock, flags); in lpfc_rq_buf_free()