// Copyright 2023 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34#![deny(missing_docs)]5//! This file contains values specified in spec.6//! SPC-3: <https://www.t10.org/cgi-bin/ac.pl?t=f&f=spc3r23.pdf>7//! SAM-5: <https://www.t10.org/cgi-bin/ac.pl?t=f&f=sam5r21.pdf>89// SCSI opcodes10/// Opcode for TEST UNIT READY command.11pub const TEST_UNIT_READY: u8 = 0x00;12/// Opcode for REQUEST SENSE command.13pub const REQUEST_SENSE: u8 = 0x03;14/// Opcode for READ(6) command.15pub const READ_6: u8 = 0x08;16/// Opcode for INQUIRY command.17pub const INQUIRY: u8 = 0x12;18/// Opcode for MODE SELECT(6) command.19pub const MODE_SELECT_6: u8 = 0x15;20/// Opcode for MODE SENSE(6) command.21pub const MODE_SENSE_6: u8 = 0x1a;22/// Opcode for READ CAPACITY(10) command.23pub const READ_CAPACITY_10: u8 = 0x25;24/// Opcode for READ(10) command.25pub const READ_10: u8 = 0x28;26/// Opcode for WRITE(10) command.27pub const WRITE_10: u8 = 0x2a;28/// Opcode for SYNCHRONIZE CACHE(10) command.29pub const SYNCHRONIZE_CACHE_10: u8 = 0x35;30/// Opcode for WRITE SAME(10) command.31pub const WRITE_SAME_10: u8 = 0x41;32/// Opcode for UNMAP command.33pub const UNMAP: u8 = 0x42;34/// Opcode for WRITE SAME(16) command.35pub const WRITE_SAME_16: u8 = 0x93;36/// Opcode for SERVICE ACTION IN(16) command.37pub const SERVICE_ACTION_IN_16: u8 = 0x9e;38/// Opcode for REPORT LUNS command.39pub const REPORT_LUNS: u8 = 0xa0;40/// Opcode for MAINTENANCE IN command.41pub const MAINTENANCE_IN: u8 = 0xa3;4243// The service actions of MAINTENANCE IN command.44/// REPORT SUPPORTED TASK MANAGEMENT FUNCTIONS45pub const REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS: u8 = 0x0d;4647// The service actions of SERVICE ACTION IN(16) command.48/// READ CAPACITY(16)49pub const READ_CAPACITY_16: u8 = 0x10;5051// SAM status code52/// Indicates the completion of the command without error.53pub const GOOD: u8 = 0x00;54/// Indicates that sense data has been delivered in the buffer.55pub const CHECK_CONDITION: u8 = 0x02;5657// Device Types58/// Indicates the id of disk type.59pub const TYPE_DISK: u8 = 0x00;6061// SENSE KEYS62/// Indicates that there is no specific sense data to be reported.63pub const NO_SENSE: u8 = 0x00;64/// Indicates an error that may have been caused by a flaw in the medium or an error in the65/// recorded data.66pub const MEDIUM_ERROR: u8 = 0x03;67/// Indicates an illegal request.68pub const ILLEGAL_REQUEST: u8 = 0x05;69/// Indicates that a unit attention condition has been established.70pub const UNIT_ATTENTION: u8 = 0x06;717273