1、ANSI INCITS 351-2001(formerly ANSI NCITS 351-2001)for Information Technology SCSI Primary Commands - 2 (SPC-2)ANSINCITS 351-2001American National Standardfor Information Technology SCSI Primary Commands - 2 (SPC-2)SecretariatInformation Technology Industry CouncilApproved November 30, 2001American N
2、ational Standards Institute, Inc.AbstractThis standard defines the device model for all SCSI devices. This standard defines the SCSI commandsthat are basic to every device model and the SCSI commands that may apply to any device model.The processor device model is defined in this standard. Some targ
3、et SCSI devices may implement aninitiator subset of the processor device model to support the Asynchronous Event Reporting capability de-fined in the SCSI-3 Architecture Model.Approval of an American National Standard requires review by ANSI that therequirements for due process, consensus, and other
4、 criteria for approval havebeen met by the standards developer.Consensus is established when, in the judgement of the ANSI Board ofStandards Review, substantial agreement has been reached by directly andmaterially affected interests. Substantial agreement means much more thana simple majority, but n
5、ot necessarily unanimity. Consensus requires that allviews and objections be considered, and that a concerted effort be madetowards their resolution.The use of American National Standards is completely voluntary; theirexistence does not in any respect preclude anyone, whether he has approvedthe stan
6、dards or not, from manufacturing, marketing, purchasing, or usingproducts, processes, or procedures not conforming to the standards.The American National Standards Institute does not develop standards andwill in no circumstances give an interpretation of any American NationalStandard. Moreover, no p
7、erson shall have the right or authority to issue aninterpretation of an American National Standard in the name of the AmericanNational Standards Institute. Requests for interpretations should beaddressed to the secretariat or sponsor whose name appears on the titlepage of this standard.CAUTION NOTIC
8、E: This American National Standard may be revised orwithdrawn at any time. The procedures of the American National StandardsInstitute require that action be taken periodically to reaffirm, revise, orwithdraw this standard. Purchasers of American National Standards mayreceive current information on a
9、ll standards by calling or writing the AmericanNational Standards Institute.American National StandardPublished byAmerican National Standards Institute, Inc.25 West 43rd Street, New York, NY 10036Copyright 2001 by Information Technology Industry Council (ITI)All rights reserved.No part of this publi
10、cation may be reproduced in anyform, in an electronic retrieval system or otherwise,without prior written permission of ITI, 1250 Eye Street NW, Washington, DC 20005. Printed in the United States of AmericaCAUTION: The developers of this standard have requested that holders of patents that may bereq
11、uired for the implementation of the standard disclose such patents to the publisher. However,neither the developers nor the publisher have undertaken a patent search in order to identifywhich, if any, patents may apply to this standard. As of the date of publication of this standardand following cal
12、ls for the identification of patents that may be required for the implementation ofthe standard, no such claims have been made. No further patent search is conducted by the de-veloper or publisher in respect to any standard it processes. No representation is made or impliedthat licenses are not requ
13、ired to avoid infringement in the use of this standard.iContentsPageForeword xiiIntroduction xv1 Scope. 12 Normative references. 42.1 Normative references. 42.2 Approved references 42.3 References under development. 43 Definitions, symbols, abbreviations, and conventions . 53.1 Definitions 53.2 Acro
14、nyms. 83.3 Keywords . 93.4 Conventions. 103.5 Notation for procedures and functions. 114 General Concepts 124.1 Introduction 124.2 The request-response model. 124.3 The Command Descriptor Block (CDB). 124.3.1 CDB usage and structure. 124.3.2 The fixed length CDB formats 134.3.3 The variable length C
15、DB formats. 164.3.4 Common CDB fields 174.3.4.1 Operation code 174.3.4.2 Service action 174.3.4.3 Logical block address 174.3.4.4 Transfer length. 184.3.4.5 Parameter list length 184.3.4.6 Allocation length. 184.3.4.7 Control . 185 Model common to all device types. 195.1 Introduction to the model co
16、mmon to all device types. 195.2 Commands implemented by all SCSI device servers 195.2.1 Summary of commands implemented by all SCSI device servers 195.2.2 Using the INQUIRY command. 195.2.3 Using the REQUEST SENSE command . 195.2.4 Using the TEST UNIT READY command 195.3 Parameter rounding . 195.4 S
17、elf-test Operations . 205.4.1 Default self-test 205.4.2 The short and extended self-tests 205.4.3 Self-test modes 205.4.3.1 Foreground mode 215.4.3.2 Background mode 215.4.3.3 Elements common to foreground and background self-test modes. 225.5 Reservations 235.5.1 Reservations overview. 23ii 5.5.2 T
18、he Reserve/Release management method . 265.5.3 The Persistent Reservations management method. 275.5.3.1 Overview of the Persistent Reservations management method 275.5.3.2 Preserving persistent reservations 275.5.3.3 Finding persistent reservations and reservation keys 285.5.3.3.1 Summary of command
19、s for finding persistent reservations and reservation keys 285.5.3.3.2 Reporting reservation keys 285.5.3.3.3 Reporting persistent reservations 295.5.3.4 Registering. 295.5.3.5 Creating a persistent reservation when there is no persistent reservation . 315.5.3.6 Removing registrations and persistent
20、 reservations 315.5.3.6.1 Overview of removing registrations and persistent reservations . 315.5.3.6.2 Releasing a persistent reservation 325.5.3.6.3 Preempting an existing persistent reservation with the PREEMPT service action 335.5.3.6.3.1 Overview of preempting an existing persistent reservation
21、with the PREEMPT service action 335.5.3.6.3.2 Failed persistent reservation preempt . 345.5.3.6.3.3 Preempting reservations 355.5.3.6.3.4 Removing registrations 355.5.3.6.4 Preempting an existing persistent reservation with the PREEMPT AND ABORT service action. 365.5.3.6.5 Clearing a persistent rese
22、rvation . 375.6 Multiple port and multiple initiator behavior . 375.7 Removable medium devices with an attached medium changer. 386 Model for processor devices 397 Commands for all device types 417.1 Summary of commands for all device types 417.2 EXTENDED COPY command . 437.2.1 EXTENDED COPY command
23、 introduction 437.2.2 Errors detected before starting processing of the segment descriptors . 467.2.3 Errors detected during processing of segment descriptors . 467.2.4 Abort task management functions . 487.2.5 Descriptor type codes 487.2.6 Target descriptors 507.2.6.1 Target descriptors introductio
24、n 507.2.6.2 Fibre Channel World Wide Name target descriptor format 517.2.6.3 Fibre Channel N_Port target descriptor format 527.2.6.4 Fibre Channel N_Port with World Wide Name checking target descriptor format 537.2.6.5 Parallel Interface T_L target descriptor format 547.2.6.6 Identification descript
25、or target descriptor format 557.2.6.7 Device type specific target descriptor parameters for block device types. 567.2.6.8 Device type specific target descriptor parameters for sequential-access device types . 567.2.6.9 Device type specific target descriptor parameters for processor device types. 577
26、.2.7 Segment Descriptors . 58iii7.2.7.1 Segment descriptors introduction 587.2.7.2 Segment descriptor processing . 597.2.7.3 Block device to stream device operations 627.2.7.4 Stream device to block device operations . 637.2.7.5 Block device to block device operations 647.2.7.6 Stream device to stre
27、am device operations. 667.2.7.7 Inline data to stream device operation. 687.2.7.8 Embedded data to stream device operation 697.2.7.9 Stream device to discard operation . 707.2.7.10 Verify device operation . 717.2.7.11 Block device with offset to stream device operation . 727.2.7.12 Stream device to
28、block device with offset operation. 737.2.7.13 Block device with offset to block device with offset operation. 747.2.7.14 Write filemarks operation 757.2.7.15 Space operation 767.2.7.16 Locate operation . 777.2.7.17 Tape device image copy operation. 787.2.7.18 Register key operation 797.3 INQUIRY co
29、mmand . 807.3.1 INQUIRY command introduction 807.3.2 Standard INQUIRY data 827.3.3 SCSI Parallel Interface specific INQUIRY data 907.3.4 Vital product data. 917.3.5 Command support data . 927.4 LOG SELECT command 947.5 LOG SENSE command . 967.6 MODE SELECT(6) command 987.7 MODE SELECT(10) command 99
30、7.8 MODE SENSE(6) command 1007.8.1 MODE SENSE(6) command introduction 1007.8.2 Current values 1027.8.3 Changeable values 1027.8.4 Default values 1027.8.5 Saved values . 1027.8.6 Initial responses. 1027.9 MODE SENSE(10) command 1037.10 PERSISTENT RESERVE IN command. 1047.10.1 PERSISTENT RESERVE IN co
31、mmand introduction . 1047.10.2 PERSISTENT RESERVE IN service actions. 1047.10.2.1 Summary of PERSISTENT RESERVE IN service actions 1047.10.2.2 Read Keys . 1047.10.2.3 Read Reservations 1057.10.3 PERSISTENT RESERVE IN parameter data for READ KEYS . 1057.10.4 PERSISTENT RESERVE IN parameter data for R
32、EAD RESERVATION . 1067.10.4.1 Format of PERSISTENT RESERVE IN parameter data for READ RESERVATION 1067.10.4.2 Persistent reservations Scope . 1077.10.4.2.1 Summary of persistent reservations Scope . 1077.10.4.2.2 Logical unit scope 1077.10.4.2.3 Element scope . 1077.10.4.3 Persistent Reservations Ty
33、pe 1087.11 PERSISTENT RESERVE OUT command. 1097.11.1 PERSISTENT RESERVE OUT command introduction . 109iv 7.11.2 PERSISTENT RESERVE OUT Service Actions 1107.11.3 PERSISTENT RESERVE OUT parameter list. 1117.12 PREVENT ALLOW MEDIUM REMOVAL command . 1137.13 READ BUFFER command. 1147.13.1 READ BUFFER co
34、mmand introduction . 1147.13.2 Combined header and data mode (0000b) 1147.13.3 Vendor specific mode (0001b). 1157.13.4 Data mode (0010b) 1157.13.5 Descriptor mode (0011b) . 1157.13.6 Read Data from echo buffer (1010b) . 1167.13.7 Echo buffer descriptor mode (1011b) 1177.14 RECEIVE COPY RESULTS comma
35、nd . 1187.14.1 RECEIVE COPY RESULTS command introduction 1187.14.2 COPY STATUS service action 1207.14.3 RECEIVE DATA service action . 1227.14.4 OPERATING PARAMETERS service action. 1237.14.5 FAILED SEGMENT DETAILS service action 1257.15 RECEIVE DIAGNOSTIC RESULTS command . 1277.16 RELEASE(10) comman
36、d . 1287.16.1 RELEASE(10) command introduction . 1287.16.2 Logical unit release 1287.16.3 Third-party release. 1287.17 RELEASE(6) command . 1307.18 REPORT DEVICE IDENTIFIER command 1317.19 REPORT LUNS command 1337.20 REQUEST SENSE command . 1357.20.1 REQUEST SENSE command introduction 1357.20.2 Sens
37、e data format . 1367.20.3 Sense-key specific. 1387.20.4 Current errors 1407.20.5 Deferred errors 1407.20.6 Sense key and sense code definitions 1417.21 RESERVE(10) command 1567.21.1 RESERVE(10) command introduction. 1567.21.2 Logical unit reservation 1567.21.3 Third-party reservation. 1577.21.4 Supe
38、rseding reservations 1587.22 RESERVE(6) command 1587.23 SEND DIAGNOSTIC command. 1597.24 SET DEVICE IDENTIFIER command 1617.25 TEST UNIT READY command 1637.26 WRITE BUFFER command . 1647.26.1 WRITE BUFFER command introduction . 1647.26.2 Combined header and data mode (0000b) 1657.26.3 Vendor specifi
39、c mode (0001b). 1657.26.4 Data mode (0010b) 1657.26.5 Download microcode mode (0100b) 1657.26.6 Download microcode and save mode (0101b) 1667.26.7 Download microcode with offsets (0110b). 1667.26.8 Download microcode with offsets and save mode (0111b) . 1677.26.9 Write data to echo buffer (1010b) 16
40、88 Parameters for all device types . 1698.1 Diagnostic parameters. 169v8.1.1 Diagnostic page format and page codes for all device types. 1698.1.2 Supported diagnostic pages 1718.2 Log parameters 1728.2.1 Log page structure and page codes for all device types 1728.2.2 Application client page. 1778.2.
41、3 Buffer over-run/under-run page . 1788.2.4 Error counter pages . 1808.2.5 Last n deferred errors or asynchronous events page 1808.2.6 Last n error events page 1808.2.7 Non-medium error page. 1818.2.8 Self-test results page . 1818.2.9 Start-stop cycle counter page 1848.2.10 Supported log pages 1868.
42、2.11 Temperature page . 1878.3 Mode parameters. 1898.3.1 Mode parameters overview 1898.3.2 Mode parameter list format 1898.3.3 Mode parameter header formats . 1898.3.4 Mode parameter block descriptor formats . 1918.3.4.1 General block descriptor format. 1918.3.4.2 Direct-access device block descript
43、or format for LONGLBA=0 1928.3.4.3 Long LBA block descriptor format 1938.3.5 Mode page format and page codes . 1948.3.6 Control mode page 1968.3.7 Disconnect-reconnect page . 1998.3.8 Informational exceptions control page . 2028.3.9 Power condition page 2048.3.10 Protocol specific LUN page 2078.3.11
44、 Protocol specific port page. 2088.4 Vital product data parameters 2098.4.1 Vital product data parameters overview and page codes 2098.4.2 ASCII implemented operating definition page 2098.4.3 ASCII information page 2108.4.4 Device identification page 2118.4.5 Supported vital product data pages . 214
45、8.4.6 Unit serial number page. 2159 Commands for processor type devices 2169.1 Summary of commands for processor type devices 2169.2 RECEIVE command 2179.3 SEND command 21710 Parameters for processor type devices . 21810.1 Diagnostic parameters. 21810.2 Log parameters 21910.3 Vital product data para
46、meters 219AnnexesA Procedures for logging operations in SCSI 220A.1 Procedures for logging operations in SCSI introduction 220A.2 Logging operations terminology . 220A.3 LOG SENSE command 221A.4 LOG SELECT command 224vi A.5 Exception conditions during logging. 227B Commands allowed in the presence o
47、f various reservations. 230B.1 SBC commands . 230B.2 SMC commands. 234C Numeric order codes 236C.1 Numeric order codes introduction 236C.2 Additional Sense Codes. 236C.3 Operation Codes 250C.4 Log Page Codes 257C.5 Mode Page Codes . 258C.6 Version Descriptor Values 260C.7 Variable Length CDB Service
48、 Action Codes 268D Vendor identification. 269viiTablesPage1 Typical CDB for 6-byte commands . 132 Typical CDB for 10-byte commands . 133 Typical CDB for 12-byte commands . 144 Typical CDB for 16-byte commands . 145 Typical CDB for long LBA 16-byte commands 156 Typical variable length CDB 167 Typical
49、 variable length CDB for long LBA 32-byte commands . 178 Exception commands for background self-tests . 229 Self-test mode summary . 2310 SPC commands that are allowed in the presence of various reservations. 2511 PERSISTENT RESERVE OUT service actions that are allowed in the presence of various reservations 2612 Processor commands that are allowed in the presence of various reservations 4013 Commands for all device types. 4114 EXTENDED COPY command 4315 EXTENDED COPY parameter list 4416 EXTENDED COPY descriptor type codes 4817 Target descriptor format 5018 Device type specific parameters