Lines Matching refs:vm_srb

272 		struct vmscsi_request vm_srb;  member
976 static void storvsc_handle_error(struct vmscsi_request *vm_srb, in storvsc_handle_error() argument
985 switch (SRB_STATUS(vm_srb->srb_status)) { in storvsc_handle_error()
994 if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) { in storvsc_handle_error()
1068 wrk->lun = vm_srb->lun; in storvsc_handle_error()
1069 wrk->tgt_id = vm_srb->target_id; in storvsc_handle_error()
1080 struct vmscsi_request *vm_srb; in storvsc_command_completion() local
1089 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_command_completion()
1090 data_transfer_length = vm_srb->data_transfer_length; in storvsc_command_completion()
1092 scmnd->result = vm_srb->scsi_status; in storvsc_command_completion()
1103 if (vm_srb->srb_status != SRB_STATUS_SUCCESS) { in storvsc_command_completion()
1104 storvsc_handle_error(vm_srb, scmnd, host, sense_hdr.asc, in storvsc_command_completion()
1111 if (vm_srb->srb_status != SRB_STATUS_DATA_OVERRUN) in storvsc_command_completion()
1150 if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) || in storvsc_on_io_completion()
1151 (stor_pkt->vm_srb.cdb[0] == MODE_SENSE) || in storvsc_on_io_completion()
1152 (stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN && in storvsc_on_io_completion()
1154 vstor_packet->vm_srb.scsi_status = 0; in storvsc_on_io_completion()
1155 vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS; in storvsc_on_io_completion()
1159 stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; in storvsc_on_io_completion()
1160 stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; in storvsc_on_io_completion()
1166 stor_pkt->vm_srb.sense_info_length = min_t(u8, STORVSC_SENSE_BUFFER_SIZE, in storvsc_on_io_completion()
1167 vstor_packet->vm_srb.sense_info_length); in storvsc_on_io_completion()
1169 if (vstor_packet->vm_srb.scsi_status != 0 || in storvsc_on_io_completion()
1170 vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) { in storvsc_on_io_completion()
1177 int loglevel = (stor_pkt->vm_srb.cdb[0] == TEST_UNIT_READY) ? in storvsc_on_io_completion()
1183 stor_pkt->vm_srb.cdb[0], in storvsc_on_io_completion()
1184 vstor_packet->vm_srb.scsi_status, in storvsc_on_io_completion()
1185 vstor_packet->vm_srb.srb_status, in storvsc_on_io_completion()
1189 if (vstor_packet->vm_srb.scsi_status == SAM_STAT_CHECK_CONDITION && in storvsc_on_io_completion()
1190 (vstor_packet->vm_srb.srb_status & SRB_STATUS_AUTOSENSE_VALID)) in storvsc_on_io_completion()
1192 vstor_packet->vm_srb.sense_data, in storvsc_on_io_completion()
1193 stor_pkt->vm_srb.sense_info_length); in storvsc_on_io_completion()
1195 stor_pkt->vm_srb.data_transfer_length = in storvsc_on_io_completion()
1196 vstor_packet->vm_srb.data_transfer_length; in storvsc_on_io_completion()
1532 vstor_packet->vm_srb.length = sizeof(struct vmscsi_request); in storvsc_do_io()
1535 vstor_packet->vm_srb.sense_info_length = STORVSC_SENSE_BUFFER_SIZE; in storvsc_do_io()
1538 vstor_packet->vm_srb.data_transfer_length = in storvsc_do_io()
1655 vstor_packet->vm_srb.path_id = stor_device->path_id; in storvsc_host_reset_handler()
1722 struct vmscsi_request *vm_srb; in storvsc_queuecommand() local
1746 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_queuecommand()
1747 vm_srb->time_out_value = 60; in storvsc_queuecommand()
1749 vm_srb->srb_flags |= in storvsc_queuecommand()
1753 vm_srb->srb_flags |= in storvsc_queuecommand()
1755 vm_srb->queue_tag = SP_UNTAGGED; in storvsc_queuecommand()
1756 vm_srb->queue_action = SRB_SIMPLE_TAG_REQUEST; in storvsc_queuecommand()
1762 vm_srb->data_in = WRITE_TYPE; in storvsc_queuecommand()
1763 vm_srb->srb_flags |= SRB_FLAGS_DATA_OUT; in storvsc_queuecommand()
1766 vm_srb->data_in = READ_TYPE; in storvsc_queuecommand()
1767 vm_srb->srb_flags |= SRB_FLAGS_DATA_IN; in storvsc_queuecommand()
1770 vm_srb->data_in = UNKNOWN_TYPE; in storvsc_queuecommand()
1771 vm_srb->srb_flags |= SRB_FLAGS_NO_DATA_TRANSFER; in storvsc_queuecommand()
1784 vm_srb->port_number = host_dev->port; in storvsc_queuecommand()
1785 vm_srb->path_id = scmnd->device->channel; in storvsc_queuecommand()
1786 vm_srb->target_id = scmnd->device->id; in storvsc_queuecommand()
1787 vm_srb->lun = scmnd->device->lun; in storvsc_queuecommand()
1789 vm_srb->cdb_length = scmnd->cmd_len; in storvsc_queuecommand()
1791 memcpy(vm_srb->cdb, scmnd->cmnd, vm_srb->cdb_length); in storvsc_queuecommand()