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()
1297 struct lpfc_scsi_buf *lpfc_cmd = NULL; in lpfc_bg_err_inject() local
1357 lpfc_cmd = (struct lpfc_scsi_buf *)sc->host_scribble; in lpfc_bg_err_inject()
1384 if (lpfc_cmd) { in lpfc_bg_err_inject()
1385 lpfc_cmd->prot_data_type = in lpfc_bg_err_inject()
1387 lpfc_cmd->prot_data_segment = in lpfc_bg_err_inject()
1389 lpfc_cmd->prot_data = in lpfc_bg_err_inject()
1504 if (lpfc_cmd) { in lpfc_bg_err_inject()
1505 lpfc_cmd->prot_data_type = in lpfc_bg_err_inject()
1507 lpfc_cmd->prot_data_segment = in lpfc_bg_err_inject()
1509 lpfc_cmd->prot_data = in lpfc_bg_err_inject()
2666 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_adjust_dl() argument
2668 struct scsi_cmnd *sc = lpfc_cmd->pCmd; in lpfc_bg_scsi_adjust_dl()
2706 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_prep_dma_buf_s3() argument
2708 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_bg_scsi_prep_dma_buf_s3()
2709 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_bg_scsi_prep_dma_buf_s3()
2710 struct ulp_bde64 *bpl = lpfc_cmd->fcp_bpl; in lpfc_bg_scsi_prep_dma_buf_s3()
2711 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_bg_scsi_prep_dma_buf_s3()
2735 lpfc_cmd->seg_cnt = datasegcnt; in lpfc_bg_scsi_prep_dma_buf_s3()
2738 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2747 if ((lpfc_cmd->seg_cnt + 2) > phba->cfg_total_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2771 lpfc_cmd->prot_seg_cnt = protsegcnt; in lpfc_bg_scsi_prep_dma_buf_s3()
2777 if ((lpfc_cmd->prot_seg_cnt * 4) > in lpfc_bg_scsi_prep_dma_buf_s3()
2792 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s3()
2812 fcpdl = lpfc_bg_scsi_adjust_dl(phba, lpfc_cmd); in lpfc_bg_scsi_prep_dma_buf_s3()
2823 if (lpfc_cmd->seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2825 if (lpfc_cmd->prot_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s3()
2833 lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, in lpfc_bg_scsi_prep_dma_buf_s3()
2837 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s3()
2838 lpfc_cmd->prot_seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s3()
2877 lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_calc_bg_err() argument
2881 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_calc_bg_err()
2911 protsegcnt = lpfc_cmd->prot_seg_cnt; in lpfc_calc_bg_err()
3063 lpfc_parse_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd, in lpfc_parse_bg_err() argument
3066 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_parse_bg_err()
3211 lpfc_calc_bg_err(phba, lpfc_cmd); in lpfc_parse_bg_err()
3230 lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_scsi_prep_dma_buf_s4() argument
3232 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_dma_buf_s4()
3234 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_dma_buf_s4()
3235 struct sli4_sge *sgl = (struct sli4_sge *)lpfc_cmd->fcp_bpl; in lpfc_scsi_prep_dma_buf_s4()
3237 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_scsi_prep_dma_buf_s4()
3269 lpfc_cmd->seg_cnt = nseg; in lpfc_scsi_prep_dma_buf_s4()
3270 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { in lpfc_scsi_prep_dma_buf_s4()
3275 lpfc_cmd->seg_cnt); in lpfc_scsi_prep_dma_buf_s4()
3276 lpfc_cmd->seg_cnt = 0; in lpfc_scsi_prep_dma_buf_s4()
3346 lpfc_cmd->cur_iocbq.iocb_flag |= (LPFC_IO_OAS | LPFC_IO_FOF); in lpfc_scsi_prep_dma_buf_s4()
3361 struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_prep_dma_buf_s4() argument
3363 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_bg_scsi_prep_dma_buf_s4()
3364 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_bg_scsi_prep_dma_buf_s4()
3365 struct sli4_sge *sgl = (struct sli4_sge *)(lpfc_cmd->fcp_bpl); in lpfc_bg_scsi_prep_dma_buf_s4()
3366 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_bg_scsi_prep_dma_buf_s4()
3396 lpfc_cmd->seg_cnt = datasegcnt; in lpfc_bg_scsi_prep_dma_buf_s4()
3399 if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3407 if ((lpfc_cmd->seg_cnt + 1) > phba->cfg_total_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3432 lpfc_cmd->prot_seg_cnt = protsegcnt; in lpfc_bg_scsi_prep_dma_buf_s4()
3437 if ((lpfc_cmd->prot_seg_cnt * 3) > in lpfc_bg_scsi_prep_dma_buf_s4()
3453 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s4()
3465 lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_STRIP; in lpfc_bg_scsi_prep_dma_buf_s4()
3469 lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_INSERT; in lpfc_bg_scsi_prep_dma_buf_s4()
3473 lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_PASS; in lpfc_bg_scsi_prep_dma_buf_s4()
3477 fcpdl = lpfc_bg_scsi_adjust_dl(phba, lpfc_cmd); in lpfc_bg_scsi_prep_dma_buf_s4()
3492 lpfc_cmd->cur_iocbq.iocb_flag |= (LPFC_IO_OAS | LPFC_IO_FOF); in lpfc_bg_scsi_prep_dma_buf_s4()
3496 if (lpfc_cmd->seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3498 if (lpfc_cmd->prot_seg_cnt) in lpfc_bg_scsi_prep_dma_buf_s4()
3506 lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, in lpfc_bg_scsi_prep_dma_buf_s4()
3510 lpfc_cmd->seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s4()
3511 lpfc_cmd->prot_seg_cnt = 0; in lpfc_bg_scsi_prep_dma_buf_s4()
3528 lpfc_scsi_prep_dma_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_scsi_prep_dma_buf() argument
3530 return phba->lpfc_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_scsi_prep_dma_buf()
3547 lpfc_bg_scsi_prep_dma_buf(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_bg_scsi_prep_dma_buf() argument
3549 return phba->lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_bg_scsi_prep_dma_buf()
3564 struct lpfc_scsi_buf *lpfc_cmd, struct lpfc_iocbq *rsp_iocb) { in lpfc_send_scsi_error_event() argument
3565 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event()
3566 struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; in lpfc_send_scsi_error_event()
3571 struct lpfc_nodelist *pnode = lpfc_cmd->rdata->pnode; in lpfc_send_scsi_error_event()
3683 lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, in lpfc_handle_fcp_err() argument
3686 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err()
3687 struct fcp_cmnd *fcpcmd = lpfc_cmd->fcp_cmnd; in lpfc_handle_fcp_err()
3688 struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; in lpfc_handle_fcp_err()
3845 lpfc_send_scsi_error_event(vport->phba, vport, lpfc_cmd, rsp_iocb); in lpfc_handle_fcp_err()
3862 struct lpfc_scsi_buf *lpfc_cmd = in lpfc_scsi_cmd_iocb_cmpl() local
3865 struct lpfc_rport_data *rdata = lpfc_cmd->rdata; in lpfc_scsi_cmd_iocb_cmpl()
3877 if (!(lpfc_cmd->pCmd)) in lpfc_scsi_cmd_iocb_cmpl()
3879 cmd = lpfc_cmd->pCmd; in lpfc_scsi_cmd_iocb_cmpl()
3882 lpfc_cmd->result = (pIocbOut->iocb.un.ulpWord[4] & IOERR_PARAM_MASK); in lpfc_scsi_cmd_iocb_cmpl()
3883 lpfc_cmd->status = pIocbOut->iocb.ulpStatus; in lpfc_scsi_cmd_iocb_cmpl()
3885 lpfc_cmd->exch_busy = pIocbOut->iocb_flag & LPFC_EXCHANGE_BUSY; in lpfc_scsi_cmd_iocb_cmpl()
3888 if (lpfc_cmd->prot_data_type) { in lpfc_scsi_cmd_iocb_cmpl()
3891 src = (struct scsi_dif_tuple *)lpfc_cmd->prot_data_segment; in lpfc_scsi_cmd_iocb_cmpl()
3896 switch (lpfc_cmd->prot_data_type) { in lpfc_scsi_cmd_iocb_cmpl()
3899 lpfc_cmd->prot_data; in lpfc_scsi_cmd_iocb_cmpl()
3903 (uint16_t)lpfc_cmd->prot_data; in lpfc_scsi_cmd_iocb_cmpl()
3907 (uint16_t)lpfc_cmd->prot_data; in lpfc_scsi_cmd_iocb_cmpl()
3913 lpfc_cmd->prot_data = 0; in lpfc_scsi_cmd_iocb_cmpl()
3914 lpfc_cmd->prot_data_type = 0; in lpfc_scsi_cmd_iocb_cmpl()
3915 lpfc_cmd->prot_data_segment = NULL; in lpfc_scsi_cmd_iocb_cmpl()
3921 if (lpfc_cmd->status) { in lpfc_scsi_cmd_iocb_cmpl()
3922 if (lpfc_cmd->status == IOSTAT_LOCAL_REJECT && in lpfc_scsi_cmd_iocb_cmpl()
3923 (lpfc_cmd->result & IOERR_DRVR_MASK)) in lpfc_scsi_cmd_iocb_cmpl()
3924 lpfc_cmd->status = IOSTAT_DRIVER_REJECT; in lpfc_scsi_cmd_iocb_cmpl()
3925 else if (lpfc_cmd->status >= IOSTAT_CNT) in lpfc_scsi_cmd_iocb_cmpl()
3926 lpfc_cmd->status = IOSTAT_DEFAULT; in lpfc_scsi_cmd_iocb_cmpl()
3927 if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR && in lpfc_scsi_cmd_iocb_cmpl()
3928 !lpfc_cmd->fcp_rsp->rspStatus3 && in lpfc_scsi_cmd_iocb_cmpl()
3929 (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER) && in lpfc_scsi_cmd_iocb_cmpl()
3942 lpfc_cmd->status, lpfc_cmd->result, in lpfc_scsi_cmd_iocb_cmpl()
3946 lpfc_cmd->cur_iocbq.sli4_xritag : 0xffff, in lpfc_scsi_cmd_iocb_cmpl()
3948 lpfc_cmd->cur_iocbq.iocb.ulpIoTag); in lpfc_scsi_cmd_iocb_cmpl()
3950 switch (lpfc_cmd->status) { in lpfc_scsi_cmd_iocb_cmpl()
3953 lpfc_handle_fcp_err(vport, lpfc_cmd, pIocbOut); in lpfc_scsi_cmd_iocb_cmpl()
3964 (lpfc_cmd->status == IOSTAT_NPORT_BSY) ? in lpfc_scsi_cmd_iocb_cmpl()
3985 if (lpfc_cmd->result == IOERR_ELXSEC_KEY_UNWRAP_ERROR || in lpfc_scsi_cmd_iocb_cmpl()
3986 lpfc_cmd->result == in lpfc_scsi_cmd_iocb_cmpl()
3988 lpfc_cmd->result == IOERR_ELXSEC_CRYPTO_ERROR || in lpfc_scsi_cmd_iocb_cmpl()
3989 lpfc_cmd->result == in lpfc_scsi_cmd_iocb_cmpl()
3994 if (lpfc_cmd->result == IOERR_INVALID_RPI || in lpfc_scsi_cmd_iocb_cmpl()
3995 lpfc_cmd->result == IOERR_NO_RESOURCES || in lpfc_scsi_cmd_iocb_cmpl()
3996 lpfc_cmd->result == IOERR_ABORT_REQUESTED || in lpfc_scsi_cmd_iocb_cmpl()
3997 lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) { in lpfc_scsi_cmd_iocb_cmpl()
4001 if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED || in lpfc_scsi_cmd_iocb_cmpl()
4002 lpfc_cmd->result == IOERR_TX_DMA_FAILED) && in lpfc_scsi_cmd_iocb_cmpl()
4009 lpfc_parse_bg_err(phba, lpfc_cmd, in lpfc_scsi_cmd_iocb_cmpl()
4019 if ((lpfc_cmd->status == IOSTAT_REMOTE_STOP) in lpfc_scsi_cmd_iocb_cmpl()
4027 lpfc_cmd->cur_iocbq.sli4_lxritag, in lpfc_scsi_cmd_iocb_cmpl()
4043 if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { in lpfc_scsi_cmd_iocb_cmpl()
4054 lpfc_update_stats(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4057 time_after(jiffies, lpfc_cmd->start_time + in lpfc_scsi_cmd_iocb_cmpl()
4089 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4098 lpfc_cmd->pCmd = NULL; in lpfc_scsi_cmd_iocb_cmpl()
4106 if (lpfc_cmd->waitq) in lpfc_scsi_cmd_iocb_cmpl()
4107 wake_up(lpfc_cmd->waitq); in lpfc_scsi_cmd_iocb_cmpl()
4109 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4114 lpfc_cmd->pCmd = NULL; in lpfc_scsi_cmd_iocb_cmpl()
4122 if (lpfc_cmd->waitq) in lpfc_scsi_cmd_iocb_cmpl()
4123 wake_up(lpfc_cmd->waitq); in lpfc_scsi_cmd_iocb_cmpl()
4126 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_scsi_cmd_iocb_cmpl()
4157 lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, in lpfc_scsi_prep_cmnd() argument
4161 struct scsi_cmnd *scsi_cmnd = lpfc_cmd->pCmd; in lpfc_scsi_prep_cmnd()
4162 struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_cmnd()
4163 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; in lpfc_scsi_prep_cmnd()
4164 struct lpfc_iocbq *piocbq = &(lpfc_cmd->cur_iocbq); in lpfc_scsi_prep_cmnd()
4173 lpfc_cmd->fcp_rsp->rspSnsLen = 0; in lpfc_scsi_prep_cmnd()
4175 lpfc_cmd->fcp_cmnd->fcpCntl2 = 0; in lpfc_scsi_prep_cmnd()
4177 int_to_scsilun(lpfc_cmd->pCmd->device->lun, in lpfc_scsi_prep_cmnd()
4178 &lpfc_cmd->fcp_cmnd->fcp_lun); in lpfc_scsi_prep_cmnd()
4243 piocbq->context1 = lpfc_cmd; in lpfc_scsi_prep_cmnd()
4245 piocbq->iocb.ulpTimeout = lpfc_cmd->timeout; in lpfc_scsi_prep_cmnd()
4265 struct lpfc_scsi_buf *lpfc_cmd, in lpfc_scsi_prep_task_mgmt_cmd() argument
4272 struct lpfc_rport_data *rdata = lpfc_cmd->rdata; in lpfc_scsi_prep_task_mgmt_cmd()
4279 piocbq = &(lpfc_cmd->cur_iocbq); in lpfc_scsi_prep_task_mgmt_cmd()
4284 fcp_cmnd = lpfc_cmd->fcp_cmnd; in lpfc_scsi_prep_task_mgmt_cmd()
4304 if (lpfc_cmd->timeout > 0xff) { in lpfc_scsi_prep_task_mgmt_cmd()
4311 piocb->ulpTimeout = lpfc_cmd->timeout; in lpfc_scsi_prep_task_mgmt_cmd()
4314 lpfc_sli4_set_rsp_sgl_last(vport->phba, lpfc_cmd); in lpfc_scsi_prep_task_mgmt_cmd()
4376 struct lpfc_scsi_buf *lpfc_cmd = in lpfc_tskmgmt_def_cmpl() local
4378 if (lpfc_cmd) in lpfc_tskmgmt_def_cmpl()
4379 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_tskmgmt_def_cmpl()
4503 struct lpfc_scsi_buf *lpfc_cmd; in lpfc_queuecommand() local
4536 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp); in lpfc_queuecommand()
4537 if (lpfc_cmd == NULL) { in lpfc_queuecommand()
4550 lpfc_cmd->pCmd = cmnd; in lpfc_queuecommand()
4551 lpfc_cmd->rdata = rdata; in lpfc_queuecommand()
4552 lpfc_cmd->timeout = 0; in lpfc_queuecommand()
4553 lpfc_cmd->start_time = jiffies; in lpfc_queuecommand()
4554 cmnd->host_scribble = (unsigned char *)lpfc_cmd; in lpfc_queuecommand()
4568 err = lpfc_bg_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4580 err = lpfc_scsi_prep_dma_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4586 lpfc_scsi_prep_cmnd(vport, lpfc_cmd, ndlp); in lpfc_queuecommand()
4590 &lpfc_cmd->cur_iocbq, SLI_IOCB_RET_IOCB); in lpfc_queuecommand()
4603 lpfc_cmd->cur_iocbq.sli4_xritag : 0xffff, in lpfc_queuecommand()
4604 lpfc_cmd->cur_iocbq.iocb.ulpContext, in lpfc_queuecommand()
4605 lpfc_cmd->cur_iocbq.iocb.ulpIoTag, in lpfc_queuecommand()
4606 lpfc_cmd->cur_iocbq.iocb.ulpTimeout, in lpfc_queuecommand()
4624 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4625 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_queuecommand()
4656 struct lpfc_scsi_buf *lpfc_cmd; in lpfc_abort_handler() local
4678 lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; in lpfc_abort_handler()
4679 if (!lpfc_cmd || !lpfc_cmd->pCmd) { in lpfc_abort_handler()
4688 iocb = &lpfc_cmd->cur_iocbq; in lpfc_abort_handler()
4703 if (lpfc_cmd->pCmd != cmnd) { in lpfc_abort_handler()
4710 BUG_ON(iocb->context1 != lpfc_cmd); in lpfc_abort_handler()
4787 lpfc_cmd->waitq = &waitq; in lpfc_abort_handler()
4790 (lpfc_cmd->pCmd != cmnd), in lpfc_abort_handler()
4794 lpfc_cmd->waitq = NULL; in lpfc_abort_handler()
4797 if (lpfc_cmd->pCmd == cmnd) { in lpfc_abort_handler()
4854 lpfc_check_fcp_rsp(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd) in lpfc_check_fcp_rsp() argument
4856 struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; in lpfc_check_fcp_rsp()
4929 struct lpfc_scsi_buf *lpfc_cmd; in lpfc_send_taskmgmt() local
4939 lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode); in lpfc_send_taskmgmt()
4940 if (lpfc_cmd == NULL) in lpfc_send_taskmgmt()
4942 lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo; in lpfc_send_taskmgmt()
4943 lpfc_cmd->rdata = rdata; in lpfc_send_taskmgmt()
4945 status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id, in lpfc_send_taskmgmt()
4948 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_send_taskmgmt()
4952 iocbq = &lpfc_cmd->cur_iocbq; in lpfc_send_taskmgmt()
4955 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_send_taskmgmt()
4968 iocbq, iocbqrsp, lpfc_cmd->timeout); in lpfc_send_taskmgmt()
4983 ret = lpfc_check_fcp_rsp(vport, lpfc_cmd); in lpfc_send_taskmgmt()
4991 lpfc_cmd->status = IOSTAT_DRIVER_REJECT; in lpfc_send_taskmgmt()
4998 lpfc_release_scsi_buf(phba, lpfc_cmd); in lpfc_send_taskmgmt()