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()
741 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf() argument
743 return phba->lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_get_scsi_buf()
2909 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2921 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2939 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2956 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2973 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3017 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3485 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_send_scsi_error_event() local
3498 if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || in lpfc_send_scsi_error_event()
3499 (cmnd->result == SAM_STAT_BUSY)) { in lpfc_send_scsi_error_event()
3506 (cmnd->result == SAM_STAT_TASK_SET_FULL) ? in lpfc_send_scsi_error_event()
3508 fast_path_evt->un.scsi_evt.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3514 ((cmnd->cmnd[0] == READ_10) || (cmnd->cmnd[0] == WRITE_10))) { in lpfc_send_scsi_error_event()
3523 cmnd->device->lun; in lpfc_send_scsi_error_event()
3529 cmnd->sense_buffer[2] & 0xf; in lpfc_send_scsi_error_event()
3530 fast_path_evt->un.check_cond_evt.asc = cmnd->sense_buffer[12]; in lpfc_send_scsi_error_event()
3531 fast_path_evt->un.check_cond_evt.ascq = cmnd->sense_buffer[13]; in lpfc_send_scsi_error_event()
3532 } else if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && in lpfc_send_scsi_error_event()
3552 fast_path_evt->un.read_check_error.lun = cmnd->device->lun; in lpfc_send_scsi_error_event()
3553 fast_path_evt->un.read_check_error.opcode = cmnd->cmnd[0]; in lpfc_send_scsi_error_event()
3607 struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; in lpfc_handle_fcp_err() local
3636 cmnd->device->id, in lpfc_handle_fcp_err()
3637 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3647 cmnd->device->id, in lpfc_handle_fcp_err()
3648 cmnd->device->lun, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3662 memcpy(cmnd->sense_buffer, &fcprsp->rspInfo0 + rsplen, snslen); in lpfc_handle_fcp_err()
3664 lp = (uint32_t *)cmnd->sense_buffer; in lpfc_handle_fcp_err()
3679 cmnd->cmnd[0], scsi_status, in lpfc_handle_fcp_err()
3686 scsi_set_resid(cmnd, 0); in lpfc_handle_fcp_err()
3689 scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); in lpfc_handle_fcp_err()
3695 scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0], in lpfc_handle_fcp_err()
3696 cmnd->underflow); in lpfc_handle_fcp_err()
3703 if (fcpi_parm && (scsi_get_resid(cmnd) != fcpi_parm)) { in lpfc_handle_fcp_err()
3709 scsi_get_resid(cmnd), fcpi_parm, in lpfc_handle_fcp_err()
3710 cmnd->cmnd[0]); in lpfc_handle_fcp_err()
3711 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
3722 (scsi_bufflen(cmnd) - scsi_get_resid(cmnd) in lpfc_handle_fcp_err()
3723 < cmnd->underflow)) { in lpfc_handle_fcp_err()
3728 cmnd->cmnd[0], scsi_bufflen(cmnd), in lpfc_handle_fcp_err()
3729 scsi_get_resid(cmnd), cmnd->underflow); in lpfc_handle_fcp_err()
3735 "Data: x%x x%x\n", cmnd->cmnd[0], in lpfc_handle_fcp_err()
3736 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in lpfc_handle_fcp_err()
3747 ((cmnd->sc_data_direction == DMA_FROM_DEVICE) ? in lpfc_handle_fcp_err()
3753 fcpi_parm, cmnd->cmnd[0], scsi_status); in lpfc_handle_fcp_err()
3773 scsi_set_resid(cmnd, scsi_bufflen(cmnd)); in lpfc_handle_fcp_err()
3777 cmnd->result = host_status << 16 | scsi_status; in lpfc_handle_fcp_err()
3890 cmd->cmnd[0], in lpfc_scsi_cmd_iocb_cmpl()
4015 ((cmd->cmnd[0] == READ_10) || in lpfc_scsi_cmd_iocb_cmpl()
4016 (cmd->cmnd[0] == WRITE_10))) in lpfc_scsi_cmd_iocb_cmpl()
4099 memcpy(ptr, scsi_cmnd->cmnd, scsi_cmnd->cmd_len); in lpfc_scsi_prep_cmnd()
4492 lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_queuecommand() argument
4499 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in lpfc_queuecommand()
4505 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_queuecommand()
4513 cmnd->result = err; in lpfc_queuecommand()
4518 if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && in lpfc_queuecommand()
4525 cmnd->cmnd[0], scsi_get_prot_op(cmnd), in lpfc_queuecommand()
4526 dif_op_str[scsi_get_prot_op(cmnd)]); in lpfc_queuecommand()
4567 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_queuecommand()
4581 lpfc_cmd->pCmd = cmnd; in lpfc_queuecommand()
4584 cmnd->host_scribble = (unsigned char *)lpfc_cmd; in lpfc_queuecommand()
4586 if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) { in lpfc_queuecommand()
4592 dif_op_str[scsi_get_prot_op(cmnd)], in lpfc_queuecommand()
4593 cmnd->cmnd[0], in lpfc_queuecommand()
4594 (unsigned long long)scsi_get_lba(cmnd), in lpfc_queuecommand()
4595 blk_rq_sectors(cmnd->request), in lpfc_queuecommand()
4596 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
4605 cmnd->cmnd[0], in lpfc_queuecommand()
4606 (unsigned long long)scsi_get_lba(cmnd), in lpfc_queuecommand()
4607 blk_rq_sectors(cmnd->request), in lpfc_queuecommand()
4608 (cmnd->cmnd[1]>>5)); in lpfc_queuecommand()
4614 cmnd->result = DID_ERROR << 16; in lpfc_queuecommand()
4640 err, cmnd->cmnd[0], in lpfc_queuecommand()
4641 cmnd->device ? cmnd->device->id : 0xffff, in lpfc_queuecommand()
4642 cmnd->device ? cmnd->device->lun : (u64) -1, in lpfc_queuecommand()
4650 (cmnd->request->timeout / 1000)); in lpfc_queuecommand()
4693 cmnd->scsi_done(cmnd); in lpfc_queuecommand()
4709 lpfc_abort_handler(struct scsi_cmnd *cmnd) in lpfc_abort_handler() argument
4711 struct Scsi_Host *shost = cmnd->device->host; in lpfc_abort_handler()
4724 status = fc_block_scsi_eh(cmnd); in lpfc_abort_handler()
4728 lpfc_cmd = (struct lpfc_io_buf *)cmnd->host_scribble; in lpfc_abort_handler()
4749 SUCCESS, cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
4776 if (lpfc_cmd->pCmd != cmnd) { in lpfc_abort_handler()
4868 (lpfc_cmd->pCmd != cmnd), in lpfc_abort_handler()
4873 if (lpfc_cmd->pCmd == cmnd) { in lpfc_abort_handler()
4880 cmnd->device->id, cmnd->device->lun); in lpfc_abort_handler()
4898 "LUN %llu\n", ret, cmnd->device->id, in lpfc_abort_handler()
4899 cmnd->device->lun); in lpfc_abort_handler()
5014 lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd, in lpfc_send_taskmgmt() argument
5027 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_send_taskmgmt()
5037 lpfc_cmd->pCmd = cmnd; in lpfc_send_taskmgmt()
5113 lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct scsi_cmnd *cmnd) in lpfc_chk_tgt_mapped() argument
5119 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
5137 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_chk_tgt_mapped()
5206 lpfc_device_reset_handler(struct scsi_cmnd *cmnd) in lpfc_device_reset_handler() argument
5208 struct Scsi_Host *shost = cmnd->device->host; in lpfc_device_reset_handler()
5212 unsigned tgt_id = cmnd->device->id; in lpfc_device_reset_handler()
5213 uint64_t lun_id = cmnd->device->lun; in lpfc_device_reset_handler()
5217 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_device_reset_handler()
5225 status = fc_block_scsi_eh(cmnd); in lpfc_device_reset_handler()
5229 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_device_reset_handler()
5245 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, in lpfc_device_reset_handler()
5277 lpfc_target_reset_handler(struct scsi_cmnd *cmnd) in lpfc_target_reset_handler() argument
5279 struct Scsi_Host *shost = cmnd->device->host; in lpfc_target_reset_handler()
5283 unsigned tgt_id = cmnd->device->id; in lpfc_target_reset_handler()
5284 uint64_t lun_id = cmnd->device->lun; in lpfc_target_reset_handler()
5288 rdata = lpfc_rport_data_from_scsi_device(cmnd->device); in lpfc_target_reset_handler()
5296 status = fc_block_scsi_eh(cmnd); in lpfc_target_reset_handler()
5300 status = lpfc_chk_tgt_mapped(vport, cmnd); in lpfc_target_reset_handler()
5324 status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, in lpfc_target_reset_handler()
5355 lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) in lpfc_bus_reset_handler() argument
5357 struct Scsi_Host *shost = cmnd->device->host; in lpfc_bus_reset_handler()
5373 status = fc_block_scsi_eh(cmnd); in lpfc_bus_reset_handler()
5404 status = lpfc_send_taskmgmt(vport, cmnd, in lpfc_bus_reset_handler()
5447 lpfc_host_reset_handler(struct scsi_cmnd *cmnd) in lpfc_host_reset_handler() argument
5449 struct Scsi_Host *shost = cmnd->device->host; in lpfc_host_reset_handler()
5979 lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) in lpfc_no_command() argument
5985 lpfc_no_handler(struct scsi_cmnd *cmnd) in lpfc_no_handler() argument