Lines Matching refs:cmnd
592 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s3() argument
631 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s4() argument
644 if (cmnd && phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_HDWQ) { in lpfc_get_scsi_buf_s4()
645 tag = blk_mq_unique_tag(cmnd->request); in lpfc_get_scsi_buf_s4()
743 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf() argument
745 return phba->lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_get_scsi_buf()
2913 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2925 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2943 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2960 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2977 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3021 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3490 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event() local
3503 if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || in lpfc_send_scsi_error_event()
3504 (cmnd->result == SAM_STAT_BUSY)) { in lpfc_send_scsi_error_event()
3511 (cmnd->result == SAM_STAT_TASK_SET_FULL) ? in lpfc_send_scsi_error_event()
3513 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3519 ((cmnd->cmnd[0] == READ_10) || (cmnd->cmnd[0] == WRITE_10))) { in lpfc_send_scsi_error_event()
3528 cmnd->device->lun; in lpfc_send_scsi_error_event()
3534 cmnd->sense_buffer[2] & 0xf; in lpfc_send_scsi_error_event()
3535 fast_path_evt->un.check_cond_evt.asc = cmnd->sense_buffer[12]; in lpfc_send_scsi_error_event()
3536 fast_path_evt->un.check_cond_evt.ascq = cmnd->sense_buffer[13]; in lpfc_send_scsi_error_event()
3537 } else if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && in lpfc_send_scsi_error_event()
3557 fast_path_evt->un.read_check_error.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3558 fast_path_evt->un.read_check_error.opcode = cmnd->cmnd[0]; in lpfc_send_scsi_error_event()
3612 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err() local
3641 "x%x\n", cmnd->device->id, in lpfc_handle_fcp_err()
3642 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3652 cmnd->device->id, in lpfc_handle_fcp_err()
3653 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3667 memcpy(cmnd->sense_buffer, &fcprsp->rspInfo0 + rsplen, snslen); in lpfc_handle_fcp_err()
3669 lp = (uint32_t *)cmnd->sense_buffer; in lpfc_handle_fcp_err()
3684 cmnd->cmnd[0], scsi_status, in lpfc_handle_fcp_err()
3691 scsi_set_resid(cmnd, 0); in lpfc_handle_fcp_err()
3694 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); in lpfc_handle_fcp_err()
3700 scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3701 cmnd->underflow); in lpfc_handle_fcp_err()
3708 if (fcpi_parm && (scsi_get_resid(cmnd) != fcpi_parm)) { in lpfc_handle_fcp_err()
3714 scsi_get_resid(cmnd), fcpi_parm, in lpfc_handle_fcp_err()
3715 cmnd->cmnd[0]); in lpfc_handle_fcp_err()
3716 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
3727 (scsi_bufflen(cmnd) - scsi_get_resid(cmnd) in lpfc_handle_fcp_err()
3728 < cmnd->underflow)) { in lpfc_handle_fcp_err()
3733 cmnd->cmnd[0], scsi_bufflen(cmnd), in lpfc_handle_fcp_err()
3734 scsi_get_resid(cmnd), cmnd->underflow); in lpfc_handle_fcp_err()
3740 "Data: x%x x%x\n", cmnd->cmnd[0], in lpfc_handle_fcp_err()
3741 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in lpfc_handle_fcp_err()
3752 ((cmnd->sc_data_direction == DMA_FROM_DEVICE) ? in lpfc_handle_fcp_err()
3758 fcpi_parm, cmnd->cmnd[0], scsi_status); in lpfc_handle_fcp_err()
3778 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
3782 cmnd->result = host_status << 16 | scsi_status; in lpfc_handle_fcp_err()
3892 cmd->cmnd[0], in lpfc_scsi_cmd_iocb_cmpl()
4017 ((cmd->cmnd[0] == READ_10) || in lpfc_scsi_cmd_iocb_cmpl()
4018 (cmd->cmnd[0] == WRITE_10))) in lpfc_scsi_cmd_iocb_cmpl()
4109 memcpy(ptr, scsi_cmnd->cmnd, scsi_cmnd->cmd_len); in lpfc_scsi_prep_cmnd()
4502 lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_queuecommand() argument
4509 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in lpfc_queuecommand()
4518 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_queuecommand()
4526 cmnd->result = err; in lpfc_queuecommand()
4531 if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && in lpfc_queuecommand()
4538 cmnd->cmnd[0], scsi_get_prot_op(cmnd), in lpfc_queuecommand()
4539 dif_op_str[scsi_get_prot_op(cmnd)]); in lpfc_queuecommand()
4580 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_queuecommand()
4594 lpfc_cmd->pCmd = cmnd; in lpfc_queuecommand()
4597 cmnd->host_scribble = (unsigned char *)lpfc_cmd; in lpfc_queuecommand()
4599 if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { in lpfc_queuecommand()
4605 dif_op_str[scsi_get_prot_op(cmnd)], 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()
4618 cmnd->cmnd[0], in lpfc_queuecommand()
4619 (unsigned long long)scsi_get_lba(cmnd), in lpfc_queuecommand()
4620 blk_rq_sectors(cmnd->request), in lpfc_queuecommand()
4621 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
4628 cmnd->result = DID_ERROR << 16; in lpfc_queuecommand()
4657 err, cmnd->cmnd[0], in lpfc_queuecommand()
4658 cmnd->device ? cmnd->device->id : 0xffff, in lpfc_queuecommand()
4659 cmnd->device ? cmnd->device->lun : (u64) -1, in lpfc_queuecommand()
4667 (cmnd->request->timeout / 1000)); in lpfc_queuecommand()
4710 cmnd->scsi_done(cmnd); in lpfc_queuecommand()
4726 lpfc_abort_handler(struct scsi_cmnd *cmnd) in lpfc_abort_handler() argument
4728 struct Scsi_Host *shost = cmnd->device->host; in lpfc_abort_handler()
4741 status = fc_block_scsi_eh(cmnd); in lpfc_abort_handler()
4745 lpfc_cmd = (struct lpfc_io_buf *)cmnd->host_scribble; in lpfc_abort_handler()
4766 SUCCESS, cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
4793 if (lpfc_cmd->pCmd != cmnd) { in lpfc_abort_handler()
4886 (lpfc_cmd->pCmd != cmnd), in lpfc_abort_handler()
4891 if (lpfc_cmd->pCmd == cmnd) { in lpfc_abort_handler()
4898 cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
4916 "LUN %llu\n", ret, cmnd->device->id, in lpfc_abort_handler()
4917 cmnd->device->lun); in lpfc_abort_handler()
5032 lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd, in lpfc_send_taskmgmt() argument
5045 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_send_taskmgmt()
5055 lpfc_cmd->pCmd = cmnd; in lpfc_send_taskmgmt()
5131 lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd) in lpfc_chk_tgt_mapped() argument
5137 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
5155 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
5224 lpfc_device_reset_handler(struct scsi_cmnd *cmnd) in lpfc_device_reset_handler() argument
5226 struct Scsi_Host *shost = cmnd->device->host; in lpfc_device_reset_handler()
5230 unsigned tgt_id = cmnd->device->id; in lpfc_device_reset_handler()
5231 uint64_t lun_id = cmnd->device->lun; in lpfc_device_reset_handler()
5235 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_device_reset_handler()
5243 status = fc_block_scsi_eh(cmnd); in lpfc_device_reset_handler()
5247 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_device_reset_handler()
5263 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, in lpfc_device_reset_handler()
5295 lpfc_target_reset_handler(struct scsi_cmnd *cmnd) in lpfc_target_reset_handler() argument
5297 struct Scsi_Host *shost = cmnd->device->host; in lpfc_target_reset_handler()
5301 unsigned tgt_id = cmnd->device->id; in lpfc_target_reset_handler()
5302 uint64_t lun_id = cmnd->device->lun; in lpfc_target_reset_handler()
5306 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_target_reset_handler()
5314 status = fc_block_scsi_eh(cmnd); in lpfc_target_reset_handler()
5318 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_target_reset_handler()
5342 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, in lpfc_target_reset_handler()
5373 lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) in lpfc_bus_reset_handler() argument
5375 struct Scsi_Host *shost = cmnd->device->host; in lpfc_bus_reset_handler()
5391 status = fc_block_scsi_eh(cmnd); in lpfc_bus_reset_handler()
5422 status = lpfc_send_taskmgmt(vport, cmnd, in lpfc_bus_reset_handler()
5465 lpfc_host_reset_handler(struct scsi_cmnd *cmnd) in lpfc_host_reset_handler() argument
5467 struct Scsi_Host *shost = cmnd->device->host; in lpfc_host_reset_handler()
5997 lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_no_command() argument
6003 lpfc_no_handler(struct scsi_cmnd *cmnd) in lpfc_no_handler() argument