• Home
  • Raw
  • Download

Lines Matching refs:psb

83 lpfc_release_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb);
85 lpfc_release_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb);
387 struct lpfc_scsi_buf *psb; in lpfc_new_scsi_buf_s3() local
406 psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL); in lpfc_new_scsi_buf_s3()
407 if (!psb) in lpfc_new_scsi_buf_s3()
416 psb->data = pci_pool_alloc(phba->lpfc_scsi_dma_buf_pool, in lpfc_new_scsi_buf_s3()
417 GFP_KERNEL, &psb->dma_handle); in lpfc_new_scsi_buf_s3()
418 if (!psb->data) { in lpfc_new_scsi_buf_s3()
419 kfree(psb); in lpfc_new_scsi_buf_s3()
424 memset(psb->data, 0, phba->cfg_sg_dma_buf_size); in lpfc_new_scsi_buf_s3()
427 iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq); in lpfc_new_scsi_buf_s3()
430 psb->data, psb->dma_handle); in lpfc_new_scsi_buf_s3()
431 kfree(psb); in lpfc_new_scsi_buf_s3()
434 psb->cur_iocbq.iocb_flag |= LPFC_IO_FCP; in lpfc_new_scsi_buf_s3()
436 psb->fcp_cmnd = psb->data; in lpfc_new_scsi_buf_s3()
437 psb->fcp_rsp = psb->data + sizeof(struct fcp_cmnd); in lpfc_new_scsi_buf_s3()
438 psb->fcp_bpl = psb->data + sizeof(struct fcp_cmnd) + in lpfc_new_scsi_buf_s3()
442 bpl = psb->fcp_bpl; in lpfc_new_scsi_buf_s3()
443 pdma_phys_fcp_cmd = psb->dma_handle; in lpfc_new_scsi_buf_s3()
444 pdma_phys_fcp_rsp = psb->dma_handle + sizeof(struct fcp_cmnd); in lpfc_new_scsi_buf_s3()
445 pdma_phys_bpl = psb->dma_handle + sizeof(struct fcp_cmnd) + in lpfc_new_scsi_buf_s3()
470 iocb = &psb->cur_iocbq.iocb; in lpfc_new_scsi_buf_s3()
503 psb->status = IOSTAT_SUCCESS; in lpfc_new_scsi_buf_s3()
505 psb->cur_iocbq.context1 = psb; in lpfc_new_scsi_buf_s3()
506 lpfc_release_scsi_buf_s3(phba, psb); in lpfc_new_scsi_buf_s3()
524 struct lpfc_scsi_buf *psb, *next_psb; in lpfc_sli4_vport_delete_fcp_xri_aborted() local
529 list_for_each_entry_safe(psb, next_psb, in lpfc_sli4_vport_delete_fcp_xri_aborted()
531 if (psb->rdata && psb->rdata->pnode in lpfc_sli4_vport_delete_fcp_xri_aborted()
532 && psb->rdata->pnode->vport == vport) in lpfc_sli4_vport_delete_fcp_xri_aborted()
533 psb->rdata = NULL; in lpfc_sli4_vport_delete_fcp_xri_aborted()
553 struct lpfc_scsi_buf *psb, *next_psb; in lpfc_sli4_fcp_xri_aborted() local
563 list_for_each_entry_safe(psb, next_psb, in lpfc_sli4_fcp_xri_aborted()
565 if (psb->cur_iocbq.sli4_xritag == xri) { in lpfc_sli4_fcp_xri_aborted()
566 list_del(&psb->list); in lpfc_sli4_fcp_xri_aborted()
567 psb->exch_busy = 0; in lpfc_sli4_fcp_xri_aborted()
568 psb->status = IOSTAT_SUCCESS; in lpfc_sli4_fcp_xri_aborted()
571 if (psb->rdata && psb->rdata->pnode) in lpfc_sli4_fcp_xri_aborted()
572 ndlp = psb->rdata->pnode; in lpfc_sli4_fcp_xri_aborted()
580 psb->cur_iocbq.sli4_lxritag, rxid, 1); in lpfc_sli4_fcp_xri_aborted()
583 lpfc_release_scsi_buf_s4(phba, psb); in lpfc_sli4_fcp_xri_aborted()
598 psb = container_of(iocbq, struct lpfc_scsi_buf, cur_iocbq); in lpfc_sli4_fcp_xri_aborted()
599 psb->exch_busy = 0; in lpfc_sli4_fcp_xri_aborted()
627 struct lpfc_scsi_buf *psb, *psb_next; in lpfc_sli4_post_scsi_sgl_list() local
643 list_for_each_entry_safe(psb, psb_next, post_sblist, list) { in lpfc_sli4_post_scsi_sgl_list()
644 list_del_init(&psb->list); in lpfc_sli4_post_scsi_sgl_list()
647 (psb->cur_iocbq.sli4_xritag != last_xritag + 1)) { in lpfc_sli4_post_scsi_sgl_list()
652 list_add_tail(&psb->list, &prep_sblist); in lpfc_sli4_post_scsi_sgl_list()
656 list_add_tail(&psb->list, &prep_sblist); in lpfc_sli4_post_scsi_sgl_list()
665 last_xritag = psb->cur_iocbq.sli4_xritag; in lpfc_sli4_post_scsi_sgl_list()
676 pdma_phys_bpl1 = psb->dma_phys_bpl + in lpfc_sli4_post_scsi_sgl_list()
681 psb->dma_phys_bpl, in lpfc_sli4_post_scsi_sgl_list()
683 psb->cur_iocbq.sli4_xritag); in lpfc_sli4_post_scsi_sgl_list()
686 psb->exch_busy = 1; in lpfc_sli4_post_scsi_sgl_list()
689 psb->exch_busy = 0; in lpfc_sli4_post_scsi_sgl_list()
690 psb->status = IOSTAT_SUCCESS; in lpfc_sli4_post_scsi_sgl_list()
694 list_add_tail(&psb->list, &scsi_sblist); in lpfc_sli4_post_scsi_sgl_list()
715 list_remove_head(&blck_sblist, psb, in lpfc_sli4_post_scsi_sgl_list()
719 psb->exch_busy = 1; in lpfc_sli4_post_scsi_sgl_list()
722 psb->exch_busy = 0; in lpfc_sli4_post_scsi_sgl_list()
723 psb->status = IOSTAT_SUCCESS; in lpfc_sli4_post_scsi_sgl_list()
726 list_add_tail(&psb->list, &scsi_sblist); in lpfc_sli4_post_scsi_sgl_list()
731 list_remove_head(&scsi_sblist, psb, in lpfc_sli4_post_scsi_sgl_list()
733 lpfc_release_scsi_buf_s4(phba, psb); in lpfc_sli4_post_scsi_sgl_list()
793 struct lpfc_scsi_buf *psb; in lpfc_new_scsi_buf_s4() local
815 psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL); in lpfc_new_scsi_buf_s4()
816 if (!psb) in lpfc_new_scsi_buf_s4()
824 psb->data = pci_pool_alloc(phba->lpfc_scsi_dma_buf_pool, in lpfc_new_scsi_buf_s4()
825 GFP_KERNEL, &psb->dma_handle); in lpfc_new_scsi_buf_s4()
826 if (!psb->data) { in lpfc_new_scsi_buf_s4()
827 kfree(psb); in lpfc_new_scsi_buf_s4()
830 memset(psb->data, 0, phba->cfg_sg_dma_buf_size); in lpfc_new_scsi_buf_s4()
836 if (phba->cfg_enable_bg && (((unsigned long)(psb->data) & in lpfc_new_scsi_buf_s4()
839 psb->data, psb->dma_handle); in lpfc_new_scsi_buf_s4()
840 kfree(psb); in lpfc_new_scsi_buf_s4()
848 psb->data, psb->dma_handle); in lpfc_new_scsi_buf_s4()
849 kfree(psb); in lpfc_new_scsi_buf_s4()
854 iotag = lpfc_sli_next_iotag(phba, &psb->cur_iocbq); in lpfc_new_scsi_buf_s4()
857 psb->data, psb->dma_handle); in lpfc_new_scsi_buf_s4()
858 kfree(psb); in lpfc_new_scsi_buf_s4()
865 psb->cur_iocbq.sli4_lxritag = lxri; in lpfc_new_scsi_buf_s4()
866 psb->cur_iocbq.sli4_xritag = phba->sli4_hba.xri_ids[lxri]; in lpfc_new_scsi_buf_s4()
867 psb->cur_iocbq.iocb_flag |= LPFC_IO_FCP; in lpfc_new_scsi_buf_s4()
868 psb->fcp_bpl = psb->data; in lpfc_new_scsi_buf_s4()
869 psb->fcp_cmnd = (psb->data + sgl_size); in lpfc_new_scsi_buf_s4()
870 psb->fcp_rsp = (struct fcp_rsp *)((uint8_t *)psb->fcp_cmnd + in lpfc_new_scsi_buf_s4()
874 sgl = (struct sli4_sge *)psb->fcp_bpl; in lpfc_new_scsi_buf_s4()
875 pdma_phys_bpl = psb->dma_handle; in lpfc_new_scsi_buf_s4()
876 pdma_phys_fcp_cmd = (psb->dma_handle + sgl_size); in lpfc_new_scsi_buf_s4()
904 iocb = &psb->cur_iocbq.iocb; in lpfc_new_scsi_buf_s4()
917 psb->cur_iocbq.context1 = psb; in lpfc_new_scsi_buf_s4()
918 psb->dma_phys_bpl = pdma_phys_bpl; in lpfc_new_scsi_buf_s4()
921 list_add_tail(&psb->list, &post_sblist); in lpfc_new_scsi_buf_s4()
1066 lpfc_release_scsi_buf_s3(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb) in lpfc_release_scsi_buf_s3() argument
1070 psb->seg_cnt = 0; in lpfc_release_scsi_buf_s3()
1071 psb->nonsg_phys = 0; in lpfc_release_scsi_buf_s3()
1072 psb->prot_seg_cnt = 0; in lpfc_release_scsi_buf_s3()
1075 psb->pCmd = NULL; in lpfc_release_scsi_buf_s3()
1076 psb->cur_iocbq.iocb_flag = LPFC_IO_FCP; in lpfc_release_scsi_buf_s3()
1077 list_add_tail(&psb->list, &phba->lpfc_scsi_buf_list_put); in lpfc_release_scsi_buf_s3()
1092 lpfc_release_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb) in lpfc_release_scsi_buf_s4() argument
1096 psb->seg_cnt = 0; in lpfc_release_scsi_buf_s4()
1097 psb->nonsg_phys = 0; in lpfc_release_scsi_buf_s4()
1098 psb->prot_seg_cnt = 0; in lpfc_release_scsi_buf_s4()
1100 if (psb->exch_busy) { in lpfc_release_scsi_buf_s4()
1103 psb->pCmd = NULL; in lpfc_release_scsi_buf_s4()
1104 list_add_tail(&psb->list, in lpfc_release_scsi_buf_s4()
1109 psb->pCmd = NULL; in lpfc_release_scsi_buf_s4()
1110 psb->cur_iocbq.iocb_flag = LPFC_IO_FCP; in lpfc_release_scsi_buf_s4()
1112 list_add_tail(&psb->list, &phba->lpfc_scsi_buf_list_put); in lpfc_release_scsi_buf_s4()
1126 lpfc_release_scsi_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb) in lpfc_release_scsi_buf() argument
1129 phba->lpfc_release_scsi_buf(phba, psb); in lpfc_release_scsi_buf()
3667 lpfc_scsi_unprep_dma_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *psb) in lpfc_scsi_unprep_dma_buf() argument
3675 if (psb->seg_cnt > 0) in lpfc_scsi_unprep_dma_buf()
3676 scsi_dma_unmap(psb->pCmd); in lpfc_scsi_unprep_dma_buf()
3677 if (psb->prot_seg_cnt > 0) in lpfc_scsi_unprep_dma_buf()
3678 dma_unmap_sg(&phba->pcidev->dev, scsi_prot_sglist(psb->pCmd), in lpfc_scsi_unprep_dma_buf()
3679 scsi_prot_sg_count(psb->pCmd), in lpfc_scsi_unprep_dma_buf()
3680 psb->pCmd->sc_data_direction); in lpfc_scsi_unprep_dma_buf()