SCSI commands originated as a protocol for devices that use the Small Computer Systems Interface (SCSI) parallel interface. The commands provide a framework for obtaining information about a storage device, controlling the device’s operation, and reading and writing blocks of data in the storage media. Storage devices that use other hardware interfaces, including USB, also use SCSI commands to perform these operations.
About the Commands
The SCSI commands cover a wide range of device types and functions. Most devices need to support only a small number of the commands.
As Chapter 3 explained, each command travels in a structure called the command descriptor block (CDB), or command block for short. The first byte of the CDB is the code that identifies the command. Several sources provide specifications for commands used by mass-storage devices.
The INCITS Technical Committee T10 (www.t10.org) has these specifications:
SCSI Architectural Model (SAM). Defines a reference model that applies to all SCSI devices. The current version is SAM-3.
SCSI Primary Commands (SPC). Defines commands that apply to all SCSI devices. The current version is SPC-3.
SCSI Block Commands (SBC). Defines commands used by hard drives, flash drives, and other direct-access block devices. The current version is SBC-3.
Multi-Media Commands (MMC). Defines commands used by CD and DVD drives. The current version is MMC-4.
INCITS Technical Committee T13 (www.t13.org) has this specification:
ATA/ATAPI. Defines commands used by CD and DVD drives. The current version is ATA/ATAPI – 7.
The SFF Committee (www.sffcommittee.com) has these specifications:
ATA Packet Interface for CD-ROMs (SFF-8020i). An earlier version of the ATA/ATAPI specification.
ATAPI Removable Rewritable Media Devices (SFF-8070i). Commands that apply to some floppy drives.
Working drafts of the documents from INCITS are available from www.t10.org and www.t13.org. Approved standards are ANSI documents sold by Global Engineering Documents (www.global.ihs.com).
Rather than repeating every detail about the command blocks from the specifications, this chapter is more of a companion guide to the specification documents. The guide explains the purpose and use of common commands and provides application hints for implementing the commands in device firmware.