From ff3d9361d5d214c7d5145c00762438a1e8b32975 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 6 Oct 2015 06:26:16 +0100 Subject: [PATCH] Added SCSI commands. --- DiscImageChef.Devices/ChangeLog | 5 + DiscImageChef.Devices/Enums.cs | 1281 +++++++++++++++++++++++++++++-- 2 files changed, 1220 insertions(+), 66 deletions(-) diff --git a/DiscImageChef.Devices/ChangeLog b/DiscImageChef.Devices/ChangeLog index 9a3276c7..942d03ba 100644 --- a/DiscImageChef.Devices/ChangeLog +++ b/DiscImageChef.Devices/ChangeLog @@ -1,3 +1,8 @@ +2015-10-06 Natalia Portillo + + * Enums.cs: + Added SCSI commands. + 2015-10-05 Natalia Portillo * Enums.cs: diff --git a/DiscImageChef.Devices/Enums.cs b/DiscImageChef.Devices/Enums.cs index d2d55f92..f505fe15 100644 --- a/DiscImageChef.Devices/Enums.cs +++ b/DiscImageChef.Devices/Enums.cs @@ -16,180 +16,180 @@ namespace DiscImageChef.Devices #region SASI Class 0 commands /// /// Returns zero status if requested unit is on and ready. - /// SASI 0a + /// SASI rev. 0a /// TestUnitReady = 0x00, /// /// Sets the unit to a specific known state. - /// SASI 0a + /// SASI rev. 0a /// RezeroUnit = 0x01, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// RequestSyndrome = 0x02, /// /// Returns unit sense. - /// SASI 0a + /// SASI rev. 0a /// RequestSense = 0x03, /// /// Formats the entire media. - /// SASI 0a + /// SASI rev. 0a /// FormatUnit = 0x04, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// CheckTrackFormat = 0x05, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// FormatTrack = 0x06, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// FormatBadTrack = 0x06, /// /// Reads a block from the device. - /// SASI 0a + /// SASI rev. 0a /// Read = 0x08, /// - /// SASI 0a + /// SASI rev. 0a /// Unknown /// WriteProtectSector = 0x09, /// /// Writes a block to the device. - /// SASI 0a + /// SASI rev. 0a /// Write = 0x0A, /// /// Moves the device reading mechanism to the specified block. - /// SASI 0a + /// SASI rev. 0a /// Seek = 0x0B, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// VerifyRestore = 0x0D, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// AssignAlternateDiskTrack = 0x0E, /// /// Writes a File Mark on the device. - /// SASI 0c + /// SASI rev. 0c /// WriteFileMark = 0x0F, /// /// Reserves the device for use by the iniator. - /// SASI 0a + /// SASI rev. 0a /// ReserveUnit = 0x12, /// /// Release the device from the reservation. - /// SASI 0a + /// SASI rev. 0a /// ReleaseUnit= 0x13, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// WriteProtectDrive = 0x14, /// /// Writes and verifies blocks to the device. - /// SASI 0c + /// SASI rev. 0c /// WriteVerify = 0x14, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// ReleaseWriteProtect = 0x15, /// /// Verifies blocks. - /// SASI 0c + /// SASI rev. 0c /// Verify = 0x15, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// ReadNoSeek = 0x16, /// /// Gets the number of blocks in device. - /// SASI 0c + /// SASI rev. 0c /// ReadCapacity = 0x16, /// /// Searches data on blocks - /// SASI 0a + /// SASI rev. 0a /// SearchDataEqual = 0x17, /// /// Searches data on blocks using major than or equal comparison - /// SASI 0a + /// SASI rev. 0a /// SearchDataHigh = 0x18, /// /// Searches data on blocks using minor than or equal comparison - /// SASI 0a + /// SASI rev. 0a /// SearchDataLow = 0x19, /// /// Reads analysis data from a device - /// SASI 0a + /// SASI rev. 0a /// ReadDiagnostic = 0x1A, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// VerifyData = 0x1B, /// /// Requests a device to run a diagnostic - /// SASI 0c + /// SASI rev. 0c /// WriteDiagnostic = 0x1B, /// /// Gets information about a device - /// SASI 0c + /// SASI rev. 0c /// Inquiry = 0x1F, #endregion SASI Class 0 commands #region SASI Class 1 commands /// - /// SASI 0a + /// SASI rev. 0a /// Unknown /// Copy = 0x20, /// - /// SASI 0a + /// SASI rev. 0a /// Unknown /// Restore = 0x21, /// - /// SASI 0a + /// SASI rev. 0a /// Unknown /// Backup = 0x22, /// - /// SASI 0a + /// SASI rev. 0a /// Unknown /// SetBlockLimitsOld = 0x26, /// /// Sets write or read limits from a specified block - /// SASI 0c + /// SASI rev. 0c /// SetBlockLimits = 0x28, #endregion SASI Class 1 commands @@ -197,156 +197,1305 @@ namespace DiscImageChef.Devices #region SASI Class 2 commands /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// Load = 0x40, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// Unload = 0x41, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// Rewind = 0x42, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// SpaceForward = 0x43, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// SpaceForwardFileMark = 0x44, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// SpaceReserve = 0x45, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// SpaceReserveFileMark = 0x46, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// TrackSelect = 0x47, /// /// Reads blocks from device - /// SASI 0a + /// SASI rev. 0a /// Read10 = 0x48, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// ReadVerify = 0x49, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// ReadDiagnosticClass2 = 0x4A, /// /// Writes blocks to device - /// SASI 0a + /// SASI rev. 0a /// Write10 = 0x4B, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// WriteFileMarkClass2 = 0x4C, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// WriteExtended = 0x4D, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// WriteExtendedFileMark = 0x4E, /// /// Unknown - /// SASI 0a + /// SASI rev. 0a /// WriteErase = 0x4F, #endregion SASI Class 2 commands #region SASI Class 3 commands /// - /// SASI 0a + /// SASI rev. 0a /// Skip = 0x60, /// - /// SASI 0a + /// SASI rev. 0a /// Space = 0x61, /// - /// SASI 0a + /// SASI rev. 0a /// Return = 0x62, /// - /// SASI 0a + /// SASI rev. 0a /// Tab = 0x63, /// - /// SASI 0a + /// SASI rev. 0a /// ReadControl = 0x64, /// - /// SASI 0a + /// SASI rev. 0a /// Write3 = 0x65, /// - /// SASI 0a + /// SASI rev. 0a /// WriteControl = 0x66, #endregion SASI Class 3 commands #region SASI Class 6 commands /// - /// SASI 0a + /// SASI rev. 0a /// DefineFloppyDiskTracFormat = 0xC0, /// - /// SASI 0a + /// SASI rev. 0a /// FormatDriveErrorMap = 0xC4, /// - /// SASI 0a + /// SASI rev. 0a /// ReadErrorMap = 0xC5, /// - /// SASI 0a + /// SASI rev. 0a /// ReadDriveType = 0xC6, #endregion SASI Class 6 commands #region SASI Class 7 commands /// - /// SASI 0a + /// SASI rev. 0a /// RamDiagnostic = 0xE0, /// - /// SASI 0a + /// SASI rev. 0a /// WriteECC = 0xE1, /// - /// SASI 0a + /// SASI rev. 0a /// ReadID = 0xE2, /// - /// SASI 0a + /// SASI rev. 0a /// DriveDiagnostic = 0xE3 #endregion SASI Class 7 commands } #endregion SASI Commands + + #region SCSI Commands + public enum ScsiCommands : byte + { + #region SCSI Primary Commands (SPC) + /// + /// Commands used to obtain information about the access controls that are active + /// SPC-4 rev. 16 + /// + AccessControlIn = 0x86, + /// + /// Commands used to limit or grant access to LUNs + /// SPC-4 rev. 16 + /// + AccessControlOut = 0x87, + /// + /// Modifies the operating definition of the device with respect to commmands. + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ChangeDefinition = 0x40, + /// + /// Compares data between two devices + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Compare = 0x39, + /// + /// Copies data between two devices + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Copy = 0x18, + /// + /// Copies data between two devices and verifies the copy is correct. + /// SCSI-2 X3T9.2/375R rev. 10l + /// + CopyAndVerify = 0x3A, + /// + /// Copies data between two devices + /// SPC-2 rev. 20 + /// + ExtendedCopy = 0x83, + /// + /// Requests information about the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Inquiry = 0x12, + /// + /// Manages device statistics + /// SCSI-2 X3T9.2/375R rev. 10l + /// + LogSelect = 0x4C, + /// + /// Gets device statistics + /// SCSI-2 X3T9.2/375R rev. 10l + /// + LogSense = 0x4D, + /// + /// Retrieves management protocol information + /// SPC-2 rev. 20 + /// + ManagementProtocolIn = 0xA3, + /// + /// Transfers management protocol information + /// SPC-2 rev. 20 + /// + ManagementProtocolOut = 0xA4, + /// + /// Sets device parameters + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ModeSelect = 0x15, + /// + /// Sets device parameters + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ModeSelect10 = 0x55, + /// + /// Gets device parameters + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ModeSense = 0x1A, + /// + /// Gets device parameters + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ModeSense10 = 0x5A, + /// + /// Obtains information about persistent reservations and reservation keys + /// SPC-1 rev. 10 + /// + PersistentReserveIn = 0x5E, + /// + /// Reserves a LUN or an extent within a LUN for exclusive or shared use + /// SPC-1 rev. 10 + /// + PersistentReserveOut = 0x5F, + /// + /// Requests the device to disable or enable the removal of the medium inside it + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PreventAllowMediumRemoval = 0x1E, + /// + /// Reads attribute values from medium auxiliary memory + /// SPC-3 rev. 21b + /// + ReadAttribute = 0x8C, + /// + /// Reads the device buffer + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadBuffer = 0x3C, + /// + /// Reads the media serial number + /// SPC-3 rev. 21b + /// + ReadSerialNumber = 0xAB, + /// + /// Receives information about a previous or current + /// SPC-2 rev. 20 + /// + ReceiveCopyResults = 0x84, + /// + /// Requests the data after completion of a + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReceiveDiagnostic = 0x1C, + /// + /// Releases a previously reserved LUN or extents + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Release = 0x17, + /// + /// Releases a previously reserved LUN or extents + /// SPC-1 rev. 10 + /// + Release10 = 0x57, + /// + /// Requests the LUNs that are present on the device + /// SPC-1 rev. 10 + /// + ReportLuns = 0xA0, + /// + /// Requests the device's sense + /// SCSI-2 X3T9.2/375R rev. 10l + /// + RequestSense = 0x03, + /// + /// Reserves a LUN or extent + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Reserve = 0x16, + /// + /// Reserves a LUN or extent + /// SPC-1 rev. 10 + /// + Reserve10 = 0x56, + /// + /// Retrieves security protocol information + /// SPC-4 rev. 16 + /// + SecurityProtocolIn = 0xA2, + /// + /// Transfers security protocol information + /// SPC-4 rev. 16 + /// + SecurityProtocolOut = 0xB5, + /// + /// Requests the device to perform diagnostics + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SendDiagnostic = 0x1D, + /// + /// Extended commands + /// SPC-4 + /// + ServiceActionIn = 0x9E, + /// + /// Extended commands + /// SPC-4 + /// + ServiceActionOut = 0x9F, + /// + /// Checks if a LUN is ready to access its medium + /// SCSI-2 X3T9.2/375R rev. 10l + /// + TestUnitReady = 0x00, + /// + /// Writes attribute values to medium auxiliary memory + /// SPC-3 rev. 21b + /// + WriteAttribute = 0x8C, + /// + /// Writes to the device's buffer + /// SCSI-2 X3T9.2/375R rev. 10l + /// + WriteBuffer = 0x3B, + #endregion SCSI Primary Commands (SPC) + + #region SCSI Block Commands (SBC) + /// + /// Compares blocks with sent data, and if equal, writes those block to device, atomically + /// SBC-3 rev. 25 + /// + CompareAndWrite = 0x89, + /// + /// Formats the medium into addressable logical blocks + /// SCSI-2 X3T9.2/375R rev. 10l + /// + FormatUnit = 0x04, + /// + /// Locks blocks from eviction of device's cache + /// SCSI-2 X3T9.2/375R rev. 10l + /// + LockUnlockCache = 0x36, + /// + /// Locks blocks from eviction of device's cache + /// SBC-2 rev. 4 + /// + LockUnlockCache16 = 0x92, + /// + /// Requests the device to perform the following uninterrupted series of actions: + /// 1.- Read the specified blocks + /// 2.- Transfer blocks from the data out buffer + /// 3.- Perform an OR operation between the read blocks and the buffer + /// 4.- Write the buffer to the blocks + /// SBC-3 rev. 16 + /// + ORWrite = 0x8B, + /// + /// Transfers requested blocks to devices' cache + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PreFetch = 0x34, + /// + /// Transfers requested blocks to devices' cache + /// SBC-3 rev. 16 + /// + PreFetch16 = 0x90, + /// + /// Reads blocks from device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Read = 0x08, + /// + /// Reads blocks from device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Read10 = 0x28, + /// + /// Reads blocks from device + /// SBC-2 rev. 4 + /// + Read16 = 0x88, + /// + /// Gets device capacity + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadCapacity = 0x25, + /// + /// Gets device's defect data + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadDefectData = 0x37, + /// + /// Reads blocks from device in a vendor-specific way that should include the ECC alongside the data + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadLong = 0x3E, + /// + /// Requests the device to reassign the defective blocks to another area of the medium + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReassignBlocks = 0x07, + /// + /// Requests the target write to the medium the XOR data generated from the specified source devices + /// SBC-1 rev. 8c + /// + Rebuild = 0x81, + /// + /// Requests the target write to the buffer the XOR data from its own medium and the specified source devices + /// SBC-1 rev. 8c + /// + Regenerate = 0x82, + /// + /// Requests the device to set the LUN in a vendor specific state + /// SCSI-2 X3T9.2/375R rev. 10l + /// + RezeroUnit = 0x01, + /// + /// Searches data on blocks + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SearchDataEqual = 0x31, + /// + /// Searches data on blocks using major than or equal comparison + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SearchDataHigh = 0x30, + /// + /// Searches data on blocks using minor than or equal comparison + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SearchDataLow = 0x32, + /// + /// Requests the device to seek to a specified blocks + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Seek = 0x0B, + /// + /// Requests the device to seek to a specified blocks + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Seek10 = 0x2B, + /// + /// Defines the range within which subsequent linked commands may operate + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SetLimits = 0x33, + /// + /// Requests the device to enable or disable the LUN for media access operations + /// SCSI-2 X3T9.2/375R rev. 10l + /// + StartStopUnit = 0x1B, + /// + /// Ensures that the blocks in the cache are written to the medium + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SynchronizeCache = 0x35, + /// + /// Ensures that the blocks in the cache are written to the medium + /// SBC-2 rev. 4 + /// + SynchronizeCache16 = 0x91, + /// + /// Unmaps one or more LBAs + /// In SSDs, this is trimming + /// SBC-3 rev. 25 + /// + Unmap = 0x42, + /// + /// Verifies blocks on the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Verify10 = 0x2F, + /// + /// Verifies blocks on the device + /// SBC-2 rev. 4 + /// + Verify16 = 0x8F, + /// + /// Writes blocks to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Write = 0x0A, + /// + /// Writes blocks to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Write10 = 0x2A, + /// + /// Writes blocks to the device + /// SBC-2 rev. 4 + /// + Write16 = 0x8A, + /// + /// Writes blocks to the device and then verifies them + /// SCSI-2 X3T9.2/375R rev. 10l + /// + WriteAndVerify = 0x2E, + /// + /// Writes blocks to the device and then verifies them + /// SBC-2 rev. 4 + /// + WriteAndVerify16 = 0x8E, + /// + /// Writes blocks to the device with a vendor specified format that shall include the ECC alongside the data + /// SCSI-2 X3T9.2/375R rev. 10l + /// + WriteLong = 0x3F, + /// + /// Writes a single block several times + /// SCSI-2 X3T9.2/375R rev. 10l + /// + WriteSame = 0x41, + /// + /// Writes a single block several times + /// SBC-2 rev. 4 + /// + WriteSame16 = 0x93, + /// + /// Requets XOR data generated by an or command + /// SBC-1 rev. 8c + /// + XDRead = 0x52, + /// + /// XORs the data sent with data on the medium and stores it until an is issued + /// SBC-1 rev. 8c + /// + XDWrite = 0x50, + /// + /// XORs the data sent with data on the medium and stores it until an is issued + /// SBC-1 rev. 8c + /// + XDWrite16 = 0x80, + /// + /// Requets the target to XOR the sent data with the data on the medium and return the results + /// + XDWriteRead = 0x53, + /// + /// Requests the target to XOR the data transferred with the data on the medium and writes it to the medium + /// SBC-1 rev. 8c + /// + XPWrite = 0x51, + #endregion SCSI Block Commands (SBC) + + #region SCSI Streaming Commands (SSC) + /// + /// Prepares the medium for use by the LUN + /// SSC-1 rev. 22 + /// + FormatMedium = 0x04, + /// + /// Erases part of all of the medium from the current position + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Erase = 0x19, + /// + /// Enables or disables the LUN for further operations + /// SCSI-2 X3T9.2/375R rev. 10l + /// + LoadUnload = 0x1B, + /// + /// Positions the LUN to a specified block in a specified partition + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Locate = 0x2B, + /// + /// Positions the LUN to a specified block in a specified partition + /// SSC-2 rev. 09 + /// + Locate16 = 0x92, + /// + /// Requests the block length limits capability + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadBlockLimits = 0x05, + /// + /// Reads the current position + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadPosition = 0x34, + /// + /// Reads blocks from the device, in reverse order + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadReverse = 0x0F, + /// + /// Retrieves data from the device buffer that has not been successfully written to the medium (or printed) + /// SCSI-2 X3T9.2/375R rev. 10l + /// + RecoverBufferedData = 0x14, + /// + /// Requests information regarding the supported densities for the logical unit + /// SSC-1 rev. 22 + /// + ReportDensitySupport = 0x44, + /// + /// Seeks the medium to the beginning of partition in current partition + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Rewind = 0x01, + /// + /// A variety of positioning functions + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Space = 0x11, + /// + /// A variety of positioning functions + /// SSC-2 rev. 09 + /// + Space16 = 0x91, + /// + /// Verifies one or more blocks from the next one + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Verify = 0x13, + /// + /// Writes the specified number of filemarks or setmarks in the current position + /// SCSI-2 X3T9.2/375R rev. 10l + /// + WriteFileMarks=0x10, + #endregion SCSI Streaming Commands (SSC) + + #region SCSI Streaming Commands for Printers (SSC) + /// + /// Specifies forms or fronts + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Format = 0x04, + /// + /// Transfers data to be printed + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Print = 0x0A, + /// + /// Transfers data to be printed with a slew value + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SlewAndPrint = 0x0B, + /// + /// Halts printing + /// SCSI-2 X3T9.2/375R rev. 10l + /// + StopPrint = 0x1B, + /// + /// Assures that the data in the buffer has been printed, or, for other devices, written to media + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SynchronizeBuffer = 0x10, + #endregion SCSI Streaming Commands for Printers (SSC) + + #region SCSI Processor Commands + /// + /// Transfers data from the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Receive = 0x08, + /// + /// Sends data to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Send = 0x0A, + #endregion SCSI Processor Commands + + #region SCSI Multimedia Commands (MMC) + /// + /// Erases any part of a CD-RW + /// MMC-1 rev. 9 + /// + Blank = 0xA1, + /// + /// Closes a track or session + /// MMC-1 rev. 9 + /// + CloseTrackSession = 0x5B, + /// + /// Gets information about the overall capabilities of the device and the current capabilities of the device + /// MMC-2 rev. 11a + /// + GetConfiguration = 0x46, + /// + /// Requests the LUN to report events and statuses + /// MMC-2 rev. 11a + /// + GetEventStatusNotification = 0x4A, + /// + /// Provides a mehotd to profile the performance of the drive + /// MMC-2 rev. 11a + /// + GetPerformance = 0xAC, + /// + /// Requests the device changer to load or unload a disc + /// MMC-1 rev. 9 + /// + LoadUnloadCd = 0xA6, + /// + /// Requests the device changer to load or unload a disc + /// MMC-2 rev. 11a + /// + LoadUnloadMedium = 0xA6, + /// + /// Requests information about the current status of the CD device, including any changer mechanism + /// MMC-1 rev. 9 + /// + MechanicalStatus = 0xBD, + /// + /// Requests the device to start or stop an audio play operation + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PauseResume = 0x4B, + /// + /// Begins an audio playback + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PlayAudio = 0x45, + /// + /// Begins an audio playback + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PlayAudio12 = 0xA5, + /// + /// Begins an audio playback using MSF addressing + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PlayAudioMsf = 0x47, + /// + /// Begins an audio playback from the specified index of the specified track + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PlayAudioTrackIndex = 0x48, + /// + /// Begins an audio playback from the position relative of a track + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PlayTrackRelative = 0x49, + /// + /// Begins an audio playback from the position relative of a track + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PlayTrackRelative12 = 0xA9, + /// + /// Reports the total and blank area of the device buffer + /// MMC-1 rev. 9 + /// + ReadBufferCapacity = 0x5C, + /// + /// Reads a block from a CD with any of the requested CD data streams + /// MMC-1 rev. 9 + /// + ReadCd = 0xBE, + /// + /// Reads a block from a CD with any of the requested CD data streams using MSF addressing + /// MMC-1 rev. 9 + /// + ReadCdMsf = 0xB9, + /// + /// Returns the recorded size of the CD + /// MMC-1 rev. 9 + /// + ReadCdRecordedCapacity = 0x25, + /// + /// Gets informationn about all discs: CD-ROM, CD-R and CD-RW + /// MMC-1 rev. 9 + /// + ReadDiscInformation = 0x51, + /// + /// Reads areas from the DVD or BD media + /// MMC-5 rev. 2c + /// + ReadDiscStructure = 0xAD, + /// + /// Reads areas from the DVD media + /// MMC-2 rev. 11a + /// + ReadDvdStructure = 0xAD, + /// + /// Requests a list of the possible format capacities for an installed random-writable media + /// MMC-2 rev. 11a + /// + ReadFormatCapacities = 0x23, + /// + /// Reads the data block header of the specified CD-ROM block + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadHeader = 0x44, + /// + /// Reads the mastering information from a Master CD. + /// MMC-1 rev. 9 + /// + ReadMasterCue = 0x59, + /// + /// Requests the Q subchannel and the current audio playback status + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadSubChannel = 0x42, + /// + /// Requests the medium TOC, PMA or ATIP from the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadTocPmaAtip = 0x43, + /// + /// Gets information about a track regardless of its status + /// MMC-1 rev. 9 + /// + ReadTrackInformation = 0x52, + /// + /// Repairs an incomplete ECC block at the end of an RZone + /// Mt. Fuji ver. 7 rev. 1.21 + /// + RepairRZone = 0x58, + /// + /// Repairs an incomplete packet at the end of a packet writing track + /// MMC-1 rev. 9 + /// + RepairTrack = 0x58, + /// + /// Requests the start of the authentication process and provides data necessary for authentication and for generating a Bus Key + /// MMC-2 rev. 11a + /// + ReportKey = 0xA4, + /// + /// Reserves disc space for a track + /// MMC-1 rev. 9 + /// + ReserveTrack = 0x53, + /// + /// Fast-forwards or fast-reverses the audio playback to the specified block. Stops if it encounters a data track + /// MMC-1 rev. 9 + /// + ScanMmc = 0xBA, + /// + /// Sends a cue sheet for session-at-once recording + /// MMC-1 rev. 9 + /// + SendCueSheet = 0x5D, + /// + /// Transfer a DVD or BD structure for media writing + /// MMC-5 rev. 2c + /// + SendDiscStructure = 0xAD, + /// + /// Transfer a DVD structure for media writing + /// MMC-2 rev. 11a + /// + SendDvdStructure = 0xAD, + /// + /// Requests the LUN to process an event + /// MMC-2 rev. 11a + /// + SendEvent = 0xA2, + /// + /// Provides data necessary for authentication and for generating a Bus Key + /// MMC-2 rev. 11a + /// + SendKey = 0xA3, + /// + /// Restores the Optimum Power Calibration values to the drive for a specific disc + /// MMC-1 rev. 9 + /// + SendOpcInformation = 0x54, + /// + /// Sets the spindle speed to be used while reading/writing data to a CD + /// MMC-1 rev. 9 + /// + SetCdRomSpeed = 0xBB, + /// + /// Requests the LUN to perform read ahead caching operations from the specified block + /// MMC-2 rev. 11a + /// + SetReadAhead = 0xA7, + /// + /// Indicates the LUN to try to achieve a specified performance + /// MMC-2 rev. 11a + /// + SetStreaming = 0xB6, + /// + /// Stops a scan and continues audio playback from current scanning position + /// MMC-1 rev. 9 + /// + StopPlayScan = 0x4E, + #endregion SCSI Multimedia Commands (MMC) + + #region SCSI Scanner Commands + /// + /// Gets information about the data buffer + /// SCSI-2 X3T9.2/375R rev. 10l + /// + GetDataBufferStatus = 0x34, + /// + /// Gets information about previously defined windows + /// SCSI-2 X3T9.2/375R rev. 10l + /// + GetWindow = 0x25, + /// + /// Provides positioning functions + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ObjectPosition = 0x31, + /// + /// Begins a scan operation + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Scan = 0x1B, + /// + /// Specifies one or more windows within the device's scanning range + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SetWindow = 0x24, + /// + /// Sends data to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Send10 = 0x2A, + #endregion SCSI Scanner Commands + + #region SCSI Block Commands for Optical Media (SBC) + /// + /// Erases the specified number of blocks + /// + Erase10 = 0x2C, + /// + /// Erases the specified number of blocks + /// + Erase12 = 0xAC, + /// + /// Searches the medium for a contiguos set of written or blank blocks + /// + MediumScan = 0x38, + /// + /// Reads blocks from device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Read12 = 0xA8, + /// + /// Gets medium's defect data + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadDefectData12 = 0xB7, + /// + /// Gets the maxium generation address for the specified block + /// + ReadGeneration = 0x29, + /// + /// Reads a specified generation of a specified block + /// + ReadUpdatedBlock = 0x2D, + /// + /// Searches data on blocks + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SearchDataEqual12 = 0xB1, + /// + /// Searches data on blocks using major than or equal comparison + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SearchDataHigh12 = 0xB0, + /// + /// Searches data on blocks using minor than or equal comparison + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SearchDataLow12 = 0xB2, + /// + /// Defines the range within which subsequent linked commands may operate + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SetLimits12 = 0xB3, + /// + /// Replaces a block with data + /// + UpdateBlock = 0x3D, + /// + /// Verifies blocks on the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Verify12 = 0xAF, + /// + /// Writes blocks to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + Write12 = 0xAA, + /// + /// Writes blocks to the device and then verifies them + /// SCSI-2 X3T9.2/375R rev. 10l + /// + WriteAndVerify12 = 0xAE, + #endregion SCSI Block Commands for Optical Media (SBC) + + #region SCSI Medium Changer Commands (SMC) + /// + /// Provides a means to exchange the medium in the source element with the medium at destination element + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ExchangeMedium = 0xA6, + /// + /// Checks all elements for medium and any other relevant status + /// SCSI-2 X3T9.2/375R rev. 10l + /// + InitializeElementStatus = 0x07, + /// + /// Checks all elements for medium and any other relevant status in the specified range of elements + /// SMC-2 rev. 7 + /// + InitializeElementStatusWithRange = 0x37, + /// + /// Moves a medium from an element to another + /// SCSI-2 X3T9.2/375R rev. 10l + /// + MoveMedium = 0xA5, + /// + /// Moves a medium that's currently attached to another element + /// SPC-1 rev. 10 + /// + MoveMediumAttached = 0xA7, + /// + /// Provides a method to change the open/closed state of the specified import/export element + /// SMC-3 rev. 12 + /// + OpenCloseImportExportElement = 0x1B, + /// + /// Positions the transport element in front of the destination element + /// SCSI-2 X3T9.2/375R rev. 10l + /// + PositionToElement = 0x2B, + /// + /// Requests the status of the elements + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReadElementStatus = 0xB8, + /// + /// Requests the status of the attached element + /// SPC-1 rev. 10 + /// + ReadElementStatusAttached = 0xB4, + /// + /// Releases a reserved LUN + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReleaseElement = 0x17, + /// + /// Releases a reserved LUN + /// SMC-1 rev. 10a + /// + ReleaseElement10 = 0x57, + /// + /// Requests information regarding the supported volume types for the device + /// SMC-3 rev. 12 + /// + ReportVolumeTypesSupported = 0x44, + /// + /// Gets the results of + /// SCSI-2 X3T9.2/375R rev. 10l + /// + RequestVolumeElementAddress = 0xB5, + /// + /// Reserves a LUN + /// SCSI-2 X3T9.2/375R rev. 10l + /// + ReserveElement = 0x16, + /// + /// Reserves a LUN + /// SMC-1 rev. 10a + /// + ReserveElement10 = 0x56, + /// + /// Transfers a volume tag template to be searched or new volume tag information for one or more elements + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SendVolumeTag = 0xB6, + #endregion SCSI Medium Changer Commands (SMC) + + #region SCSI Communication Commands + /// + /// Gets data from the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + GetMessage = 0x08, + /// + /// Gets data from the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + GetMessage10 = 0x28, + /// + /// Gets data from the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + GetMessage12 = 0xA8, + /// + /// Sends data to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SendMessage = 0x0A, + /// + /// Sends data to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SendMessage10 = 0x2A, + /// + /// Sends data to the device + /// SCSI-2 X3T9.2/375R rev. 10l + /// + SendMessage12 = 0xAA, + #endregion SCSI Communication Commands + + #region SCSI Controller Commands + /// + /// Commands that get information about redundancy groups + /// SCC-2 rev. 4 + /// + RedundancyGroupIn = 0xBA, + /// + /// Commands that set information about redundancy groups + /// SCC-2 rev. 4 + /// + RedundancyGroupOut = 0xBB, + /// + /// Commands that get information about volume sets + /// SCC-2 rev. 4 + /// + VolumeSetIn = 0xBE, + /// + /// Commands that set information about volume sets + /// SCC-2 rev. 4 + /// + VolumeSetOut = 0xBF, + #endregion SCSI Controller Commands + + #region Pioneer CD-ROM SCSI-2 Command Set + /// + /// Scans for a block playing a block on each track cross + /// + AudioScan = 0xCD, + /// + /// Requests the drive the status from the previous WriteCDP command. + /// + ReadCDP = 0xE4, + /// + /// Requests status from the drive + /// + ReadDriveStatus = 0xE0, + /// + /// Reads CD-DA data and/or subcode data + /// + ReadCdDa = 0xD8, + /// + /// Reads CD-DA data and/or subcode data using MSF addressing + /// + ReadCdDaMsf = 0xD9, + /// + /// Reads CD-XA data + /// + ReadCdXa = 0xDB, + /// + /// Reads all subcode data + /// + ReadAllSubCode = 0xDF, + /// + /// Sets the spindle speed to be used while reading/writing data to a CD + /// + SetCdSpeed = 0xDA, + #endregion + + #region ATA Command Pass-Through + /// + /// Sends a 24-bit ATA command to the device + /// ATA CPT rev. 8a + /// + AtaPassThrough = 0xA1, + /// + /// Sends a 48-bit ATA command to the device + /// ATA CPT rev. 8a + /// + AtaPassThrough16 = 0x85, + #endregion ATA Command Pass-Through + + #region 6-byte CDB aliases + ModeSelect6 = ModeSelect, + ModeSense6 = ModeSense, + Read6 = Read, + Seek6 = Seek, + Write6 = Write, + #endregion 6-byte CDB aliases + + #region SCSI Commands with unknown meaning, mostly vendor specific + ZbcOut = 0x94, + ZbcOut2 = 0x95, + SetCdSpeedUnk = 0xB8, + WriteCdMsf = 0xA2, + WriteCd = 0xAA, + ReadDefectTag = 0xB7, + PlayCd = 0xBC, + SpareIn = 0xBC, + SpareOut = 0xBD, + WriteStream16 = 0x9A, + WriteAtomic = 0x9C, + ServiceActionBidirectional = 0x9D, + WriteLong2 = 0xEA, + UnknownCdCommand = 0xD4, + UnknownCdCommand2 = 0xD5, + #endregion SCSI Commands with unknown meaning, mostly vendor specific + + #region SEGA Packet Interface (all are 12-byte CDB) + /// + /// Verifies that the device can be accessed + /// Sega SPI ver. 1.30 + /// + Sega_TestUnit = TestUnitReady, + /// + /// Gets current CD status + /// Sega SPI ver. 1.30 + /// + Sega_RequestStatus = 0x10, + /// + /// Gets CD block mode info + /// Sega SPI ver. 1.30 + /// + Sega_RequestMode = 0x11, + /// + /// Sets CD block mode + /// Sega SPI ver. 1.30 + /// + Sega_SetMode = 0x12, + /// + /// Requests device error info + /// Sega SPI ver. 1.30 + /// + Sega_RequestError = 0x13, + /// + /// Gets disc TOC + /// Sega SPI ver. 1.30 + /// + Sega_GetToc = 0x14, + /// + /// Gets specified session data + /// Sega SPI ver. 1.30 + /// + Sega_RequestSession = 0x15, + /// + /// Stops the drive and opens the drive tray, or, on manual trays, stays busy until it is opened + /// Sega SPI ver. 1.30 + /// + Sega_OpenTray = 0x16, + /// + /// Starts audio playback + /// Sega SPI ver. 1.30 + /// + Sega_PlayCd = 0x20, + /// + /// Moves drive pickup to specified block + /// Sega SPI ver. 1.30 + /// + Sega_Seek = 0x21, + /// + /// Fast-forwards or fast-reverses until Lead-In or Lead-Out arrive, or until another command is issued + /// Sega SPI ver. 1.30 + /// + Sega_Scan = 0x22, + /// + /// Reads blocks from the disc + /// Sega SPI ver. 1.30 + /// + Sega_Read = 0x30, + /// + /// Reads blocks from the disc seeking to another position at end + /// Sega SPI ver. 1.30 + /// + Sega_Read2 = 0x31, + /// + /// Reads disc subcode + /// Sega SPI ver. 1.30 + /// + Sega_GetSubcode = 0x40, + #endregion SEGA Packet Interface (all are 12-byte CDB) + + /// + /// Variable sized Command Description Block + /// SPC-4 rev. 16 + /// + VariableSizedCDB = 0x7F + } + #endregion SCSI Commands } }