Lines Matching refs:cmnd

90 lpfc_debug_save_data(struct lpfc_hba *phba, struct scsi_cmnd *cmnd)  in lpfc_debug_save_data()  argument
93 struct scatterlist *sgde = scsi_sglist(cmnd); in lpfc_debug_save_data()
119 lpfc_debug_save_dif(struct lpfc_hba *phba, struct scsi_cmnd *cmnd) in lpfc_debug_save_dif() argument
122 struct scatterlist *sgde = scsi_prot_sglist(cmnd); in lpfc_debug_save_dif()
3070 (cmd->cmnd[7] << 8 | cmd->cmnd[8])); in lpfc_parse_bg_err()
3078 (cmd->cmnd[7] << 8 | cmd->cmnd[8])); in lpfc_parse_bg_err()
3091 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3103 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3121 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3138 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3155 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3199 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3558 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event() local
3571 if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || in lpfc_send_scsi_error_event()
3572 (cmnd->result == SAM_STAT_BUSY)) { in lpfc_send_scsi_error_event()
3579 (cmnd->result == SAM_STAT_TASK_SET_FULL) ? in lpfc_send_scsi_error_event()
3581 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3587 ((cmnd->cmnd[0] == READ_10) || (cmnd->cmnd[0] == WRITE_10))) { in lpfc_send_scsi_error_event()
3596 cmnd->device->lun; in lpfc_send_scsi_error_event()
3602 cmnd->sense_buffer[2] & 0xf; in lpfc_send_scsi_error_event()
3603 fast_path_evt->un.check_cond_evt.asc = cmnd->sense_buffer[12]; in lpfc_send_scsi_error_event()
3604 fast_path_evt->un.check_cond_evt.ascq = cmnd->sense_buffer[13]; in lpfc_send_scsi_error_event()
3605 } else if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && in lpfc_send_scsi_error_event()
3625 fast_path_evt->un.read_check_error.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3626 fast_path_evt->un.read_check_error.opcode = cmnd->cmnd[0]; in lpfc_send_scsi_error_event()
3679 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err() local
3707 cmnd->device->id, in lpfc_handle_fcp_err()
3708 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3718 cmnd->device->id, in lpfc_handle_fcp_err()
3719 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3733 memcpy(cmnd->sense_buffer, &fcprsp->rspInfo0 + rsplen, snslen); in lpfc_handle_fcp_err()
3735 lp = (uint32_t *)cmnd->sense_buffer; in lpfc_handle_fcp_err()
3750 cmnd->cmnd[0], scsi_status, in lpfc_handle_fcp_err()
3757 scsi_set_resid(cmnd, 0); in lpfc_handle_fcp_err()
3759 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); in lpfc_handle_fcp_err()
3765 scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3766 cmnd->underflow); in lpfc_handle_fcp_err()
3773 if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && in lpfc_handle_fcp_err()
3775 (scsi_get_resid(cmnd) != fcpi_parm)) { in lpfc_handle_fcp_err()
3781 scsi_get_resid(cmnd), fcpi_parm, in lpfc_handle_fcp_err()
3782 cmnd->cmnd[0]); in lpfc_handle_fcp_err()
3783 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
3794 (scsi_bufflen(cmnd) - scsi_get_resid(cmnd) in lpfc_handle_fcp_err()
3795 < cmnd->underflow)) { in lpfc_handle_fcp_err()
3800 cmnd->cmnd[0], scsi_bufflen(cmnd), in lpfc_handle_fcp_err()
3801 scsi_get_resid(cmnd), cmnd->underflow); in lpfc_handle_fcp_err()
3807 "Data: x%x x%x\n", cmnd->cmnd[0], in lpfc_handle_fcp_err()
3808 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in lpfc_handle_fcp_err()
3815 } else if (fcpi_parm && (cmnd->sc_data_direction == DMA_FROM_DEVICE)) { in lpfc_handle_fcp_err()
3821 fcpi_parm, cmnd->cmnd[0], scsi_status); in lpfc_handle_fcp_err()
3833 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
3837 cmnd->result = ScsiResult(host_status, scsi_status); in lpfc_handle_fcp_err()
3856 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_sli4_scmd_to_wqidx_distr() local
3862 if (shost_use_blk_mq(cmnd->device->host)) { in lpfc_sli4_scmd_to_wqidx_distr()
3863 tag = blk_mq_unique_tag(cmnd->request); in lpfc_sli4_scmd_to_wqidx_distr()
3973 cmd->cmnd[0], in lpfc_scsi_cmd_iocb_cmpl()
4098 ((cmd->cmnd[0] == READ_10) || in lpfc_scsi_cmd_iocb_cmpl()
4099 (cmd->cmnd[0] == WRITE_10))) in lpfc_scsi_cmd_iocb_cmpl()
4212 memcpy(ptr, scsi_cmnd->cmnd, scsi_cmnd->cmd_len); in lpfc_scsi_prep_cmnd()
4528 lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_queuecommand() argument
4535 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in lpfc_queuecommand()
4538 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_queuecommand()
4541 cmnd->result = err; in lpfc_queuecommand()
4546 if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && in lpfc_queuecommand()
4553 cmnd->cmnd[0], scsi_get_prot_op(cmnd), in lpfc_queuecommand()
4554 dif_op_str[scsi_get_prot_op(cmnd)]); in lpfc_queuecommand()
4581 lpfc_cmd->pCmd = cmnd; in lpfc_queuecommand()
4585 cmnd->host_scribble = (unsigned char *)lpfc_cmd; in lpfc_queuecommand()
4587 if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { in lpfc_queuecommand()
4593 dif_op_str[scsi_get_prot_op(cmnd)], in lpfc_queuecommand()
4594 cmnd->cmnd[0], in lpfc_queuecommand()
4595 (unsigned long long)scsi_get_lba(cmnd), in lpfc_queuecommand()
4596 blk_rq_sectors(cmnd->request), in lpfc_queuecommand()
4597 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
4606 cmnd->cmnd[0], in lpfc_queuecommand()
4607 (unsigned long long)scsi_get_lba(cmnd), in lpfc_queuecommand()
4608 blk_rq_sectors(cmnd->request), in lpfc_queuecommand()
4609 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
4629 err, cmnd->cmnd[0], in lpfc_queuecommand()
4630 cmnd->device ? cmnd->device->id : 0xffff, in lpfc_queuecommand()
4631 cmnd->device ? cmnd->device->lun : (u64) -1, in lpfc_queuecommand()
4639 (cmnd->request->timeout / 1000)); in lpfc_queuecommand()
4664 cmnd->scsi_done(cmnd); in lpfc_queuecommand()
4680 lpfc_abort_handler(struct scsi_cmnd *cmnd) in lpfc_abort_handler() argument
4682 struct Scsi_Host *shost = cmnd->device->host; in lpfc_abort_handler()
4695 status = fc_block_scsi_eh(cmnd); in lpfc_abort_handler()
4709 lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; in lpfc_abort_handler()
4715 SUCCESS, cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
4734 if (lpfc_cmd->pCmd != cmnd) { in lpfc_abort_handler()
4821 (lpfc_cmd->pCmd != cmnd), in lpfc_abort_handler()
4828 if (lpfc_cmd->pCmd == cmnd) { in lpfc_abort_handler()
4835 cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
4844 "LUN %llu\n", ret, cmnd->device->id, in lpfc_abort_handler()
4845 cmnd->device->lun); in lpfc_abort_handler()
5049 lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd) in lpfc_chk_tgt_mapped() argument
5055 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
5073 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
5142 lpfc_device_reset_handler(struct scsi_cmnd *cmnd) in lpfc_device_reset_handler() argument
5144 struct Scsi_Host *shost = cmnd->device->host; in lpfc_device_reset_handler()
5148 unsigned tgt_id = cmnd->device->id; in lpfc_device_reset_handler()
5149 uint64_t lun_id = cmnd->device->lun; in lpfc_device_reset_handler()
5153 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_device_reset_handler()
5161 status = fc_block_scsi_eh(cmnd); in lpfc_device_reset_handler()
5165 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_device_reset_handler()
5213 lpfc_target_reset_handler(struct scsi_cmnd *cmnd) in lpfc_target_reset_handler() argument
5215 struct Scsi_Host *shost = cmnd->device->host; in lpfc_target_reset_handler()
5219 unsigned tgt_id = cmnd->device->id; in lpfc_target_reset_handler()
5220 uint64_t lun_id = cmnd->device->lun; in lpfc_target_reset_handler()
5224 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_target_reset_handler()
5231 status = fc_block_scsi_eh(cmnd); in lpfc_target_reset_handler()
5235 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_target_reset_handler()
5290 lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) in lpfc_bus_reset_handler() argument
5292 struct Scsi_Host *shost = cmnd->device->host; in lpfc_bus_reset_handler()
5308 status = fc_block_scsi_eh(cmnd); in lpfc_bus_reset_handler()
5381 lpfc_host_reset_handler(struct scsi_cmnd *cmnd) in lpfc_host_reset_handler() argument
5383 struct Scsi_Host *shost = cmnd->device->host; in lpfc_host_reset_handler()