Lines Matching refs:cmnd

627 		     struct scsi_cmnd *cmnd)  in lpfc_get_scsi_buf_s3()  argument
668 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s4() argument
680 if (cmnd && phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_HDWQ) { in lpfc_get_scsi_buf_s4()
681 tag = blk_mq_unique_tag(scsi_cmd_to_rq(cmnd)); in lpfc_get_scsi_buf_s4()
763 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf() argument
765 return phba->lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_get_scsi_buf()
2987 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_sli4_parse_bg_err()
3002 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_sli4_parse_bg_err()
3017 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_sli4_parse_bg_err()
3061 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_sli4_parse_bg_err()
3099 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3111 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3127 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3142 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3157 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3201 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3744 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event() local
3756 if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || in lpfc_send_scsi_error_event()
3757 (cmnd->result == SAM_STAT_BUSY)) { in lpfc_send_scsi_error_event()
3764 (cmnd->result == SAM_STAT_TASK_SET_FULL) ? in lpfc_send_scsi_error_event()
3766 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3772 ((cmnd->cmnd[0] == READ_10) || (cmnd->cmnd[0] == WRITE_10))) { in lpfc_send_scsi_error_event()
3781 cmnd->device->lun; in lpfc_send_scsi_error_event()
3787 cmnd->sense_buffer[2] & 0xf; in lpfc_send_scsi_error_event()
3788 fast_path_evt->un.check_cond_evt.asc = cmnd->sense_buffer[12]; in lpfc_send_scsi_error_event()
3789 fast_path_evt->un.check_cond_evt.ascq = cmnd->sense_buffer[13]; in lpfc_send_scsi_error_event()
3790 } else if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && in lpfc_send_scsi_error_event()
3810 fast_path_evt->un.read_check_error.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3811 fast_path_evt->un.read_check_error.opcode = cmnd->cmnd[0]; in lpfc_send_scsi_error_event()
4002 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err() local
4030 "x%x\n", cmnd->device->id, in lpfc_handle_fcp_err()
4031 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
4041 cmnd->device->id, in lpfc_handle_fcp_err()
4042 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
4056 memcpy(cmnd->sense_buffer, &fcprsp->rspInfo0 + rsplen, snslen); in lpfc_handle_fcp_err()
4058 lp = (uint32_t *)cmnd->sense_buffer; in lpfc_handle_fcp_err()
4073 cmnd->cmnd[0], scsi_status, in lpfc_handle_fcp_err()
4080 scsi_set_resid(cmnd, 0); in lpfc_handle_fcp_err()
4083 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); in lpfc_handle_fcp_err()
4089 scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0], in lpfc_handle_fcp_err()
4090 cmnd->underflow); in lpfc_handle_fcp_err()
4097 if (fcpi_parm && (scsi_get_resid(cmnd) != fcpi_parm)) { in lpfc_handle_fcp_err()
4103 scsi_get_resid(cmnd), fcpi_parm, in lpfc_handle_fcp_err()
4104 cmnd->cmnd[0]); in lpfc_handle_fcp_err()
4105 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
4116 (scsi_bufflen(cmnd) - scsi_get_resid(cmnd) in lpfc_handle_fcp_err()
4117 < cmnd->underflow)) { in lpfc_handle_fcp_err()
4122 cmnd->cmnd[0], scsi_bufflen(cmnd), in lpfc_handle_fcp_err()
4123 scsi_get_resid(cmnd), cmnd->underflow); in lpfc_handle_fcp_err()
4129 "Data: x%x x%x\n", cmnd->cmnd[0], in lpfc_handle_fcp_err()
4130 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in lpfc_handle_fcp_err()
4141 ((cmnd->sc_data_direction == DMA_FROM_DEVICE) ? in lpfc_handle_fcp_err()
4144 fcpi_parm, cmnd->cmnd[0], scsi_status); in lpfc_handle_fcp_err()
4164 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
4168 cmnd->result = host_status << 16 | scsi_status; in lpfc_handle_fcp_err()
4306 cmd->cmnd[0], in lpfc_fcp_io_cmd_wqe_cmpl()
4359 cmd->cmnd[0], in lpfc_fcp_io_cmd_wqe_cmpl()
4422 cmd->cmnd[0], in lpfc_fcp_io_cmd_wqe_cmpl()
4468 (cmd->cmnd[0] == READ_10 || in lpfc_fcp_io_cmd_wqe_cmpl()
4469 cmd->cmnd[0] == WRITE_10)) in lpfc_fcp_io_cmd_wqe_cmpl()
4624 cmd->cmnd[0], in lpfc_scsi_cmd_iocb_cmpl()
4749 ((cmd->cmnd[0] == READ_10) || in lpfc_scsi_cmd_iocb_cmpl()
4750 (cmd->cmnd[0] == WRITE_10))) in lpfc_scsi_cmd_iocb_cmpl()
5005 memcpy(ptr, scsi_cmnd->cmnd, scsi_cmnd->cmd_len); in lpfc_scsi_prep_cmnd()
5590 lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_queuecommand() argument
5597 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in lpfc_queuecommand()
5603 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_queuecommand()
5611 cmnd->result = err; in lpfc_queuecommand()
5616 if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && in lpfc_queuecommand()
5623 cmnd->cmnd[0], scsi_get_prot_op(cmnd), in lpfc_queuecommand()
5624 dif_op_str[scsi_get_prot_op(cmnd)]); in lpfc_queuecommand()
5637 cmnd->sc_data_direction == DMA_FROM_DEVICE && in lpfc_queuecommand()
5638 (scsi_sg_count(cmnd))) { in lpfc_queuecommand()
5640 err = lpfc_update_cmf_cmd(phba, scsi_bufflen(cmnd)); in lpfc_queuecommand()
5676 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_queuecommand()
5691 lpfc_cmd->pCmd = cmnd; in lpfc_queuecommand()
5695 cmnd->host_scribble = (unsigned char *)lpfc_cmd; in lpfc_queuecommand()
5701 if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { in lpfc_queuecommand()
5707 dif_op_str[scsi_get_prot_op(cmnd)], in lpfc_queuecommand()
5708 cmnd->cmnd[0], in lpfc_queuecommand()
5709 scsi_prot_ref_tag(cmnd), in lpfc_queuecommand()
5710 scsi_logical_block_count(cmnd), in lpfc_queuecommand()
5711 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
5720 cmnd->cmnd[0], in lpfc_queuecommand()
5721 scsi_prot_ref_tag(cmnd), in lpfc_queuecommand()
5722 scsi_logical_block_count(cmnd), in lpfc_queuecommand()
5723 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
5730 cmnd->result = DID_ERROR << 16; in lpfc_queuecommand()
5744 uuid = lpfc_is_command_vm_io(cmnd); in lpfc_queuecommand()
5747 err = lpfc_vmid_get_appid(vport, uuid, cmnd, in lpfc_queuecommand()
5779 err, cmnd->cmnd[0], in lpfc_queuecommand()
5780 cmnd->device ? cmnd->device->id : 0xffff, in lpfc_queuecommand()
5781 cmnd->device ? cmnd->device->lun : (u64)-1, in lpfc_queuecommand()
5793 (uint32_t)(scsi_cmd_to_rq(cmnd)->timeout / 1000)); in lpfc_queuecommand()
5829 lpfc_update_cmf_cmpl(phba, LPFC_CGN_NOT_SENT, scsi_bufflen(cmnd), in lpfc_queuecommand()
5834 lpfc_update_cmf_cmpl(phba, LPFC_CGN_NOT_SENT, scsi_bufflen(cmnd), in lpfc_queuecommand()
5841 lpfc_update_cmf_cmpl(phba, LPFC_CGN_NOT_SENT, scsi_bufflen(cmnd), in lpfc_queuecommand()
5845 scsi_done(cmnd); in lpfc_queuecommand()
5886 lpfc_abort_handler(struct scsi_cmnd *cmnd) in lpfc_abort_handler() argument
5888 struct Scsi_Host *shost = cmnd->device->host; in lpfc_abort_handler()
5900 status = fc_block_scsi_eh(cmnd); in lpfc_abort_handler()
5904 lpfc_cmd = (struct lpfc_io_buf *)cmnd->host_scribble; in lpfc_abort_handler()
5925 SUCCESS, cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
5952 if (lpfc_cmd->pCmd != cmnd) { in lpfc_abort_handler()
6009 (lpfc_cmd->pCmd != cmnd), in lpfc_abort_handler()
6014 if (lpfc_cmd->pCmd == cmnd) { in lpfc_abort_handler()
6021 cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
6039 "LUN %llu\n", ret, cmnd->device->id, in lpfc_abort_handler()
6040 cmnd->device->lun); in lpfc_abort_handler()
6155 lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd, in lpfc_send_taskmgmt() argument
6168 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_send_taskmgmt()
6178 lpfc_cmd->pCmd = cmnd; in lpfc_send_taskmgmt()
6254 lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd) in lpfc_chk_tgt_mapped() argument
6260 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
6278 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
6346 lpfc_device_reset_handler(struct scsi_cmnd *cmnd) in lpfc_device_reset_handler() argument
6348 struct Scsi_Host *shost = cmnd->device->host; in lpfc_device_reset_handler()
6352 unsigned tgt_id = cmnd->device->id; in lpfc_device_reset_handler()
6353 uint64_t lun_id = cmnd->device->lun; in lpfc_device_reset_handler()
6358 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_device_reset_handler()
6366 status = fc_block_scsi_eh(cmnd); in lpfc_device_reset_handler()
6370 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_device_reset_handler()
6386 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, in lpfc_device_reset_handler()
6420 lpfc_target_reset_handler(struct scsi_cmnd *cmnd) in lpfc_target_reset_handler() argument
6422 struct Scsi_Host *shost = cmnd->device->host; in lpfc_target_reset_handler()
6426 unsigned tgt_id = cmnd->device->id; in lpfc_target_reset_handler()
6427 uint64_t lun_id = cmnd->device->lun; in lpfc_target_reset_handler()
6435 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_target_reset_handler()
6443 status = fc_block_scsi_eh(cmnd); in lpfc_target_reset_handler()
6447 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_target_reset_handler()
6471 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, in lpfc_target_reset_handler()
6541 lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) in lpfc_bus_reset_handler() argument
6543 struct Scsi_Host *shost = cmnd->device->host; in lpfc_bus_reset_handler()
6560 status = fc_block_scsi_eh(cmnd); in lpfc_bus_reset_handler()
6590 status = lpfc_send_taskmgmt(vport, cmnd, in lpfc_bus_reset_handler()
6635 lpfc_host_reset_handler(struct scsi_cmnd *cmnd) in lpfc_host_reset_handler() argument
6637 struct Scsi_Host *shost = cmnd->device->host; in lpfc_host_reset_handler()
7178 lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_no_command() argument
7184 lpfc_no_handler(struct scsi_cmnd *cmnd) in lpfc_no_handler() argument