Lines Matching refs:vm_srb
270 struct vmscsi_request vm_srb; member
973 static void storvsc_handle_error(struct vmscsi_request *vm_srb, in storvsc_handle_error() argument
982 switch (SRB_STATUS(vm_srb->srb_status)) { in storvsc_handle_error()
991 if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) { in storvsc_handle_error()
1065 wrk->lun = vm_srb->lun; in storvsc_handle_error()
1066 wrk->tgt_id = vm_srb->target_id; in storvsc_handle_error()
1077 struct vmscsi_request *vm_srb; in storvsc_command_completion() local
1086 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_command_completion()
1087 data_transfer_length = vm_srb->data_transfer_length; in storvsc_command_completion()
1089 scmnd->result = vm_srb->scsi_status; in storvsc_command_completion()
1100 if (vm_srb->srb_status != SRB_STATUS_SUCCESS) { in storvsc_command_completion()
1101 storvsc_handle_error(vm_srb, scmnd, host, sense_hdr.asc, in storvsc_command_completion()
1108 if (vm_srb->srb_status != SRB_STATUS_DATA_OVERRUN) in storvsc_command_completion()
1146 if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) || in storvsc_on_io_completion()
1147 (stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) { in storvsc_on_io_completion()
1148 vstor_packet->vm_srb.scsi_status = 0; in storvsc_on_io_completion()
1149 vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS; in storvsc_on_io_completion()
1153 stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; in storvsc_on_io_completion()
1154 stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; in storvsc_on_io_completion()
1160 stor_pkt->vm_srb.sense_info_length = min_t(u8, STORVSC_SENSE_BUFFER_SIZE, in storvsc_on_io_completion()
1161 vstor_packet->vm_srb.sense_info_length); in storvsc_on_io_completion()
1163 if (vstor_packet->vm_srb.scsi_status != 0 || in storvsc_on_io_completion()
1164 vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) { in storvsc_on_io_completion()
1171 int loglevel = (stor_pkt->vm_srb.cdb[0] == TEST_UNIT_READY) ? in storvsc_on_io_completion()
1177 stor_pkt->vm_srb.cdb[0], in storvsc_on_io_completion()
1178 vstor_packet->vm_srb.scsi_status, in storvsc_on_io_completion()
1179 vstor_packet->vm_srb.srb_status, in storvsc_on_io_completion()
1183 if (vstor_packet->vm_srb.scsi_status == SAM_STAT_CHECK_CONDITION && in storvsc_on_io_completion()
1184 (vstor_packet->vm_srb.srb_status & SRB_STATUS_AUTOSENSE_VALID)) in storvsc_on_io_completion()
1186 vstor_packet->vm_srb.sense_data, in storvsc_on_io_completion()
1187 stor_pkt->vm_srb.sense_info_length); in storvsc_on_io_completion()
1189 stor_pkt->vm_srb.data_transfer_length = in storvsc_on_io_completion()
1190 vstor_packet->vm_srb.data_transfer_length; in storvsc_on_io_completion()
1526 vstor_packet->vm_srb.length = sizeof(struct vmscsi_request); in storvsc_do_io()
1529 vstor_packet->vm_srb.sense_info_length = STORVSC_SENSE_BUFFER_SIZE; in storvsc_do_io()
1532 vstor_packet->vm_srb.data_transfer_length = in storvsc_do_io()
1649 vstor_packet->vm_srb.path_id = stor_device->path_id; in storvsc_host_reset_handler()
1716 struct vmscsi_request *vm_srb; in storvsc_queuecommand() local
1740 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_queuecommand()
1741 vm_srb->time_out_value = 60; in storvsc_queuecommand()
1743 vm_srb->srb_flags |= in storvsc_queuecommand()
1747 vm_srb->srb_flags |= in storvsc_queuecommand()
1749 vm_srb->queue_tag = SP_UNTAGGED; in storvsc_queuecommand()
1750 vm_srb->queue_action = SRB_SIMPLE_TAG_REQUEST; in storvsc_queuecommand()
1756 vm_srb->data_in = WRITE_TYPE; in storvsc_queuecommand()
1757 vm_srb->srb_flags |= SRB_FLAGS_DATA_OUT; in storvsc_queuecommand()
1760 vm_srb->data_in = READ_TYPE; in storvsc_queuecommand()
1761 vm_srb->srb_flags |= SRB_FLAGS_DATA_IN; in storvsc_queuecommand()
1764 vm_srb->data_in = UNKNOWN_TYPE; in storvsc_queuecommand()
1765 vm_srb->srb_flags |= SRB_FLAGS_NO_DATA_TRANSFER; in storvsc_queuecommand()
1778 vm_srb->port_number = host_dev->port; in storvsc_queuecommand()
1779 vm_srb->path_id = scmnd->device->channel; in storvsc_queuecommand()
1780 vm_srb->target_id = scmnd->device->id; in storvsc_queuecommand()
1781 vm_srb->lun = scmnd->device->lun; in storvsc_queuecommand()
1783 vm_srb->cdb_length = scmnd->cmd_len; in storvsc_queuecommand()
1785 memcpy(vm_srb->cdb, scmnd->cmnd, vm_srb->cdb_length); in storvsc_queuecommand()