Lines Matching refs:psb

84 lpfc_release_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_io_buf *psb);
86 lpfc_release_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_io_buf *psb);
333 struct lpfc_io_buf *psb;
352 psb = kzalloc(sizeof(struct lpfc_io_buf), GFP_KERNEL);
353 if (!psb)
362 psb->data = dma_pool_zalloc(phba->lpfc_sg_dma_buf_pool,
363 GFP_KERNEL, &psb->dma_handle);
364 if (!psb->data) {
365 kfree(psb);
370 /* Allocate iotag for psb->cur_iocbq. */
371 iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq);
374 psb->data, psb->dma_handle);
375 kfree(psb);
378 psb->cur_iocbq.iocb_flag |= LPFC_IO_FCP;
380 psb->fcp_cmnd = psb->data;
381 psb->fcp_rsp = psb->data + sizeof(struct fcp_cmnd);
382 psb->dma_sgl = psb->data + sizeof(struct fcp_cmnd) +
386 bpl = (struct ulp_bde64 *)psb->dma_sgl;
387 pdma_phys_fcp_cmd = psb->dma_handle;
388 pdma_phys_fcp_rsp = psb->dma_handle + sizeof(struct fcp_cmnd);
389 pdma_phys_sgl = psb->dma_handle + sizeof(struct fcp_cmnd) +
414 iocb = &psb->cur_iocbq.iocb;
447 psb->status = IOSTAT_SUCCESS;
449 psb->cur_iocbq.context1 = psb;
450 spin_lock_init(&psb->buf_lock);
451 lpfc_release_scsi_buf_s3(phba, psb);
469 struct lpfc_io_buf *psb, *next_psb;
482 list_for_each_entry_safe(psb, next_psb,
484 if (psb->cur_iocbq.iocb_flag & LPFC_IO_NVME)
487 if (psb->rdata && psb->rdata->pnode &&
488 psb->rdata->pnode->vport == vport)
489 psb->rdata = NULL;
510 struct lpfc_io_buf *psb, *next_psb;
525 list_for_each_entry_safe(psb, next_psb,
527 if (psb->cur_iocbq.sli4_xritag == xri) {
528 list_del_init(&psb->list);
529 psb->flags &= ~LPFC_SBUF_XBUSY;
530 psb->status = IOSTAT_SUCCESS;
531 if (psb->cur_iocbq.iocb_flag & LPFC_IO_NVME) {
535 lpfc_sli4_nvme_xri_aborted(phba, axri, psb);
541 if (psb->rdata && psb->rdata->pnode)
542 ndlp = psb->rdata->pnode;
550 psb->cur_iocbq.sli4_lxritag, rxid, 1);
553 lpfc_release_scsi_buf_s4(phba, psb);
568 psb = container_of(iocbq, struct lpfc_io_buf, cur_iocbq);
569 psb->flags &= ~LPFC_SBUF_XBUSY;
751 * @psb: The scsi buffer which is being released.
753 * This routine releases @psb scsi buffer by adding it to tail of @phba
757 lpfc_release_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
761 psb->seg_cnt = 0;
762 psb->prot_seg_cnt = 0;
765 psb->pCmd = NULL;
766 psb->cur_iocbq.iocb_flag = LPFC_IO_FCP;
767 list_add_tail(&psb->list, &phba->lpfc_scsi_buf_list_put);
774 * @psb: The scsi buffer which is being released.
776 * This routine releases @psb scsi buffer by adding it to tail of @hdwq
782 lpfc_release_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
787 psb->seg_cnt = 0;
788 psb->prot_seg_cnt = 0;
790 qp = psb->hdwq;
791 if (psb->flags & LPFC_SBUF_XBUSY) {
793 psb->pCmd = NULL;
794 list_add_tail(&psb->list, &qp->lpfc_abts_io_buf_list);
798 lpfc_release_io_buf(phba, (struct lpfc_io_buf *)psb, qp);
805 * @psb: The scsi buffer which is being released.
807 * This routine releases @psb scsi buffer by adding it to tail of @phba
811 lpfc_release_scsi_buf(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
813 if ((psb->flags & LPFC_SBUF_BUMP_QDEPTH) && psb->ndlp)
814 atomic_dec(&psb->ndlp->cmd_pending);
816 psb->flags &= ~LPFC_SBUF_BUMP_QDEPTH;
817 phba->lpfc_release_scsi_buf(phba, psb);
3575 * @psb: The scsi buffer which is going to be un-mapped.
3581 lpfc_scsi_unprep_dma_buf(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
3589 if (psb->seg_cnt > 0)
3590 scsi_dma_unmap(psb->pCmd);
3591 if (psb->prot_seg_cnt > 0)
3592 dma_unmap_sg(&phba->pcidev->dev, scsi_prot_sglist(psb->pCmd),
3593 scsi_prot_sg_count(psb->pCmd),
3594 psb->pCmd->sc_data_direction);