Lines Matching refs:cmd
435 struct scsi_cmnd *cmd; in lpfc_sli4_io_xri_aborted() local
488 cmd = psb->pCmd; in lpfc_sli4_io_xri_aborted()
495 if (cmd) in lpfc_sli4_io_xri_aborted()
496 scsi_done(cmd); in lpfc_sli4_io_xri_aborted()
2685 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_calc_bg_err() local
2702 prot = scsi_get_prot_op(cmd); in lpfc_calc_bg_err()
2714 sgpe = scsi_prot_sglist(cmd); in lpfc_calc_bg_err()
2723 sgde = scsi_sglist(cmd); in lpfc_calc_bg_err()
2724 blksize = scsi_prot_interval(cmd); in lpfc_calc_bg_err()
2731 start_ref_tag = scsi_prot_ref_tag(cmd); in lpfc_calc_bg_err()
2750 if (cmd->prot_flags in lpfc_calc_bg_err()
2817 scsi_build_sense(cmd, 1, ILLEGAL_REQUEST, 0x10, 0x1); in lpfc_calc_bg_err()
2818 set_host_byte(cmd, DID_ABORT); in lpfc_calc_bg_err()
2822 scsi_prot_ref_tag(cmd), in lpfc_calc_bg_err()
2826 scsi_build_sense(cmd, 1, ILLEGAL_REQUEST, 0x10, 0x3); in lpfc_calc_bg_err()
2827 set_host_byte(cmd, DID_ABORT); in lpfc_calc_bg_err()
2832 scsi_prot_ref_tag(cmd), in lpfc_calc_bg_err()
2836 scsi_build_sense(cmd, 1, ILLEGAL_REQUEST, 0x10, 0x2); in lpfc_calc_bg_err()
2837 set_host_byte(cmd, DID_ABORT); in lpfc_calc_bg_err()
2842 scsi_prot_ref_tag(cmd), in lpfc_calc_bg_err()
2863 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; in lpfc_parse_bg_err() local
2914 cmd->result = DID_ERROR << 16; in lpfc_parse_bg_err()
2918 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2919 scsi_prot_ref_tag(cmd), in lpfc_parse_bg_err()
2920 scsi_logical_block_count(cmd), bgstat, bghm); in lpfc_parse_bg_err()
2926 cmd->result = DID_ERROR << 16; in lpfc_parse_bg_err()
2930 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2931 scsi_prot_ref_tag(cmd), in lpfc_parse_bg_err()
2932 scsi_logical_block_count(cmd), bgstat, bghm); in lpfc_parse_bg_err()
2939 scsi_build_sense(cmd, 1, ILLEGAL_REQUEST, 0x10, 0x1); in lpfc_parse_bg_err()
2940 set_host_byte(cmd, DID_ABORT); in lpfc_parse_bg_err()
2945 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2946 scsi_prot_ref_tag(cmd), in lpfc_parse_bg_err()
2947 scsi_logical_block_count(cmd), bgstat, bghm); in lpfc_parse_bg_err()
2952 scsi_build_sense(cmd, 1, ILLEGAL_REQUEST, 0x10, 0x3); in lpfc_parse_bg_err()
2953 set_host_byte(cmd, DID_ABORT); in lpfc_parse_bg_err()
2958 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2959 scsi_prot_ref_tag(cmd), in lpfc_parse_bg_err()
2960 scsi_logical_block_count(cmd), bgstat, bghm); in lpfc_parse_bg_err()
2965 scsi_build_sense(cmd, 1, ILLEGAL_REQUEST, 0x10, 0x2); in lpfc_parse_bg_err()
2966 set_host_byte(cmd, DID_ABORT); in lpfc_parse_bg_err()
2971 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2972 scsi_prot_ref_tag(cmd), in lpfc_parse_bg_err()
2973 scsi_logical_block_count(cmd), bgstat, bghm); in lpfc_parse_bg_err()
2983 cmd->sense_buffer[7] = 0xc; /* Additional sense length */ in lpfc_parse_bg_err()
2984 cmd->sense_buffer[8] = 0; /* Information descriptor type */ in lpfc_parse_bg_err()
2985 cmd->sense_buffer[9] = 0xa; /* Additional descriptor length */ in lpfc_parse_bg_err()
2986 cmd->sense_buffer[10] = 0x80; /* Validity bit */ in lpfc_parse_bg_err()
2989 switch (scsi_get_prot_op(cmd)) { in lpfc_parse_bg_err()
2992 bghm /= cmd->device->sector_size; in lpfc_parse_bg_err()
2998 bghm /= (cmd->device->sector_size + in lpfc_parse_bg_err()
3003 failing_sector = scsi_get_lba(cmd); in lpfc_parse_bg_err()
3007 put_unaligned_be64(failing_sector, &cmd->sense_buffer[12]); in lpfc_parse_bg_err()
3015 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
3016 scsi_prot_ref_tag(cmd), in lpfc_parse_bg_err()
3017 scsi_logical_block_count(cmd), bgstat, bghm); in lpfc_parse_bg_err()
4005 struct scsi_cmnd *cmd; in lpfc_fcp_io_cmd_wqe_cmpl() local
4026 cmd = lpfc_cmd->pCmd; in lpfc_fcp_io_cmd_wqe_cmpl()
4027 if (!cmd) { in lpfc_fcp_io_cmd_wqe_cmpl()
4043 shost = cmd->device->host; in lpfc_fcp_io_cmd_wqe_cmpl()
4099 cmd->cmnd[0], in lpfc_fcp_io_cmd_wqe_cmpl()
4100 cmd->device ? cmd->device->id : 0xffff, in lpfc_fcp_io_cmd_wqe_cmpl()
4101 cmd->device ? cmd->device->lun : 0xffff, in lpfc_fcp_io_cmd_wqe_cmpl()
4112 cmd->result = DID_OK << 16; in lpfc_fcp_io_cmd_wqe_cmpl()
4121 cmd->result = DID_TRANSPORT_DISRUPTED << 16; in lpfc_fcp_io_cmd_wqe_cmpl()
4152 cmd->cmnd[0], in lpfc_fcp_io_cmd_wqe_cmpl()
4153 cmd->device ? cmd->device->id : 0xffff, in lpfc_fcp_io_cmd_wqe_cmpl()
4154 cmd->device ? cmd->device->lun : 0xffff, in lpfc_fcp_io_cmd_wqe_cmpl()
4174 if (scsi_get_prot_op(cmd) != SCSI_PROT_NORMAL) { in lpfc_fcp_io_cmd_wqe_cmpl()
4179 cmd->result = DID_ERROR << 16; in lpfc_fcp_io_cmd_wqe_cmpl()
4203 cmd->result = DID_NO_CONNECT << 16; in lpfc_fcp_io_cmd_wqe_cmpl()
4212 cmd->result = DID_TRANSPORT_DISRUPTED << 16; in lpfc_fcp_io_cmd_wqe_cmpl()
4221 cmd->cmnd[0], in lpfc_fcp_io_cmd_wqe_cmpl()
4222 cmd->device ? cmd->device->id : 0xffff, in lpfc_fcp_io_cmd_wqe_cmpl()
4223 cmd->device ? cmd->device->lun : 0xffff, in lpfc_fcp_io_cmd_wqe_cmpl()
4233 cmd->result = DID_ERROR << 16; in lpfc_fcp_io_cmd_wqe_cmpl()
4243 if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { in lpfc_fcp_io_cmd_wqe_cmpl()
4244 u32 *lp = (u32 *)cmd->sense_buffer; in lpfc_fcp_io_cmd_wqe_cmpl()
4249 cmd->device->id, cmd->device->lun, cmd, in lpfc_fcp_io_cmd_wqe_cmpl()
4250 cmd->result, *lp, *(lp + 3), in lpfc_fcp_io_cmd_wqe_cmpl()
4251 (cmd->device->sector_size) ? in lpfc_fcp_io_cmd_wqe_cmpl()
4252 (u64)scsi_get_lba(cmd) : 0, in lpfc_fcp_io_cmd_wqe_cmpl()
4253 cmd->retries, scsi_get_resid(cmd)); in lpfc_fcp_io_cmd_wqe_cmpl()
4265 (cmd->cmnd[0] == READ_10 || in lpfc_fcp_io_cmd_wqe_cmpl()
4266 cmd->cmnd[0] == WRITE_10)) in lpfc_fcp_io_cmd_wqe_cmpl()
4290 cmd->sc_data_direction == DMA_FROM_DEVICE && in lpfc_fcp_io_cmd_wqe_cmpl()
4291 (scsi_sg_count(cmd))) { in lpfc_fcp_io_cmd_wqe_cmpl()
4294 lpfc_update_cmf_cmpl(phba, lat, scsi_bufflen(cmd), shost); in lpfc_fcp_io_cmd_wqe_cmpl()
4301 scsi_done(cmd); in lpfc_fcp_io_cmd_wqe_cmpl()
4335 struct scsi_cmnd *cmd; in lpfc_scsi_cmd_iocb_cmpl() local
4346 cmd = lpfc_cmd->pCmd; in lpfc_scsi_cmd_iocb_cmpl()
4347 if (!cmd || !phba) { in lpfc_scsi_cmd_iocb_cmpl()
4362 shost = cmd->device->host; in lpfc_scsi_cmd_iocb_cmpl()
4421 cmd->cmnd[0], in lpfc_scsi_cmd_iocb_cmpl()
4422 cmd->device ? cmd->device->id : 0xffff, in lpfc_scsi_cmd_iocb_cmpl()
4423 cmd->device ? cmd->device->lun : 0xffff, in lpfc_scsi_cmd_iocb_cmpl()
4440 cmd->result = DID_TRANSPORT_DISRUPTED << 16; in lpfc_scsi_cmd_iocb_cmpl()
4474 cmd->result = DID_NO_CONNECT << 16; in lpfc_scsi_cmd_iocb_cmpl()
4481 cmd->result = DID_TRANSPORT_DISRUPTED << 16; in lpfc_scsi_cmd_iocb_cmpl()
4487 if (scsi_get_prot_op(cmd) != SCSI_PROT_NORMAL) { in lpfc_scsi_cmd_iocb_cmpl()
4515 cmd->result = DID_ERROR << 16; in lpfc_scsi_cmd_iocb_cmpl()
4520 cmd->result = DID_TRANSPORT_DISRUPTED << 16 | in lpfc_scsi_cmd_iocb_cmpl()
4523 cmd->result = DID_OK << 16; in lpfc_scsi_cmd_iocb_cmpl()
4525 if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { in lpfc_scsi_cmd_iocb_cmpl()
4526 uint32_t *lp = (uint32_t *)cmd->sense_buffer; in lpfc_scsi_cmd_iocb_cmpl()
4531 cmd->device->id, cmd->device->lun, cmd, in lpfc_scsi_cmd_iocb_cmpl()
4532 cmd->result, *lp, *(lp + 3), cmd->retries, in lpfc_scsi_cmd_iocb_cmpl()
4533 scsi_get_resid(cmd)); in lpfc_scsi_cmd_iocb_cmpl()
4545 ((cmd->cmnd[0] == READ_10) || in lpfc_scsi_cmd_iocb_cmpl()
4546 (cmd->cmnd[0] == WRITE_10))) in lpfc_scsi_cmd_iocb_cmpl()
4569 scsi_done(cmd); in lpfc_scsi_cmd_iocb_cmpl()
5184 static char *lpfc_is_command_vm_io(struct scsi_cmnd *cmd) in lpfc_is_command_vm_io() argument
5186 struct bio *bio = scsi_cmd_to_rq(cmd)->bio; in lpfc_is_command_vm_io()