Lines Matching refs:lpfc_cmd
180 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_sli4_set_rsp_sgl_last() argument
182 struct sli4_sge *sgl = (struct sli4_sge *)lpfc_cmd->fcp_bpl; in lpfc_sli4_set_rsp_sgl_last()
200 lpfc_update_stats(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_update_stats() argument
202 struct lpfc_rport_data *rdata = lpfc_cmd->rdata; in lpfc_update_stats()
204 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_update_stats()
214 latency = jiffies_to_msecs((long)jiffies - (long)lpfc_cmd->start_time); in lpfc_update_stats()
972 struct lpfc_scsi_buf * lpfc_cmd = NULL; in lpfc_get_scsi_buf_s3() local
977 list_remove_head(scsi_buf_list_get, lpfc_cmd, struct lpfc_scsi_buf, in lpfc_get_scsi_buf_s3()
979 if (!lpfc_cmd) { in lpfc_get_scsi_buf_s3()
984 list_remove_head(scsi_buf_list_get, lpfc_cmd, in lpfc_get_scsi_buf_s3()
989 return lpfc_cmd; in lpfc_get_scsi_buf_s3()
1005 struct lpfc_scsi_buf *lpfc_cmd, *lpfc_cmd_next; in lpfc_get_scsi_buf_s4() local
1010 list_for_each_entry_safe(lpfc_cmd, lpfc_cmd_next, in lpfc_get_scsi_buf_s4()
1013 lpfc_cmd->cur_iocbq.sli4_lxritag)) in lpfc_get_scsi_buf_s4()
1015 list_del(&lpfc_cmd->list); in lpfc_get_scsi_buf_s4()
1025 list_for_each_entry_safe(lpfc_cmd, lpfc_cmd_next, in lpfc_get_scsi_buf_s4()
1028 phba, ndlp, lpfc_cmd->cur_iocbq.sli4_lxritag)) in lpfc_get_scsi_buf_s4()
1030 list_del(&lpfc_cmd->list); in lpfc_get_scsi_buf_s4()
1038 return lpfc_cmd; in lpfc_get_scsi_buf_s4()
1147 lpfc_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_scsi_prep_dma_buf_s3() argument
1149 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_dma_buf_s3()
1151 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_dma_buf_s3()
1152 struct ulp_bde64 *bpl = lpfc_cmd->fcp_bpl; in lpfc_scsi_prep_dma_buf_s3()
1153 struct lpfc_iocbq *iocbq = &lpfc_cmd->cur_iocbq; in lpfc_scsi_prep_dma_buf_s3()
1154 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_scsi_prep_dma_buf_s3()
1180 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s3()
1181 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { in lpfc_scsi_prep_dma_buf_s3()
1186 lpfc_cmd->seg_cnt); in lpfc_scsi_prep_dma_buf_s3()
1187 lpfc_cmd->seg_cnt = 0; in lpfc_scsi_prep_dma_buf_s3()
1240 physaddr = lpfc_cmd->dma_handle; in lpfc_scsi_prep_dma_buf_s3()
1296 struct lpfc_scsi_buf *lpfc_cmd = NULL; in lpfc_bg_err_inject() local
1355 lpfc_cmd = (struct lpfc_scsi_buf *)sc->host_scribble; in lpfc_bg_err_inject()
1382 if (lpfc_cmd) { in lpfc_bg_err_inject()
1383 lpfc_cmd->prot_data_type = in lpfc_bg_err_inject()
1385 lpfc_cmd->prot_data_segment = in lpfc_bg_err_inject()
1387 lpfc_cmd->prot_data = in lpfc_bg_err_inject()
1502 if (lpfc_cmd) { in lpfc_bg_err_inject()
1503 lpfc_cmd->prot_data_type = in lpfc_bg_err_inject()
1505 lpfc_cmd->prot_data_segment = in lpfc_bg_err_inject()
1507 lpfc_cmd->prot_data = in lpfc_bg_err_inject()
2660 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_adjust_dl() argument
2662 struct scsi_cmnd *sc = lpfc_cmd->pCmd; in lpfc_bg_scsi_adjust_dl()
2700 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_prep_dma_buf_s3() argument
2702 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_bg_scsi_prep_dma_buf_s3()
2703 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_bg_scsi_prep_dma_buf_s3()
2704 struct ulp_bde64 *bpl = lpfc_cmd->fcp_bpl; in lpfc_bg_scsi_prep_dma_buf_s3()
2705 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_bg_scsi_prep_dma_buf_s3()
2729 lpfc_cmd->seg_cnt = datasegcnt; in lpfc_bg_scsi_prep_dma_buf_s3()
2732 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2741 if ((lpfc_cmd->seg_cnt + 2) > phba->cfg_total_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2765 lpfc_cmd->prot_seg_cnt = protsegcnt; in lpfc_bg_scsi_prep_dma_buf_s3()
2771 if ((lpfc_cmd->prot_seg_cnt * 4) > in lpfc_bg_scsi_prep_dma_buf_s3()
2786 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s3()
2806 fcpdl = lpfc_bg_scsi_adjust_dl(phba, lpfc_cmd); in lpfc_bg_scsi_prep_dma_buf_s3()
2817 if (lpfc_cmd->seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2819 if (lpfc_cmd->prot_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2827 lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, in lpfc_bg_scsi_prep_dma_buf_s3()
2831 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s3()
2832 lpfc_cmd->prot_seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s3()
2871 lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_calc_bg_err() argument
2875 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_calc_bg_err()
2905 protsegcnt = lpfc_cmd->prot_seg_cnt; in lpfc_calc_bg_err()
3056 lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd, in lpfc_parse_bg_err() argument
3059 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_parse_bg_err()
3204 lpfc_calc_bg_err(phba, lpfc_cmd); in lpfc_parse_bg_err()
3223 lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_scsi_prep_dma_buf_s4() argument
3225 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_dma_buf_s4()
3227 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_dma_buf_s4()
3228 struct sli4_sge *sgl = (struct sli4_sge *)lpfc_cmd->fcp_bpl; in lpfc_scsi_prep_dma_buf_s4()
3230 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_scsi_prep_dma_buf_s4()
3262 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s4()
3263 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { in lpfc_scsi_prep_dma_buf_s4()
3268 lpfc_cmd->seg_cnt); in lpfc_scsi_prep_dma_buf_s4()
3269 lpfc_cmd->seg_cnt = 0; in lpfc_scsi_prep_dma_buf_s4()
3339 lpfc_cmd->cur_iocbq.iocb_flag |= (LPFC_IO_OAS | LPFC_IO_FOF); in lpfc_scsi_prep_dma_buf_s4()
3354 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_prep_dma_buf_s4() argument
3356 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_bg_scsi_prep_dma_buf_s4()
3357 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_bg_scsi_prep_dma_buf_s4()
3358 struct sli4_sge *sgl = (struct sli4_sge *)(lpfc_cmd->fcp_bpl); in lpfc_bg_scsi_prep_dma_buf_s4()
3359 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_bg_scsi_prep_dma_buf_s4()
3389 lpfc_cmd->seg_cnt = datasegcnt; in lpfc_bg_scsi_prep_dma_buf_s4()
3392 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3400 if ((lpfc_cmd->seg_cnt + 1) > phba->cfg_total_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3425 lpfc_cmd->prot_seg_cnt = protsegcnt; in lpfc_bg_scsi_prep_dma_buf_s4()
3430 if ((lpfc_cmd->prot_seg_cnt * 3) > in lpfc_bg_scsi_prep_dma_buf_s4()
3446 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s4()
3458 lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_STRIP; in lpfc_bg_scsi_prep_dma_buf_s4()
3462 lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_INSERT; in lpfc_bg_scsi_prep_dma_buf_s4()
3466 lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_PASS; in lpfc_bg_scsi_prep_dma_buf_s4()
3470 fcpdl = lpfc_bg_scsi_adjust_dl(phba, lpfc_cmd); in lpfc_bg_scsi_prep_dma_buf_s4()
3485 lpfc_cmd->cur_iocbq.iocb_flag |= (LPFC_IO_OAS | LPFC_IO_FOF); in lpfc_bg_scsi_prep_dma_buf_s4()
3489 if (lpfc_cmd->seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3491 if (lpfc_cmd->prot_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3499 lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, in lpfc_bg_scsi_prep_dma_buf_s4()
3503 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s4()
3504 lpfc_cmd->prot_seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s4()
3521 lpfc_scsi_prep_dma_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_scsi_prep_dma_buf() argument
3523 return phba->lpfc_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_scsi_prep_dma_buf()
3540 lpfc_bg_scsi_prep_dma_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_prep_dma_buf() argument
3542 return phba->lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_bg_scsi_prep_dma_buf()
3557 struct lpfc_scsi_buf *lpfc_cmd, struct lpfc_iocbq *rsp_iocb) { in lpfc_send_scsi_error_event() argument
3558 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event()
3559 struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; in lpfc_send_scsi_error_event()
3564 struct lpfc_nodelist *pnode = lpfc_cmd->rdata->pnode; in lpfc_send_scsi_error_event()
3676 lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, in lpfc_handle_fcp_err() argument
3679 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err()
3680 struct fcp_cmnd *fcpcmd = lpfc_cmd->fcp_cmnd; in lpfc_handle_fcp_err()
3681 struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; in lpfc_handle_fcp_err()
3838 lpfc_send_scsi_error_event(vport->phba, vport, lpfc_cmd, rsp_iocb); in lpfc_handle_fcp_err()
3854 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_sli4_scmd_to_wqidx_distr() argument
3856 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_sli4_scmd_to_wqidx_distr()
3898 struct lpfc_scsi_buf *lpfc_cmd = in lpfc_scsi_cmd_iocb_cmpl() local
3901 struct lpfc_rport_data *rdata = lpfc_cmd->rdata; in lpfc_scsi_cmd_iocb_cmpl()
3911 if (!(lpfc_cmd->pCmd)) in lpfc_scsi_cmd_iocb_cmpl()
3913 cmd = lpfc_cmd->pCmd; in lpfc_scsi_cmd_iocb_cmpl()
3916 lpfc_cmd->result = (pIocbOut->iocb.un.ulpWord[4] & IOERR_PARAM_MASK); in lpfc_scsi_cmd_iocb_cmpl()
3917 lpfc_cmd->status = pIocbOut->iocb.ulpStatus; in lpfc_scsi_cmd_iocb_cmpl()
3919 lpfc_cmd->exch_busy = pIocbOut->iocb_flag & LPFC_EXCHANGE_BUSY; in lpfc_scsi_cmd_iocb_cmpl()
3922 if (lpfc_cmd->prot_data_type) { in lpfc_scsi_cmd_iocb_cmpl()
3925 src = (struct scsi_dif_tuple *)lpfc_cmd->prot_data_segment; in lpfc_scsi_cmd_iocb_cmpl()
3930 switch (lpfc_cmd->prot_data_type) { in lpfc_scsi_cmd_iocb_cmpl()
3933 lpfc_cmd->prot_data; in lpfc_scsi_cmd_iocb_cmpl()
3937 (uint16_t)lpfc_cmd->prot_data; in lpfc_scsi_cmd_iocb_cmpl()
3941 (uint16_t)lpfc_cmd->prot_data; in lpfc_scsi_cmd_iocb_cmpl()
3947 lpfc_cmd->prot_data = 0; in lpfc_scsi_cmd_iocb_cmpl()
3948 lpfc_cmd->prot_data_type = 0; in lpfc_scsi_cmd_iocb_cmpl()
3949 lpfc_cmd->prot_data_segment = NULL; in lpfc_scsi_cmd_iocb_cmpl()
3955 if (lpfc_cmd->status) { in lpfc_scsi_cmd_iocb_cmpl()
3956 if (lpfc_cmd->status == IOSTAT_LOCAL_REJECT && in lpfc_scsi_cmd_iocb_cmpl()
3957 (lpfc_cmd->result & IOERR_DRVR_MASK)) in lpfc_scsi_cmd_iocb_cmpl()
3958 lpfc_cmd->status = IOSTAT_DRIVER_REJECT; in lpfc_scsi_cmd_iocb_cmpl()
3959 else if (lpfc_cmd->status >= IOSTAT_CNT) in lpfc_scsi_cmd_iocb_cmpl()
3960 lpfc_cmd->status = IOSTAT_DEFAULT; in lpfc_scsi_cmd_iocb_cmpl()
3961 if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR && in lpfc_scsi_cmd_iocb_cmpl()
3962 !lpfc_cmd->fcp_rsp->rspStatus3 && in lpfc_scsi_cmd_iocb_cmpl()
3963 (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER) && in lpfc_scsi_cmd_iocb_cmpl()
3976 lpfc_cmd->status, lpfc_cmd->result, in lpfc_scsi_cmd_iocb_cmpl()
3980 lpfc_cmd->cur_iocbq.sli4_xritag : 0xffff, in lpfc_scsi_cmd_iocb_cmpl()
3982 lpfc_cmd->cur_iocbq.iocb.ulpIoTag); in lpfc_scsi_cmd_iocb_cmpl()
3984 switch (lpfc_cmd->status) { in lpfc_scsi_cmd_iocb_cmpl()
3987 lpfc_handle_fcp_err(vport, lpfc_cmd, pIocbOut); in lpfc_scsi_cmd_iocb_cmpl()
3998 (lpfc_cmd->status == IOSTAT_NPORT_BSY) ? in lpfc_scsi_cmd_iocb_cmpl()
4019 if (lpfc_cmd->result == IOERR_ELXSEC_KEY_UNWRAP_ERROR || in lpfc_scsi_cmd_iocb_cmpl()
4020 lpfc_cmd->result == in lpfc_scsi_cmd_iocb_cmpl()
4022 lpfc_cmd->result == IOERR_ELXSEC_CRYPTO_ERROR || in lpfc_scsi_cmd_iocb_cmpl()
4023 lpfc_cmd->result == in lpfc_scsi_cmd_iocb_cmpl()
4028 if (lpfc_cmd->result == IOERR_INVALID_RPI || in lpfc_scsi_cmd_iocb_cmpl()
4029 lpfc_cmd->result == IOERR_NO_RESOURCES || in lpfc_scsi_cmd_iocb_cmpl()
4030 lpfc_cmd->result == IOERR_ABORT_REQUESTED || in lpfc_scsi_cmd_iocb_cmpl()
4031 lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) { in lpfc_scsi_cmd_iocb_cmpl()
4035 if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED || in lpfc_scsi_cmd_iocb_cmpl()
4036 lpfc_cmd->result == IOERR_TX_DMA_FAILED) && in lpfc_scsi_cmd_iocb_cmpl()
4043 lpfc_parse_bg_err(phba, lpfc_cmd, in lpfc_scsi_cmd_iocb_cmpl()
4053 if ((lpfc_cmd->status == IOSTAT_REMOTE_STOP) in lpfc_scsi_cmd_iocb_cmpl()
4061 lpfc_cmd->cur_iocbq.sli4_lxritag, in lpfc_scsi_cmd_iocb_cmpl()
4077 if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { in lpfc_scsi_cmd_iocb_cmpl()
4088 lpfc_update_stats(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4090 time_after(jiffies, lpfc_cmd->start_time + in lpfc_scsi_cmd_iocb_cmpl()
4122 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4129 lpfc_cmd->pCmd = NULL; in lpfc_scsi_cmd_iocb_cmpl()
4137 if (lpfc_cmd->waitq) in lpfc_scsi_cmd_iocb_cmpl()
4138 wake_up(lpfc_cmd->waitq); in lpfc_scsi_cmd_iocb_cmpl()
4140 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4145 lpfc_cmd->pCmd = NULL; in lpfc_scsi_cmd_iocb_cmpl()
4153 if (lpfc_cmd->waitq) in lpfc_scsi_cmd_iocb_cmpl()
4154 wake_up(lpfc_cmd->waitq); in lpfc_scsi_cmd_iocb_cmpl()
4157 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4188 lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, in lpfc_scsi_prep_cmnd() argument
4192 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_cmnd()
4193 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_cmnd()
4194 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_scsi_prep_cmnd()
4195 struct lpfc_iocbq *piocbq = &(lpfc_cmd->cur_iocbq); in lpfc_scsi_prep_cmnd()
4204 lpfc_cmd->fcp_rsp->rspSnsLen = 0; in lpfc_scsi_prep_cmnd()
4206 lpfc_cmd->fcp_cmnd->fcpCntl2 = 0; in lpfc_scsi_prep_cmnd()
4208 int_to_scsilun(lpfc_cmd->pCmd->device->lun, in lpfc_scsi_prep_cmnd()
4209 &lpfc_cmd->fcp_cmnd->fcp_lun); in lpfc_scsi_prep_cmnd()
4274 piocbq->context1 = lpfc_cmd; in lpfc_scsi_prep_cmnd()
4276 piocbq->iocb.ulpTimeout = lpfc_cmd->timeout; in lpfc_scsi_prep_cmnd()
4296 struct lpfc_scsi_buf *lpfc_cmd, in lpfc_scsi_prep_task_mgmt_cmd() argument
4303 struct lpfc_rport_data *rdata = lpfc_cmd->rdata; in lpfc_scsi_prep_task_mgmt_cmd()
4310 piocbq = &(lpfc_cmd->cur_iocbq); in lpfc_scsi_prep_task_mgmt_cmd()
4315 fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_task_mgmt_cmd()
4335 if (lpfc_cmd->timeout > 0xff) { in lpfc_scsi_prep_task_mgmt_cmd()
4342 piocb->ulpTimeout = lpfc_cmd->timeout; in lpfc_scsi_prep_task_mgmt_cmd()
4345 lpfc_sli4_set_rsp_sgl_last(vport->phba, lpfc_cmd); in lpfc_scsi_prep_task_mgmt_cmd()
4407 struct lpfc_scsi_buf *lpfc_cmd = in lpfc_tskmgmt_def_cmpl() local
4409 if (lpfc_cmd) in lpfc_tskmgmt_def_cmpl()
4410 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_tskmgmt_def_cmpl()
4534 struct lpfc_scsi_buf *lpfc_cmd; in lpfc_queuecommand() local
4567 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp); in lpfc_queuecommand()
4568 if (lpfc_cmd == NULL) { in lpfc_queuecommand()
4581 lpfc_cmd->pCmd = cmnd; in lpfc_queuecommand()
4582 lpfc_cmd->rdata = rdata; in lpfc_queuecommand()
4583 lpfc_cmd->timeout = 0; in lpfc_queuecommand()
4584 lpfc_cmd->start_time = jiffies; in lpfc_queuecommand()
4585 cmnd->host_scribble = (unsigned char *)lpfc_cmd; in lpfc_queuecommand()
4599 err = lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4611 err = lpfc_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4617 lpfc_scsi_prep_cmnd(vport, lpfc_cmd, ndlp); in lpfc_queuecommand()
4621 &lpfc_cmd->cur_iocbq, SLI_IOCB_RET_IOCB); in lpfc_queuecommand()
4634 lpfc_cmd->cur_iocbq.sli4_xritag : 0xffff, in lpfc_queuecommand()
4635 lpfc_cmd->cur_iocbq.iocb.ulpContext, in lpfc_queuecommand()
4636 lpfc_cmd->cur_iocbq.iocb.ulpIoTag, in lpfc_queuecommand()
4637 lpfc_cmd->cur_iocbq.iocb.ulpTimeout, in lpfc_queuecommand()
4655 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4656 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4687 struct lpfc_scsi_buf *lpfc_cmd; in lpfc_abort_handler() local
4709 lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; in lpfc_abort_handler()
4710 if (!lpfc_cmd || !lpfc_cmd->pCmd) { in lpfc_abort_handler()
4719 iocb = &lpfc_cmd->cur_iocbq; in lpfc_abort_handler()
4734 if (lpfc_cmd->pCmd != cmnd) { in lpfc_abort_handler()
4741 BUG_ON(iocb->context1 != lpfc_cmd); in lpfc_abort_handler()
4818 lpfc_cmd->waitq = &waitq; in lpfc_abort_handler()
4821 (lpfc_cmd->pCmd != cmnd), in lpfc_abort_handler()
4825 lpfc_cmd->waitq = NULL; in lpfc_abort_handler()
4828 if (lpfc_cmd->pCmd == cmnd) { in lpfc_abort_handler()
4885 lpfc_check_fcp_rsp(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_check_fcp_rsp() argument
4887 struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; in lpfc_check_fcp_rsp()
4960 struct lpfc_scsi_buf *lpfc_cmd; in lpfc_send_taskmgmt() local
4970 lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode); in lpfc_send_taskmgmt()
4971 if (lpfc_cmd == NULL) in lpfc_send_taskmgmt()
4973 lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo; in lpfc_send_taskmgmt()
4974 lpfc_cmd->rdata = rdata; in lpfc_send_taskmgmt()
4976 status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id, in lpfc_send_taskmgmt()
4979 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_send_taskmgmt()
4983 iocbq = &lpfc_cmd->cur_iocbq; in lpfc_send_taskmgmt()
4986 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_send_taskmgmt()
4999 iocbq, iocbqrsp, lpfc_cmd->timeout); in lpfc_send_taskmgmt()
5017 ret = lpfc_check_fcp_rsp(vport, lpfc_cmd); in lpfc_send_taskmgmt()
5031 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_send_taskmgmt()