X3T9.2/86-52 REV 4b COMMON COMMAND SET (CCS) June 23, 1986 ABSTRACT: This document contains proposed extensions for a common implementation for direct-access devices of the draft proposed American National Standard for information systems Small Computer System Interface (SCSI). NOTE: This is an internal proposal of X3T9.2, a Task Group of the Accredited Standards Committee X3. As such, it is not a completed document and may be changed as a result of further work by X3T9.2. WARNING: The information in this document relates to the X3T9.2/82-2 Revision 17b document (the predecessor to the SCSI-1 standard) which is now superseded by SCSI-2. The SCSI-2 standard has substantially modified some of the information. This document, Common Command Set, has no official status and is provided as a historical reference only. Common Command Set for Direct-Access Devices Rev 4b CHANGED PAGE LIST The 4.A revisions are: -Editorial of the FmtData bit definition in the FORMAT UNIT command. Explanation : Two of the Required variations request that FmtData be set, for which no format data is supplied, only the header is sent in the Data Out phase. -Editorial of page 9 regarding bit 2 set to zero in the Required variations. -Added Additional Sense codes and changes of code names. -Inquiry Data added bytes definition. -The range of MODE SELECT and MODE SENSE Vendor Unique Page codes changed. -Certification Pattern Page left Reserved until further notice. -MODE SENSE Current, Changeable, Default, Saved report of Page contents do not imply Page Code 0. -Editorial of READ and WRITE BUFFER commands. -Editorial of the section SCSI Error Conditions with Sense Keys. The 4b revisions are: -Addition of the PF (Page Format) bit in the CDB of the MODE SELECT command to indicate to the target whether or not the data sent by the initiator during this command complies to the Page Format. The target now shall create a CHECK CONDITION status with ILLEGAL REQUEST sense key when receiving SP set to one and PF set to zero. Why is this change needed? Prior to the CCS definition, some vendors implemented vendor unique data in the place of the CCS pages. Without the new PF bit, targets complying to CCS would mistakenly consider the two first bytes of those vendor unique data as a Page Descriptor. Application: The setting of the PF bit will differentiate products complying to CCS from products designed prior to CCS. With the PF bit definition, it is now possible for a target to maintain compatibility with software drivers designed prior to CCS and those supporting the Page Format. The PF bit value will trigger which data out phase data shall the target analyze, vendor unique versus Page Format. -Certification Page 6 of the MODE SELECT/MODE SENSE commands removed. -Editorial of the Recovery Time Limit byte of the Error Recovery Parameters Page. -Authorizing Page Zero (if any) to be returned by the MODE SENSE command, but to be returned last. -Reclaiming byte 6 of the WRITE BUFFER and READ BUFFER commands as reserved. Common Command Set for Direct-Access Devices Rev 4b FOREWORD An ANSC X3T9.2 working group of SCSI implementors and users have met for the purpose of proposing an addendum to the SCSI specifications for a Common Command Set for Direct Access Devices. The proposed protocol defined in this document may be applicable to other Device types. OBJECTIVES of CCS: To increase SCSI market acceptance, providing true second sources to users by providing software compatibility between SCSI products from different vendors. SCSI implementors are encouraged to support the Common Command Set, allowing users to source products from different vendors without modifying software. The Common Command Set does not substantially deviate from the draft proposed SCSI standard or preclude the use of additional commands; nor does it create a new standard, but selects and enforces a common implementation within the draft standard, as well as defines optional additional functions not presently available in the draft standard. It does not limit the performance of the products conforming to the document. The document does not address electrical and physical compatibility issues of the interface. A special thanks for the help, dedication and commitment from the following individuals who have actively contributed with their experience and suggestions to the edition of this document: Daniel Loski, Dal Allan, Dexter Anderson, Steve Cornaby, Jesse Eckelkamp, Allen England, John Frissel, Steve Goldman, Mark Goral, Jim Greenlaw, Eric Halvorsen, Greg Hite, Gerald Houlder, Dave Koger, Larry Lamers, Tony Lo, John Lohmeyer, Mike Machado, Dave McIntyre, Bob Mortensen, Paul Nitza, Jim Patton, Giles Pauli, Ken Post, Bob Reid, Don Rodgers, Robert Snively, David Snook, and Jeff Stai. Common Command Set for Direct-Access Devices Rev 4b The following document refers to the draft proposed ANS SCSI X3T9.2/82-2 standard document Revision 17B. Added comments to the draft standard document: REQUIRED: Describes commands, messages, fields, bytes, bits which shall be implemented in order to conform to the common command set. Optional (O): Identifies the operation of commands, messages, fields, bytes, bits which, if implemented, shall be as defined in this document. 6.1.2 Operation Code Types Added comments to the draft standard document. Operation Code Type Description REQUIRED Commands so designated shall be implemented by the target in order to comply to this document. O Optional -Operation codes defined in this document, if supported, shall be implemented as specified in both, this document and the draft standard specifications. V Vendor Unique -Operation codes so designated in the draft standard document and not used in this document are available for vendor defined commands. R Reserved -Operation codes so designated in the draft standard document and not listed in this document shall not be used. 6.2.6 Control Byte Bit 7 Vendor Unique. To be checked by the target. 6 Vendor Unique. To be checked by the target. 5 Reserved 4 Reserved 3 Reserved 2 Reserved 1 Flag. Optional. To be checked by the target. 0 Link. Optional. To be checked by the target. Common Command Set for Direct-Access Devices Rev 4b 5.5.2 Message System Table 5-2: Message Codes ============================================================================== Code Description Type BASIC SET 00 COMMAND COMPLETE REQUIRED SYSTEMS SET 01 Extended Messages Optional 06 ABORT REQUIRED 07 MESSAGE REJECT REQUIRED 08 NO OPERATION REQUIRED 0C BUS DEVICE RESET REQUIRED DISCONNECT SET 04 Disconnect Optional 80-FF IDENTIFY REQUIRED Note: It is required that the target accept the Identify message. The initiator may or may not issue this message. The initiator may or may not set bit 6 of the Identify message indicating its ability to accommodate disconnection and reconnection. ERROR RECOVERY SET 02 Save Data Pointers Optional 03 RESTORE POINTERS REQUIRED 05 Initiator Detected Error Optional 07 MESSAGE REJECT REQUIRED 09 Message Parity Error Optional LINK SET 0A Linked command complete Optional 0B Linked command complete with flag Optional ============================================================================== 14. STATUS ============================================================================== Status(es) Type GOOD REQUIRED CHECK CONDITION REQUIRED CONDITION MET/GOOD Optional BUSY REQUIRED INTERMEDIATE/GOOD Optional INTERMEDIATE/CONDITION MET/GOOD Optional RESERVATION CONFLICT REQUIRED ============================================================================== Common Command Set for Direct-Access Devices Rev 4b REQUIRED FEATURES COMMON COMMAND SET for Direct-Access Devices CCS REQUIRED COMMANDS ============================================================================== Operation Code Type Command Name 00 M TEST UNIT READY 03 M REQUEST SENSE 04 M FORMAT UNIT 08 M READ 0A M WRITE 12 M INQUIRY 16 M RESERVE UNIT 17 M RELEASE UNIT 1D M SEND DIAGNOSTIC 25 M READ CAPACITY 28 M READ EXTENDED 2A M WRITE EXTENDED ============================================================================== For all the following commands, no changes or comments are applied within this document. Refer to the ANSC draft document sections 7 and 8: TEST UNIT READY READ WRITE READ EXTENDED WRITE EXTENDED 7.1.2 REQUEST SENSE Command Added comments to the ANSC draft standard document. Extended Sense Data format is Required. Non-Extended Sense is optional. If the Allocation Length of the CDB is different than zero, the target shall return the Extended Sense Format. The eight (8) first bytes of the Extended Format, as defined in the SCSI specifications, are to be supported by the target. All additional bytes are optional. If the Allocation Length byte 4 of the CDB is set to zero, the target shall return four sense bytes of Extended or non Extended Sense data format. Common Command Set for Direct-Access Devices Rev 4b Table 7-5: Extended Sense Data Format ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Valid | Error Class | Error Code | -----|-----------------------------------------------------------------------| 1 | Segment Number | -----|-----------------------------------------------------------------------| 2 |Filemark| EOM | ILI |Reserved| Sense Key | -----|-----------------------------------------------------------------------| 3 | Information Byte (MSB) | -----|-----------------------------------------------------------------------| 4 | Information Byte | -----|-----------------------------------------------------------------------| 5 | Information Byte | -----|-----------------------------------------------------------------------| 6 | Information Byte (LSB) | -----|-----------------------------------------------------------------------| 7 | Additional Sense Length (n) | -----|-----------------------------------------------------------------------| 8 to| Additional Sense Bytes | n+7| | ============================================================================== 8.1.2 FORMAT UNIT Command Peripheral Device Type: Direct Access Operation Code Type: Mandatory Operation Code: 04h Table 8-3: FORMAT UNIT Command ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Operation Code | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | FmtData| CmpLst | Defect List Format | -----|-----------------------------------------------------------------------| 2 | Vendor Unique | -----|-----------------------------------------------------------------------| 3 | Interleave (MSB) | -----|-----------------------------------------------------------------------| 4 | Interleave (LSB) | -----|-----------------------------------------------------------------------| 5 | Vendor Unique | Reserved | Flag | Link | ============================================================================== The FORMAT UNIT command (Table 8-3) ensures that the medium is formatted so that all of the initiator addressable data blocks can be accessed. There is no guarantee that the medium has or has not been altered. In addition, the medium may be certified and control structures be created for the management of the medium and defects. The FORMAT UNIT command shall be rejected with RESERVATION CONFLICT status if any extent (see 8.1.8.2) in the specified logical unit is reserved. It is recommended that the MODE SELECT Parameters (if any) are set properly prior to issuing the FORMAT UNIT command. Common Command Set for Direct-Access Devices Rev 4b The FORMAT UNIT command is both a Required and an Extended command. Bits 0 through 4, byte 1 of the CDB, include three Required and multiple optional implementations of the command. During the execution of the FORMAT UNIT command, the target may perform a medium flaw management scheme which can be selected by the initiator. Four schemes of flaws P, C, D and G are defined as follows. P = PRIMARY DEFECT LIST: This list refers to the list of defects supplied by the original manufacturer of the device considered as permanent flaws. It is recommended that the device manufacturer record the P list on a specific location on the device and that writing access be prevented by the initiators to this location. During the FORMAT UNIT command the target intelligence shall have access to this list in order to remove the P list flaws from the initiator addressable data blocks. This list shall not be subject to additions. C = TARGET CERTIFICATION: Includes defects detected by the target during an optional verify process executed during the FORMAT UNIT command. The C scheme includes flaw areas to be removed from the initiator addressable data blocks. The target certification flaws may or may not be saved or recorded as a list by the target. D = DATA DEFECT LIST: This list is supplied to the target by the initiator in the Data Out phase of the FORMAT UNIT command as shown in tables 8-5, 8-6, and 8-7. The defect list length (Byte 2 and 3) of the Defect List Header may be null. The Data Defect list may or may not be saved or recorded by the target. G = GROWN DEFECT LIST: This list includes defects identified to or by the target. This list does not include the Primary list of defects. The defects classified as grown are medium flaws identified by or to the target other than the Primary list of defects. Entries to this Grown list may include (at the option of the target): -Defects provided to the target in Data Defect lists (D list) during previous and current FORMAT UNIT commands. -The target certification defects (C list) detected during the previous and current FORMAT UNIT commands or vendor unique utilities. -Defects appended by the result of a successful completion of the REASSIGN BLOCKS command. -Defects identified by the target and automatically handled by the target. The defective blocks classified in this grown list are automatically reassigned to an area on the logical unit reserved for this purpose. The implementation of this automatic handling of defects is target specific. A format data (FmtData) bit of one indicates that a DATA OUT Phase takes place during the command execution. The defect list included with this data (if Defect List Length is different than zero) specifies the defect list that shall be entered into the defect map. The flaw areas of this map shall be removed by the target from the initiator addressable blocks. The format of the defect list is determined by the Defect List Format defined by bits 0 through 2 . A FmtData bit of zero indicates that the DATA OUT phase shall not occur (no defect list header and no defect data shall be supplied by the initiator). A complete list (CmpLst) bit of one indicates that the data supplied by the initiator during the DATA OUT phase of the command execution is the complete list of known defects. Any previous initiator-specified defect map or defect data shall be erased by the target. The result is to purge any previous initiator-specified defect list and to build a new defect list. Any previous C, D or G lists (if any) shall be erased or removed by the target. The target may add to this complete list as it formats the medium, when performing a target certification process (or a new C list). A CmpLst bit of zero indicates that the data supplied by the initiator during the DATA OUT phase is in addition to existing defect data already removed from initiator addressable blocks and using the current format. Common Command Set for Direct-Access Devices Rev 4b When using the block format, the defect list refers to the current block length (and not to the new block length, if it is different) and the defect list refers to current logical block addresses (not physical addresses). The defect list format field (bits 0 through 2 of byte 1) specifies additional information related to the defect list. (See Table 8-4 for further information.) The interleave field requests that the logical blocks be related in a specific fashion to the physical blocks to facilitate speed matching between the host bus data transfer rate and the block data transfer rate from the device. An interleave value of zero requests that the target use its default interleave. An interleave value of one requests that consecutive logical blocks be placed in consecutive physical order. Values of two or greater are vendor unique. Table 8-4: FORMAT UNIT Command Variations ============================================================================== Bit Reference FLAW 4 3 2 1 0 TYPE LENGTH P C G D ---- 0 x x x x REQUIRED N/A 0 0 0 0 No Data Out phase (no defect list 0 0 1 0 header, no defect descriptors). 0 1 0 0 It is up to the target to define 0 1 1 0 what combination of P, C, G to 1 0 0 0 use if flaw management is 1 0 1 0 performed. 1 1 0 0 1 1 1 0 1 0 0 x x REQUIRED Zero 0 0 1 0 Reformat using G list. 0 0 1 0 Defect List Length of zero. 1 0 1 0 1 1 1 0 1 1 0 x x REQUIRED Zero 0 0 0 0 With CmpLst bit set to one. 0 1 0 0 Target erases and/or removes 1 0 0 0 current G list. 1 1 0 0 Defect List Length of zero. Note: P, C, G and D refer to the various lists of defects. ============================================================================== Implementation of the required variations: The following refers to the configuration of the bits 4 through 0 in the Table 8-4. 0xxxx REQUIRED: With this variation, the initiator requests to have no control on how the format process is executed by the target. This is the case when the initiator is confident in the target’s intelligence to perform the format accordingly. The target determines if flaw management shall be performed or not during the format process of this variation. If flaw management is performed, the target shall define what combination of P, C, G defects scheme be performed. The target may remove or erase previous lists of flaws, except the P list. No DATA OUT phase shall take place with this variation (no Defect list Header and no D list). In the following two variations, bit 2 is set to zero to preserve the bit combinations of the vendor unique and the reserved variations (1x110 and 1x111, see page 16). Otherwise with Defect List length set to zero, bit 2 has no other meaning with these two variations for which no defect descriptors are involved. 100xx REQUIRED: The target shall perform the format process with flaw management. This variation allows the initiator to request the target to use the G list of medium grown defects as defects to be removed from the Common Command Set for Direct-Access Devices Rev 4b initiator addressable blocks. This variation is mostly available for a reformat process ensuring that all previously detected flaws be managed. DATA OUT phase with the Defect List Header shall take place during this variation, with the Defect List length of zero. The target shall determine whether or not to implement the certification process (C scheme). 110xx REQUIRED: The target shall perform the format process with flaw management. This variation allows the initiator not to consider the G list of medium grown defects but return to the "as shipped" condition from the original manufacturer of the device. This assumes that the list of defects had grown during the lifetime of the medium either with a C, D or G lists as defined below. DATA OUT phase with the Defect List Header shall take place during this variation, with the Defect List length of zero. The target shall determine whether or not to implement the certification process (C scheme). Notes: 1) X bits are not analyzed by the target. The "x" value may be 1 or 0, but it is recommended to be set to zero by the initiator. 2) With all the above variations, at completion of the FORMAT UNIT command, some initiator addressable blocks may include flaws. The target may require a Vendor Unique certification utility to identify defects as an alternative source to remove known flaws from initiator addressable blocks. It is recommended that this utility, in form of either a vendor unique command, or use of the REASSIGN BLOCKS command or of a vendor unique process be implemented immediately upon completion of the FORMAT UNIT command. Common Command Set for Direct-Access Devices Rev 4b 7.1.3 INQUIRY Command Table 7-9: INQUIRY Data ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Peripheral Device Type | -----|-----------------------------------------------------------------------| 1 | RMB | Device-Type Qualifier | -----|-----------------------------------------------------------------------| 2 | ISO Version | ECMA Version | ANSI Version | -----|-----------------------------------------------------------------------| 3 | Reserved| Response Data Format | -----|-----------------------------------------------------------------------| 4 | Additional Length (n) | ============================================================================== | Vendor Unique Parameters | ============================================================================== 5 to| Vendor Unique | n+4 | Parameter Bytes | ============================================================================== Response Data Format: Code Description 0h Vendor Unique 1h Common Command Set (CCS) 2h-Fh Reserved The Device Type Qualifier is optional. Targets conforming to, at least conformance level 2 as defined in Table E1 appendix E of the draft standard, and conforming to this document shall set the Common Command Set code (1h) in the Response Data Format field. 8.1.8 RESERVE UNIT Command Logical Unit Reservation and Third Party Reservation are Required. 8.1.9 RELEASE UNIT Command Logical Unit Release and Third Party Release are Required. Extent Release is required only if the Extent Reservation Option is implemented. 7.1.6 SEND DIAGNOSTIC Command SelfTest bit 2 byte 1 is the only Required function. 8.2.1 READ CAPACITY Command Added comments to the ANSC document: The PMI bit is Required to be implemented by the target. This means that a Check Condition status with ILLEGAL REQUEST Sense Key should not be returned by a target receiving the PMI bit set by the initiator. In this case, the target shall determine the Logical Block Address to be returned as means to indicate a substantial delay in the data transfer. If the target cannot determine any other block address, the last Logical Block of the unit is considered to be a valid address to return in the READ CAPACITY DATA. Common Command Set for Direct-Access Devices Rev 4b OPTIONAL FEATURES COMMON IMPLEMENTATION of OPTIONAL COMMANDS for Direct-Access Devices CCS OPTIONAL COMMANDS ============================================================================== Operation Code Type Command Name 07 O REASSIGN BLOCKS 15 O MODE SELECT 1A O MODE SENSE 37 O READ DEFECT DATA 3B O WRITE BUFFER 3C O READ BUFFER ============================================================================== The following commands listed as optional in the draft standard and if supported by the target shall be implemented as defined in the draft standard document. These commands are not required for conformance to the Common Command Set, but may be optionally implemented: ============================================================================== Operation Code Type Command Name 01 O REZERO UNIT 0B O SEEK 18 O COPY 1B O START/STOP UNIT 1C O RECEIVE DIAGNOSTIC RESULTS 1E O PREVENT/ALLOW MEDIUM REMOVAL 2B O SEEK 2E O WRITE AND VERIFY 2F O VERIFY 30 O SEARCH DATA HIGH 31 O SEARCH DATA EQUAL 32 O SEARCH DATA LOW 33 O SET LIMITS 39 O COMPARE 3A O COPY AND VERIFY ============================================================================== No changes or comments are applied within this document for the following command. Refer to the ANSC draft document sections 7 and 8. ============================================================================== Operation Code Type Command Name 07 O REASSIGN BLOCKS ============================================================================== 7.1.2 REQUEST SENSE Command Added comments to the ANSC document. Non-Extended format may also be implemented at the option of the target as defined below. Common Command Set for Direct-Access Devices Rev 4b If the Allocation Length byte 4 of the CDB is set to zero, the target shall return four sense bytes of either the Extended or Non-Extended Sense data format. The Initiator shall analyze the first Sense byte to determine which Sense Format, either Extended (class 7) or Non-Extended (classes 0-6) has been returned by the target. It is recommended that Non-Extended Sense Format be not implemented by the target. IS THE ALLOCATION LENGTH EQUAL TO ZERO? | | | | NO YES | | | | IS BYTE ZERO OF THE SENSE TARGET RETURNS FOUR BYTES OF DATA EQUAL TO 70h OR F0h? EXTENDED OR NON-EXTENDED | SENSE DATA. | | | | NO YES | | | | NON-EXTENDED SENSE DATA FORMAT EXTENDED SENSE DATA FORMAT Four bytes per Table 7-4 of Eight bytes per Table 7-5 of X3T9.2/82-2 Revision 17b. X3T9.2/82-2 Revision 17b. This option should be avoided More than eight bytes may be in future implementations. returned if there is The target should return sufficient allocation length. only class 7 errors. Common Command Set for Direct-Access Devices Rev 4b Table 7-5: Extended Sense Data Format ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Valid | Error Class | Error Code | -----|-----------------------------------------------------------------------| 1 | Segment Number | -----|-----------------------------------------------------------------------| 2 |Filemark| EOM | ILI |Reserved| Sense Key | -----|-----------------------------------------------------------------------| 3 | Information Byte (MSB) | -----|-----------------------------------------------------------------------| 4 | Information Byte | -----|-----------------------------------------------------------------------| 5 | Information Byte | -----|-----------------------------------------------------------------------| 6 | Information Byte (LSB) | -----|-----------------------------------------------------------------------| 7 | Additional Sense Length (10 + n) | -----|-----------------------------------------------------------------------| 8 | Search/Copy Commands Information Byte (MSB) | -----|-----------------------------------------------------------------------| 9 | Search/Copy Commands Information Byte | -----|-----------------------------------------------------------------------| 10 | Search/Copy Commands Information Byte | -----|-----------------------------------------------------------------------| 11 | Search/Copy Commands Information Byte (LSB) | -----|-----------------------------------------------------------------------| 12 | Peripheral Device Type | -----|-----------------------------------------------------------------------| 13 | Peripheral Error Code | -----|-----------------------------------------------------------------------| 14 | Vendor Unique | -----|-----------------------------------------------------------------------| 15|FPV |C/D | VU | VU |BPV | BitPointer | -----|-----------------------------------------------------------------------| 16 | Field Pointer (MSB) | -----|-----------------------------------------------------------------------| 17 | Field Pointer (LSB) | -----|-----------------------------------------------------------------------| 18 _ | Vendor Unique | n+17| | ============================================================================== Byte 12 Additional Sense Code. The Additional Senses may be applied with the same code by the target to Extended and Non Extended Sense Formats. The Additional Sense code 00h indicates that the target does not support any additional sense code for the related Sense Key or does not have any appropriate additional sense to return for the CHECK CONDITION status that it created. The Additional Sense codes are either, defined, reserved or vendor unique. The codes are allocated to the Peripheral Device Type returned by the INQUIRY command. Some Additional Sense codes may be shared among various Device Types. Common Command Set for Direct-Access Devices Rev 4b DIRECT ACCESS DEVICES. ADDITIONAL SENSE CODES Suggested Related Sense Keys. Other Sense Keys may apply to Additional Sense Codes. 00 No Additional Sense Information No Sense 01 No Index/Sector signal Hardware error 02 No Seek Complete Hardware error 03 Write Fault Hardware error 04 Drive Not Ready Not Ready 05 Drive Not Selected Not Ready 06 No Track Zero found Hardware error 07 Multiple Drives Selected Hardware error 08 Logical Unit Communication Failure Hardware error 09 Track Following error Hardware error 0A through 0F Reserved 10 ID CRC or ECC error Hardware error or Medium error 11 Unrecovered Read error of data blocks Medium error 12 No Address Mark found in ID field Medium error 13 No Address Mark found in Data field Medium error 14 No record found Medium error 15 Seek Positioning error Hardware error or Medium error 16 Data Synchronization Mark error Medium error or Recovered error 17 Recovered Read data with target’s read retries (not with ECC) Recovered error 18 Recovered Read data with target’s ECC correction (not with retries) Recovered error 19 Defect List error Medium error or Recovered error 1A Parameter Overrun Illegal Request 1B Synchronous Transfer error Hardware error 1C Primary Defect List not found Medium error or Illegal Request 1D Compare error Miscompare 1E Recovered ID with target’s ECC correction Medium error or Recovered error 1F Reserved 20 Invalid Command Operation Code Illegal Request 21 Illegal Logical Block Address. Illegal Request Note: Address greater than the LBA returned by the READ CAPACITY data with PMI bit not set in CDB. 22 Illegal function for device type Illegal Request 23 Reserved 24 Illegal field in CDB Illegal Request 25 Invalid LUN Illegal Request 26 Invalid field in Parameter List Illegal Request 27 Write Protected Data Protect 28 Medium Changed Unit Attention 29 Power On -Reset -Bus Device Reset occurred Unit Attention 2A Mode Select Parameters changed Unit Attention 2B through 2F Reserved 30 Incompatible Cartridge Medium error 31 Medium Format corrupted Medium error 32 No Defect Spare Location Available Medium error 33 through 3F Reserved 40 RAM failure Hardware error 41 Data Path diagnostic failure Hardware error 42 Power On Diagnostic Failure Hardware error 43 Message Reject Error (see 5.6.1.5) Hardware error or Aborted Command 44 Internal Controller Error (see 5.6.1.8) Hardware error or Aborted Command 45 Select/ Reselect failed (see 5.6.1.7) Hardware error or Aborted Command 46 Unsuccessful Soft Reset Hardware error or Aborted Command 47 SCSI Interface Parity Error (see 5.6.1) Hardware error or Aborted Command 48 Initiator Detected Error (see 5.6.1.4) Hardware error or Aborted Command 49 Inappropriate/Illegal Message Hardware error or Aborted Command 4A through 4F Reserved 50 through 5F Reserved 60 through 6F Reserved 70 through 7F Reserved 80 through FF Vendor Unique 15 Common Command Set for Direct-Access Devices Rev 4b Byte 14 Field Replaceable Unit (FRU) failed. The format of this byte is Vendor Unique. A value of zero means that no FRU is to be reported. Byte 15 definition: -FPV (Field Pointer Value) Bit 7 set to zero indicates that the target does not implement the functions supported by C/D & BPV bits and bytes 16 & 17, therefore these bits and fields are not valid. FPV bit set to one indicates that the Field Pointer bytes 16 & 17 , the C/D and BPV bits are significant. -C/D bit of one indicates that the value reported in the Field Pointer is the CDB’s byte number for which an ILLEGAL REQUEST Sense Key was issued. C/D bit of zero indicates that the value reported in the Field Pointer is the byte number of the DATA phase for which an ILLEGAL REQUEST Sense Key was issued. -Bits5&4are vendor unique. -BPV bit of zero indicates that the target does not implement this function, therefore the Bit Pointer field is not valid. BPV bit of one indicates that the Bit Pointer field (bits 0 through 2) is significant. -Bits 0 through 2, Bit Pointer, indicates which bit of the byte number reported in bytes 16 & 17 is the bit for which the ILLEGAL REQUEST Sense Key was issued. Common Command Set for Direct-Access Devices Rev 4b 8.1.2 FORMAT UNIT Command Table 8-4: FORMAT UNIT Command Variations ============================================================================== Bit Reference 4 3 2 1 0 FmtData | | | | CmpLst | Defect List | Format | | | | Command Type Flaw Length Defect Management PCGD Comments 1 0 0 x x Optional > 0 0011 Block format with G list. Defect List Length different than zero. See Table 8-5. 1 1 0 x x Optional > 0 0001 Block format (complete with no G list) 1 0 1 0 0 Optional >= 0 0011 Bytes from Index Format with G list. See Table 8-6. 1 1 1 0 0 Optional >= 0 0001 Bytes from Index Format (complete with no G list). 1 0 1 0 1 Optional >= 0 0011 Physical Sector Format with G list. See Table 8-7. 1 1 1 0 1 Optional >= 0 0010 Physical Sector Format (complete with no G list). 1 X 1 1 0 Vendor Unique 1 X 1 1 1 Reserved ============================================================================== Common Command Set for Direct-Access Devices Rev 4b Table 8-5: Defect List -Block Format ============================================================================== Byte | Defect List Header | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | FOV | DPRY | DCRT | STPF | Reserved | VU | -----|-----------------------------------------------------------------------| 2 | Defect List Length (MSB) | -----|-----------------------------------------------------------------------| 3 | Defect List Length (LSB) | ============================================================================== | Defect Descriptor(s) | ============================================================================== 0-| | xx | ============================================================================== Bits 4 through 7 Byte 1 of the Defect List Header provides optional format control. These bits defines how the initiator may optionally control the Primary defect list and the Target Certification flaw management schemes during the FORMAT UNIT command. -Bit 0 is vendor unique. -Bits 1 through 3 are reserved -Bits 4 through 7 shall be analyzed by the target. FOV (Format Options Valid) bit 7 set to zero indicates that the initiator requests the target’s format default scheme to be implemented for the functions defined by bits 4 through 6. If FOV is set to zero, the initiator shall set bits 4 through 6 to zero, otherwise the target shall create the CHECK CONDITION status with ILLEGAL REQUEST Sense Key. FOV bit 7 set to one authorizes the setting of bits 4 through 6. If the target does not support the functions defined by any of bits 4 through 6 set to one, it shall create the CHECK CONDITION status with ILLEGAL REQUEST Sense Key. DPRY (Disable Primary) bit set to zero and FOV set to one indicates that the target shall manage the Primary list of defects while formatting. If the target does not know if the P list exists or fails to find the P list, it shall create the CHECK CONDITION status. DPRY bit set to one and FOV set to one indicates that the target shall exclude the Primary defect list from the list of flaws to manage while formatting. DCRT (Disable Certification) bit set to zero and FOV set to one indicates that the target shall enable the target certification routine, if implemented, while formatting. DCRT bit set to one and FOV set to one indicates that the target shall disable the target certification routine while formatting. STPF (Stop format) bit set to zero and FOV set to one indicates that the target shall continue the format process even if either of the lists of defects P or G are not successfully accessed in whole or in part. The target shall create the CHECK CONDITION status after completion of the format process with RECOVERED ERROR Sense key, if no other error occurred than failing to successfully access the P or G lists. Common Command Set for Direct-Access Devices Rev 4b STPF bit set to one and FOV set to one indicates that the target shall stop the format process upon failing to successfully access, in whole or in part, any of the lists of defects P or G. The target shall then create the CHECK CONDITION status with MEDIUM ERROR Sense key. 7.1.3 INQUIRY Command If the Initiator requests additional bytes in the Allocation Length byte of the CDB, the additional bytes of the Inquiry Data are optional and defined as follows. ASCII data fields shall be with the most significant byte returned first with no leading spaces. ASCII fields are returned in the order to be read. ASCII data fields not implemented by the target, shall be set to ASCII Space characters (20h). Table 7-9: INQUIRY Data ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Peripheral Device Type | -----|-----------------------------------------------------------------------| 1 | RMB | Device-Type Qualifier | -----|-----------------------------------------------------------------------| 2 | ISO Version | ECMA Version | ANSI Version | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Additional Length (n + 30) | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Vendor Identification (MSB) (in ASCII) | -----|-----------------------------------------------------------------------| -----|-----------------------------------------------------------------------| 15 | Vendor Identification (LSB) | -----|-----------------------------------------------------------------------| 16 | Product Identification (MSB) (in ASCII) | -----|-----------------------------------------------------------------------| -----|-----------------------------------------------------------------------| 31 | Product Identification (LSB) | -----|-----------------------------------------------------------------------| 32 | Product Revision Level (MSB) (in ASCII) | -----|-----------------------------------------------------------------------| -----|-----------------------------------------------------------------------| 35 | Product Revision Level (LSB) | -----|-----------------------------------------------------------------------| -----|-----------------------------------------------------------------------| 36-55| Vendor Unique | -----|-----------------------------------------------------------------------| -----|-----------------------------------------------------------------------| 56-97| RESERVED | -----|-----------------------------------------------------------------------| -----|-----------------------------------------------------------------------| 98-xx| Vendor Unique | ============================================================================== It is recommended that targets implement the Inquiry Data up to byte 35. Common Command Set for Direct-Access Devices Rev 4b 8.1.7 MODE SELECT Command Peripheral Device Type: Direct Access Operation Code Type: Optional Operation Code: 15h Table 8-13: MODE SELECT Command ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Operation Code | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | SP | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Parameter List Length | -----|-----------------------------------------------------------------------| 5 | Vendor Unique | Reserved | Flag | Link | ============================================================================== The MODE SELECT command (Table 8-13) provides a means for the initiator to specify or change medium, logical unit, target or peripheral device parameters to the target. Absolutely necessary to some targets, this command is not Required within the Common Command Set. This command is optional because some devices do not need to implement it. Those are, initiators which do not need or wish to change any of the target default values, or targets which do not allow initiators to change their default values. If the MODE SELECT command is implemented, it is Required that the MODE SENSE command be also implemented. PF (Page Format) bit 4 byte 1 set to one indicates that the data sent by the initiator after the MODE SELECT header and the Block Descriptors (if any) complies to the Page Format. PF (Page Format) bit 4 byte 1 set to zero indicates that the data sent by the initiator after the MODE SELECT Header and Block Descriptors (if any) is vendor unique. SP (Save Parameters) bit 0 byte 1 set to one indicates that the target shall: -update the Current mode values with the values defined in the following Pages; -save all Saveable Pages except the Pages defined by the Page Codes 3, 4 and 5 which are to be saved during the next successfully completed FORMAT UNIT command. -then report Command Complete with no CHECK CONDITION status when successfully completing the above. Saveable Pages are Pages for which preceding MODE SENSE commands returned the PS bit (bit 7 byte 0) of the Page Header set to one. The target shall create a CHECK CONDITION status with ILLEGAL REQUEST sense key when receiving SP set to one and PF set to zero. SP bit 0 byte 1 set to zero indicates that the target shall: -update the Current mode values with the values defined in the following Pages; -shall not save the Saveable Pages; -shall not modify the saved parameters of the Pages defined by the Page Codes 3, 4 and 5. Common Command Set for Direct-Access Devices Rev 4b -then shall report Command Complete with no CHECK CONDITION status when successfully completing the above. The parameter list length specifies the length in bytes of the MODE SELECT parameter list that shall be transferred during the DATA OUT phase. A parameter list length of zero indicates that no data shall be transferred. This condition shall not be considered as an error. The MODE SELECT parameter list (TABLE 8-14) contains a four-byte header, followed by zero or more block descriptors, followed by zero or more Pages. Table 8-14: MODE SELECT Parameter List ============================================================================== Byte | MODE SELECT Header | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Medium Type | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Block Descriptor Length | ============================================================================== | Block Descriptor(s) | ============================================================================== 0 | Density Code | -----|-----------------------------------------------------------------------| 1 | Number of Blocks (MSB) | -----|-----------------------------------------------------------------------| 2 | Number of Blocks | -----|-----------------------------------------------------------------------| 3 | Number of Blocks (LSB) | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Block Length (MSB) | -----|-----------------------------------------------------------------------| 6 | Block Length | -----|-----------------------------------------------------------------------| 7 | Block Length (LSB) | ============================================================================== | Page Descriptor(s) | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2-n | Refer to each page | ============================================================================== | Vendor Unique Parameter(s) | ============================================================================== 0 _ n| Vendor Unique | | Parameter Byte(s) | ============================================================================== Optional additional blocks of parameters called "Pages" may be sent to the target in the Data Out phase of the MODE SELECT command, following either: -the MODE SELECT Header, if the Block Descriptor length is set to zero. -or all Block Descriptors, if the Block Descriptor length is different than zero. The Block Descriptor Length shall not include the length of the Pages. Each defined Page is preceded by a Header of two bytes defining the Page Code and the length of the page. Following the Header the Pages are separated into sub-blocks containing a list of related flags and/or values. Common Command Set for Direct-Access Devices Rev 4b Bits 7 and 6 of byte 0 are reserved. The Page Code identifies the meaning of the following bytes in the Page. The Page Code is either defined, reserved or vendor unique. The parameters in the defined Pages are classified in priority to ease implementation by the target. The Page Length indicates the number of bytes that the target supports in each Page. The Page Length value of each defined Page, shall not include the Page Length byte. The target may return in the Pages of the MODE SENSE commands as many consecutive bytes as it supports, for each Page that it supports, without splitting fields of multiple bytes. The Page Length shall be set in the pages of the MODE SELECT commands to the exact same value (zero value included) returned by the target in the MODE SENSE Page Length bytes. Otherwise, the target shall create CHECK CONDITION status with the Sense Key of ILLEGAL REQUEST. The initiator shall issue a MODE SENSE command requesting the target to return all Changeable values (see PCF field configuration 0 1 in byte 2 of the MODE SENSE CDB) prior to issuing any MODE SELECT commands, in order to find out which Pages are implemented by the target and the length of each Pages for that particular LUN. The target shall create a CHECK CONDITION status when receiving a non-zero value in a MODE SELECT field or bit that the target declared non-changeable in MODE SENSE data. Initiator Implementor Notes: -Those Pages, supported by the target, in which the initiator requests parameters to be changed shall be sent to the target. -The initiator may send in MODE SELECT commands all Pages supported by the target. -The Pages are not required to be sent in ascending order. -Intelligent targets, versus targets supporting multiple LUNs, may authorize limited number of parameters to be changed. Those parameters has been classified as the first sub-blocks in the Pages. In the event of a Hard Reset, the target shall first attempt to restore the Saved Parameters. If Saved Parameters are not available, the target may restore to Default values. All Pages of MODE SENSE and MODE SELECT shall conform to the Page Descriptor format with the exception of Page 0 (vendor unique Page) which may or may not conform. In any case, if issued, Page 0 shall be sent last. All Pages of MODE SENSE and MODE SELECT other than Page 0, shall conform to the Page Descriptor format. Vendor Unique fields shall be addressed in Vendor Unique Pages 20h through 3Eh, but not within the defined Pages. ============================================================================== Table of Page Codes for Direct Access Devices Page code Meaning 0h Vendor Unique 1h Error Recovery parameters 2h Disconnect/Reconnect Control parameters 3h Direct Access Device Format parameters 4h Rigid Disk Drive Geometry parameters 5h Flexible Disk Drive parameters 6h through 1Fh Reserved 20h through 3Eh Vendor Unique Page formats 3Fh Defined in MODE SENSE only. ============================================================================== Common Command Set for Direct-Access Devices Rev 4b It is recommended that the initiator issue the RESERVE UNIT command prior to executing the MODE SELECT command, then issue the RELEASE UNIT command after completion of the FORMAT UNIT command. This procedure will prevent any other initiator from issuing different MODE SELECT parameters to the unit prior to execution of the FORMAT UNIT command. The initiator may request that the parameters of Pages 1 and 2 be changed at any time. The target may or may not save the block descriptors and Pages for each LUN and for each initiator. If the target supports 8 LUNs and the bus configuration includes 7 hosts, the target would have to save 56 sets of MODE SELECT/ MODE SENSE data. The data for each LUN for each host could be different. A target shall create the CHECK CONDITION Status with Sense Key of UNIT ATTENTION to the first command received from other initiators, when the target has changed Mode Select parameters for that LUN. The change may be due to a MODE SELECT command issued from a different or from the same initiator. Initiators are recommended to save MODE SELECT parameters for each LUN. Targets are recommended to record on disk those MODE SELECT parameters which are necessary to be issued prior to the FORMAT UNIT command. The recording on the LUN disk may or may not include Pages 3 and 4 or 5, depending on the drive type. If these Pages can be saved, they shall be saved during a successfully completed FORMAT UNIT command. Parameters of Pages 1 and 2 that the target implements may or may not be recorded on the device, may or may not be saved by the target, for each LUN, and for all initiators. If these Pages can be saved, they shall be saved during a successfully completed MODE SELECT command issued with the SP (Save Parameters) bit set to one and PF (Page Format) bits set to one. ERROR RECOVERY PARAMETERS. Page code 1h. ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2 |AWRE|ARRE| TB | RC |EEC |PER |DTE |DCR | -----|-----------------------------------------------------------------------| 3 | Retry Count | -----|-----------------------------------------------------------------------| 4 | Correction Span | -----|-----------------------------------------------------------------------| 5 | Head Offset Count | -----|-----------------------------------------------------------------------| 6 | Data Strobe Offset Count | -----|-----------------------------------------------------------------------| 7 | Recovery Time Limit | ============================================================================== A DCR (Disable Correction) bit 0 set to one indicates that error correction shall not be applied in the course of error recovery. Other normal error recovery operations are not affected by this bit. A DCR bit set to zero enables error correction. A DTE (Disable Transfer on Error) bit 1 set to one and if the PER bit is set to one, indicates that the target shall create the CHECK CONDITION status and terminate the data transfer to the initiator immediately upon detection of an error. The Transfer Length is then not exhausted. The data of the block in error, which is the first erring block encountered, may or may not be transferred to the initiator depending upon the setting of the TB bit. The DTE bit can only be set to one by the initiator if the PER bit is set to one. The Common Command Set for Direct-Access Devices Rev 4b target shall create the CHECK CONDITION status with Illegal Request Sense Key, if it receives PER bit of zero and DTE bit set to one. A DTE bit set to zero enables data transfer for any data which can be recovered within the limits of the Error Recovery Flags. Any erring block that would be posted, which is the last recovered block encountered, is not posted until the Transfer Length is exhausted. A PER (Post Error) bit 2 set to one indicates that the target shall enable the reporting of the CHECK CONDITION status for recovered errors, with the appropriate Sense Key. The CHECK CONDITION status shall happen during the data transfer depending either on the DTE bit value or if an unrecoverable error occurred. If multiple errors occur, the REQUEST SENSE data shall report the block address of either the last block on which recovered error occurred or of the first unrecoverable error. A PER bit set to zero indicates that the target shall not create the CHECK CONDITION status for errors recovered within the limits established by the other Error Recovery Flags. Recovery procedures exceeding the limits established by the other Error Recovery Flags shall be posted accordingly by the target. The transfer of data may terminate prior to exhausting the Transfer Length depending on the error and the state of the other Error Recovery Flags. An EEC (Enable Early Correction) bit 3 set to one indicates that the target shall enable the use of the most expedient form of error recovery, such as error correction, before applying retries. Seek or positioning retries and the recovery procedure retries of the message system are not affected by the value of this bit. Targets implementing error correction schemes which do not provide the most expedient form of error recovery should default to zero and report the EEC bit as not changeable in the MODE SENSE Page code 3. EEC and DCR both of one is an invalid request, for which the target shall create the CHECK CONDITION status with Illegal Request Sense Key. An EEC bit set to zero, indicates that the target shall exhaust the defined retry limit prior to enabling error correction. If DCR bit is set to one, the defined retry limit is only to be performed. A RC (Read Continuous) bit 4 set to one requests the target to transfer the entire requested length of data without adding delays which would increase or ensure data integrity (ie. delays caused by the target’s error recovery schemes). This implies that the target may send data which may be erroneous or fabricated in order to maintain a continuous flow of data and avoid delays. The target shall assign priority to this bit over conflicting error control bits (EEC,DCR,DTE,PER) within this byte. Implementors note: Fabricated data may be data already in the buffer or any other target scheme. This bit is typically to be used in Image Processing, Audio or Video applications. A RC bit set to zero, indicates that error recovery operations which cause reasonable delays are acceptable during the data transfer. Data shall not be fabricated. A TB (Transfer Block) bit 5 set to one indicates that the failing data block (recovered or unrecoverable) data shall be transferred to the initiator. A TB bit set to zero indicates that the failing data block (recovered or unrecoverable) data shall not be transferred to the initiator. Implementor Note: In both cases, but particularly when TB is zero, the block address reported in the REQUEST SENSE data shall be of the erring block, not of the preceding block. An ARRE (Automatic Read Reallocation of defective data blocks Enabled) bit 6 of one indicates that the target shall enable automatic reallocation of defective data blocks during READ operations. The execution Common Command Set for Direct-Access Devices Rev 4b of the automatic reallocation is similar to the function of the REASSIGN BLOCKS command, but is initiated at the discretion of the target. The implementation is device specific. An ARRE bit set to zero indicates that the target shall not perform automatic reallocation of defective data blocks during READ operations, but instead shall create the CHECK CONDITION Status with Sense Key of Medium Error upon encountering such defective data blocks. An AWRE (Automatic Write Reallocation of defective data blocks Enabled) bit 7 set to one indicates that the target shall enable automatic reallocation of data blocks during WRITE operations. The execution of the automatic reallocation is similar to the function of the REASSIGN BLOCKS command, but is initiated at the discretion of the target. The implementation is device specific. An AWRE bit set to zero indicates that the target shall not perform automatic reallocation of defective data blocks during WRITE operations, but instead shall create the CHECK CONDITION Status with Sense Key of Medium Error upon encountering such defective data blocks. The following table summarizes all valid modes of operation. ============================================================================== EEC PER DTE DCR Description 0 0 0 0 Retries then Correction are attempted (EEC & DCR off). Recovered and/or corrected data (if any) is transferred with no CHECK CONDITION Status (PER off) at the end of the transfer. -The transfer length is exhausted. Data transfer stops only if no unrecoverable error is encountered. The target shall create CHECK CONDITION status with the appropriate sense key. -The data of the unrecoverable Block (if any), may or may not be transferred to the initiator depending on the setting of the TB bit. 0 0 0 1 Same as (0000) above but No Correction Applied (EEC off, DCR on). 0 0 1 0 Invalid Request (DTE on, PER off) 0 0 1 1 Invalid Request (DTE on, PER off) 0 1 0 0 Report Last Data Block in error at the end of transfer. Retries then Correction (EEC off, DCR off) are attempted and recovered data (if any) is transferred corrected. -The Transfer Length is exhausted if no unrecoverable error occurred (DTE off). -The target creates CHECK CONDITION status with RECOVERED ERROR Sense Key and reports (in the Information bytes field of the Extended Sense data) the last block for which recovered error occurred, if any. (PER on). -The data of the unrecoverable Block (if any), may or may not be transferred to the initiator depending on the setting of the TB bit. 0 1 0 1 Same as (0100) above but No Correction Applied (EEC off, DCR on). ============================================================================== Common Command Set for Direct-Access Devices Rev 4b ============================================================================== EEC PER DTE DCR Description 0 1 1 0 Stop Transfer on First Recovered Error Encountered. Retries then Correction (EEC off, DCR off) are attempted and recovered data (if any) is transferred corrected, but transfer stops (DTE on) after the first recovered or unrecoverable error is detected. -The target creates CHECK CONDITION status (PER on) with RECOVERED ERROR Sense Key on the first block for which a recovered error occurred, if any. Implementor Note : This mode is not recommended to be used if TB is set to zero. It is suggested to use mode 0111 instead if TB is set to zero. 0 1 1 1 Same as (0110) above but no Correction Applied (EEC off, DCR on). -The data of the erring Block (if any), may or may not be transferred to the initiator depending on the setting of the TB bit. 1 0 0 0 Correction then Retries (DCR off, EEC on). Same as (0000) except apply ECC Correction first. 1 0 0 1 Invalid Request (EEC on, DCR on). 1 0 1 0 Invalid Request (DTE on, PER off). 1 0 1 1 Invalid Request (DTE on, PER off)(EEC on, DCR on). 1 1 0 0 Report Last Data Block in error at the end of transfer. Same as (0100) except apply ECC Correction first. 1 1 0 1 Invalid Request (EEC on, DCR on). 1 1 1 0 Stop Transfer on First Recovered Error Encountered. Same as 0110 except Correction then Retries are attempted. 1 1 1 1 Invalid Request (EEC on, DCR on). ============================================================================== Retry Count is the number of times that the target should attempt its read recovery algorithm. Typically, this is performed before applying correction. If both Retry Count and Recovery Time Limit are specified in a MODE SELECT command, the field which specifies the shorter time period of recovery actions shall dominate. In this case, the non-dominant field shall be returned as infinite in subsequent MODE SENSE commands requesting current values. An FFh value indicates that retry counts are unlimited. The limit in this field specifies the maximum recovery action allowed for any individual logical block. If the target does not support this field, it shall return a zero value in the MODE SENSE command. Implementors note: With a target supporting both fields, an initiator wishing to specify a preferred field should set the undesired field to infinite (FFh). Correction Span is the size of the largest read data error, in bits, on which correction may be attempted. If the target does not support this field, it shall return a zero value in the MODE SENSE command. Head Offset Count is a two’s complement value that specifies some incremental offset position from the center of the track which indicate where shall the disk heads move. The effect of this field on WRITE Common Command Set for Direct-Access Devices Rev 4b operations is unspecified. The value shall be applied and be maintained until another MODE SELECT command is successfully completed with a different value. If the target does not support this field, it shall return a zero value in the MODE SENSE command. -A value of zero indicates that no offset is to be applied. -A positive value (i.e. 1,2,..) indicates an increasing distance in the direction of the next (+1) physical track. This next physical track could be towards the innermost track or towards the outermost track, depending upon if track zero was on the outermost or on the innermost track of the drive. -A two’s complemented (i.e., FF,FE,...) value indicates an increasing distance in the opposite direction as of a positive value. This is in the direction of the previous (-1) physical track. The degree of offset for each incremental value and the number of valid steps are device specific. It is recommended that devices support equal incremental positive and negative values. The target shall create the CHECK CONDITION Status with Illegal Request Sense Key if it receives an invalid (greater or lower) offset value than that supported by the device. In this case, the Information bytes of the Extended Sense shall return the positive value of the maximum count that the device supports. Data Strobe Offset Count is a two’s complement value that specifies an incremental position the recovered data strobe shall be adjusted from nominal. The effect of this field on WRITE operations is unspecified. The value shall be applied and be maintained until another MODE SELECT command is successfully completed with a different value. If the target does not support this field, it shall return a zero value in the MODE SENSE command. -A value of zero indicates the nominal position. -A positive value (i.e. 1,2,..) indicates an increasing adjustment in the positive direction as defined by the device (such as moving the data strobe out in time by some number of nanoseconds). -A two’s complemented (i.e., FF,FE,...) value indicates an increasing adjustment in the negative direction. The degree of adjustment for each incremental value and the number of valid steps are device specific. It is recommended that devices support equal incremental positive and negative values. The target shall create the CHECK CONDITION Status with Illegal Request Sense Key if it receives an invalid (greater or lower) strobe offset count value than that supported by the device. In this case, the Information bytes of the Extended Sense may return the positive value of the maximum valid count that the device supports. The target shall return a zero value in the Information bytes if it does not have the capability to return a defined value. Recovery Time Limit is the maximum time that the target shall attempt error recovery actions in order to correctly recover data, if such recovery is allowed in other fields of this page. The field is defined in one (1) milliseconds increments. The target may round the value to its nearest convenient value. Subsequent MODE SENSE commands requested with current values shall return the rounded value. A zero value indicates that no retries are allowed. An FFh value indicates that recovery time is unlimited. The limit in this field specifies the maximum recovery action allowed for any individual logical block. If both Retry Count and Recovery Time Limit are specified in a MODE SELECT command, the field which specifies the shorter time period of recovery actions shall dominate. In this case, the non-dominant field shall be returned as infinite in subsequent MODE SENSE commands requesting current values. Common Command Set for Direct-Access Devices Rev 4b DISCONNECT/RECONNECT CONTROL PARAMETERS. Page code 2h. ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2 | Buffer Full Ratio | -----|-----------------------------------------------------------------------| 3 | Buffer Empty Ratio | -----|-----------------------------------------------------------------------| 4 | Bus Inactivity Limit (MSB) | -----|-----------------------------------------------------------------------| 5 | Bus Inactivity Limit (LSB) | -----|-----------------------------------------------------------------------| 6 | Disconnect Time Limit (MSB) | -----|-----------------------------------------------------------------------| 7 | Disconnect Time Limit (LSB) | -----|-----------------------------------------------------------------------| 8 | Connect Time Limit (MSB) | -----|-----------------------------------------------------------------------| 9 | Connect Time Limit (LSB) | -----|-----------------------------------------------------------------------| 10 | Reserved | -----|-----------------------------------------------------------------------| 11 | Reserved | ============================================================================== Both the ratio parameters are the numerator of a fractional multiplier that has 256 as its denominator. This is advisory to the target. Buffer Full Ratio indicates to the target, on READ commands, how full the buffer shall be prior to reconnecting. Targets that include a larger granular buffer block size shall round down to the nearest whole buffer block. Buffer Empty Ratio indicates to the target, on WRITE commands, how empty the buffer shall be prior to reconnecting to fetch more data. Targets that include a larger granular buffer block size shall round up to the nearest whole buffer block. Bus Inactivity Limit field (bytes 4 and 5) indicates the maximum time in 100 microseconds increments that the target is allowed to maintain the bus busy without handshakes until it shall disconnect. The target may round to its nearest capable value. A setting value of zero indicates that the target is allowed to maintain the bus busy indefinitely without handshakes until it determines to disconnect. Disconnect Time Limit field (bytes 6 and 7) indicates the minimum time in 100 microseconds increments that the target should remain disconnected until it attempts to reconnect. The target may round to its nearest capable value. A setting value of zero indicates that the target is allowed to reconnect immediately. Connect Time Limit field (bytes 8 and 9) indicates the maximum time in 100 microseconds increments that the target should remain connected until it attempts to disconnect. The target may round to its nearest capable value. A setting value of zero indicates that the target is allowed to remain connected indefinitely until it determines to attempt disconnection. Common Command Set for Direct-Access Devices Rev 4b DIRECT ACCESS DEVICE FORMAT PARAMETERS. Page code 3h. ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2 | Tracks per Zone (MSB) | -----|-----------------------------------------------------------------------| 3 | Tracks per Zone (LSB) | -----|-----------------------------------------------------------------------| 4 | Alternate Sectors per Zone (MSB) | -----|-----------------------------------------------------------------------| 5 | Alternate Sectors per Zone (LSB) | -----|-----------------------------------------------------------------------| 6 | Alternate Tracks per Zone (MSB) | -----|-----------------------------------------------------------------------| 7 | Alternate Tracks per Zone (LSB) | -----|-----------------------------------------------------------------------| 8 | Alternate Tracks per volume (MSB) | -----|-----------------------------------------------------------------------| 9 | Alternate Tracks per volume (LSB) | -----|-----------------------------------------------------------------------| 10 | Sectors per Track (MSB) | -----|-----------------------------------------------------------------------| 11 | Sectors per Track (LSB) | -----|-----------------------------------------------------------------------| 12 | Data Bytes per Physical Sector (MSB) | -----|-----------------------------------------------------------------------| 13 | Data Bytes per Physical Sector (LSB) | -----|-----------------------------------------------------------------------| 14 | Interleave (MSB) | -----|-----------------------------------------------------------------------| 15 | Interleave (LSB) | -----|-----------------------------------------------------------------------| 16 | Track Skew Factor (MSB) | -----|-----------------------------------------------------------------------| 17 | Track Skew Factor (LSB) | -----|-----------------------------------------------------------------------| 18 | Cylinder Skew Factor (MSB) | -----|-----------------------------------------------------------------------| 19 | Cylinder Skew Factor (LSB) | -----|-----------------------------------------------------------------------| 20 | SSEC | HSEC | RMB | SURF | INS | RESERVED | -----|-----------------------------------------------------------------------| 21 | Reserved | -----|-----------------------------------------------------------------------| 22 | Reserved | -----|-----------------------------------------------------------------------| 23 | Reserved | ============================================================================== The following information is only valid to be sent to the target prior to the execution of the FORMAT UNIT command. Handling of Defects Fields: The target may or may not accept the exact value requested by the initiator in these fields, but may round to its nearest most convenient value (which value may be zero). In this case, the target shall create the CHECK CONDITION status with ILLEGAL REQUEST Sense Key. The initiator may issue a MODE SENSE command requesting the current Format Parameters Page to be returned, in order to be informed about which value has been set by the target in response to the initially requested value of the MODE SELECT command. Common Command Set for Direct-Access Devices Rev 4b Tracks per Zone indicates that the target shall divide the capacity of the device, prior to format, in equal number of tracks for the purpose of allocating with the next four bytes, an equal number of alternate sectors or tracks per zone for handling defects. The last zone of the device may or may not include the same number of tracks as the previous zone(s). A value of zero means that the sole zone is defined as the whole unit. The capacity of the device is represented by the number of cylinders and number of heads returned in the Page 4 or 5 depending on the device type. Alternate Sectors per Zone indicates the number of sectors that the target shall de-allocate from the initiator addressable blocks during the FORMAT UNIT command. These sectors will be available to the target as replaceable sectors for defective sectors. The method used by the target to access alternate sectors when encountering a defective sector is device specific. A value of zero indicates that no alternate sectors are to be de-allocated or that the MODE SENSE command indicated that the target does not support this field or does not authorize this field to be changeable. Alternate Tracks per Zone indicates the number of tracks that the target shall de-allocate from the initiator addressable blocks during the FORMAT UNIT command. These tracks will be available to the target as replaceable tracks for defective tracks. The method used by the target to access alternate tracks when encountering a defective track is vendor unique. A value of zero indicates that no alternate tracks are to be de-allocated or that the MODE SENSE command indicated that the target does not support this field or does not authorize this field to be changeable. Alternate Tracks per Volume indicates the number of tracks that the target shall de-allocate from the initiator addressable blocks during the FORMAT UNIT command. These tracks will be available to the target as replaceable locations (tracks or sectors) for defect handling. The method used by the target to access these alternate tracks when encountering a defect is vendor unique. A value of zero indicates that no alternate tracks are to be de-allocated or that the MODE SENSE command indicated that the target does not support this field or does not authorize this field to be changeable. When the initiator sets the three fields (Alternate Sectors per Zone, Alternate Tracks per Zone, Alternate Tracks per Volume) to zero, it may request the target to set its own default scheme for handling defects or may request the target not to perform any defect handling. The target may or may not create the CHECK CONDITION status to this condition. Track Format Field: Sectors per Track indicates the number of physical sectors that the target shall allocate per disk track. This implies that the target set an equal data sector size to all sectors accordingly. The value of zero indicates that either the number of Sector per Track varies or that the MODE SENSE command reported that the target does not authorize this field to be changeable or that other mechanism implemented is not specified. Sector Format Field: Data Bytes per Physical Sector indicates the number of data bytes that the target shall allocate per physical sector. This value may be different than the logical block size in the Block Descriptor section of the MODE SELECT data. This implies that the target set an equal number of sectors per track accordingly. The target shall create the CHECK CONDITION status if it determines that the combination of this field and the sectors per track values exceed the physical abilities of the medium. The value of zero indicates that either the number of Data Bytes per Physical sector varies or that the MODE SENSE command reported that the target does not authorize this field to be changeable or that other mechanism implemented is not specified. Interleave is the same parameter passed in the FORMAT UNIT command, and is only returned by the MODE SENSE command. The target shall report this field as non changeable in the corresponding MODE SENSE command. The target shall ignore this field in MODE SELECT commands. Common Command Set for Direct-Access Devices Rev 4b Track Skew Factor indicates the number of physical sectors between the last logical block of one track and the first logical block on the next sequential track of the same cylinder. Cylinder Skew Factor indicates the number of physical sectors between the last logical block of one cylinder and the first logical block on the next sequential cylinder. Drive Type Field: A SSEC bit set to one indicates that the target shall use soft sector formatting. A HSEC bit set to one indicates that the target shall use hard sector formatting. The HSEC bit and the SSEC bit are mutually exclusive in MODE SELECT commands. Possible combinations of MODE SENSE Report Default Values: SSEC HSEC 0 0 Target shall not return this combination 1 0 Target supports Soft sector formatting only 0 1 Target supports Hard sector formatting only 1 1 Target supports both Soft and Hard sector formatting Possible combinations of MODE SENSE Report Changeable Values SSEC HSEC 0 0 Sector formatting Not changeable 1 0 Target shall not return this combination 0 1 Target shall not return this combination 1 1 Target supports both Soft and Hard sector formatting A RMB (Removable) bit set to one indicates that the logical unit is removable. A RMB bit set to zero indicates that the logical unit is not removable. The SURF (Surface) bit indicates how the target shall map the logical block addressing into physical block addressing. A SURF bit set to zero indicates that the target shall allocate progressive addresses to all sectors within a cylinder prior to allocating sector addresses to the next cylinder. A SURF bit set to one indicates that the target shall allocate progressive addresses to all sectors on a surface prior to allocating sector addresses to the next surface. The INS (Inhibit Save) bit 3 byte 20 set to one in MODE SELECT commands indicates that the target shall inhibit the saving of any parameters during the successful completion of the next FORMAT UNIT command. The INS bit set to zero indicates that the parameters of the Pages defined by the Page Codes 3,4 and 5 shall be saved by the target if such pages were indicated to be saveable (by PS bit 7 byte 0 set to one in Page Headers) in preceding MODE SENSE commands. As a reminder: -The Pages defined by Page Codes 3,4 and 5, depending on device type, include all parameters necessary to be indicated to the target prior to the FORMAT UNIT command. The saving, if implemented, shall therefore be performed only during the FORMAT UNIT command and not at any other time. -All other Saveable Pages not affecting the format may be saved in following MODE SELECT commands if the SP bit is set to one in the CDB of these MODE SELECT commands. Common Command Set for Direct-Access Devices Rev 4b RIGID DISK DRIVE GEOMETRY PARAMETERS Page Code 4h ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2 | Number of Cylinders (MSB) | -----|-----------------------------------------------------------------------| 3 | Number of Cylinders | -----|-----------------------------------------------------------------------| 4 | Number of Cylinders (LSB) | -----|-----------------------------------------------------------------------| 5 | Number of Heads | -----|-----------------------------------------------------------------------| 6 | Starting Cylinder-Write Precompensation (MSB) | -----|-----------------------------------------------------------------------| 7 | Starting Cylinder-Write Precompensation | -----|-----------------------------------------------------------------------| 8 | Starting Cylinder-Write Precompensation (LSB) | -----|-----------------------------------------------------------------------| 9 | Starting Cylinder-Reduced Write Current (MSB) | -----|-----------------------------------------------------------------------| 10 | Starting Cylinder-Reduced Write Current | -----|-----------------------------------------------------------------------| 11 | Starting Cylinder-Reduced Write Current (LSB) | -----|-----------------------------------------------------------------------| 12 | Drive Step Rate (MSB) | -----|-----------------------------------------------------------------------| 13 | Drive Step Rate (LSB) | -----|-----------------------------------------------------------------------| 14 | Landing Zone Cylinder (MSB) | -----|-----------------------------------------------------------------------| 15 | Landing Zone Cylinder | -----|-----------------------------------------------------------------------| 16 | Landing Zone Cylinder (LSB) | -----|-----------------------------------------------------------------------| 17 | Reserved | -----|-----------------------------------------------------------------------| 18 | Reserved | -----|-----------------------------------------------------------------------| 19 | Reserved | ============================================================================== This Page is mainly intended for defining parameters of rigid disk drives, but may be used for flexible disk drives when applicable. The target shall create the CHECK CONDITION Status with ILLEGAL REQUEST Sense Key if it receives values in Number of Cylinders and Number of Heads fields that are greater than the defaults values returned by the MODE SENSE command or greater than the actual values. The target shall create the CHECK CONDITION Status with ILLEGAL REQUEST Sense Key if it receives values in Starting Cylinder Write Precompensation or Reduced Write Current fields that are greater than the Number of Cylinders field. Drive Step Rate is expressed in units of 100 nanoseconds. The target shall use the lowest step rate, greater than or equal to the step rate required, that it is capable of implementing. A value of zero indicates that the target is required to set its default value. Common Command Set for Direct-Access Devices Rev 4b The Landing Zone Cylinder field indicates two’s complement location where the target shall position the disk heads prior to stop the spindle with the START/STOP command. This field is only meaningful with drives which do not automatically seek to the Landing Zone before stopping the spindle. A negative value steps the device outside of the recorded cylinders. A value greater than the number of cylinders steps the device beyond the recorded cylinders towards the spindle. Common Command Set for Direct-Access Devices Rev 4b FLEXIBLE DISK DRIVE PARAMETERS. Page Code 5h ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2 | Transfer rate (MSB) | -----|-----------------------------------------------------------------------| 3 | Transfer rate (LSB) | -----|-----------------------------------------------------------------------| 4 | Number of Heads | -----|-----------------------------------------------------------------------| 5 | Sectors per Track | -----|-----------------------------------------------------------------------| 6 | Data Bytes per Physical Sector (MSB) | -----|-----------------------------------------------------------------------| 7 | Data Bytes per Physical Sector (LSB) | -----|-----------------------------------------------------------------------| 8 | Number of Cylinders (MSB) | -----|-----------------------------------------------------------------------| 9 | Number of Cylinders (LSB) | -----|-----------------------------------------------------------------------| 10 | Starting cylinder-Write Precompensation (MSB) | -----|-----------------------------------------------------------------------| 11 | Starting cylinder-Write Precompensation (LSB) | -----|-----------------------------------------------------------------------| 12 | Starting cylinder-Reduced Write Current (MSB) | -----|-----------------------------------------------------------------------| 13 | Starting cylinder-Reduced Write Current (LSB) | -----|-----------------------------------------------------------------------| 14 | Drive Step Rate (MSB) | -----|-----------------------------------------------------------------------| 15 | Drive Step Rate (LSB) | -----|-----------------------------------------------------------------------| 16 | Drive Step Pulse Width | -----|-----------------------------------------------------------------------| 17 | Head Settle Delay | -----|-----------------------------------------------------------------------| 18 | Motor On Delay | -----|-----------------------------------------------------------------------| 19 | Motor Off Delay | -----|-----------------------------------------------------------------------| 20 | TRDY | Reserved | -----|-----------------------------------------------------------------------| 21 | Head Load Delay | -----|-----------------------------------------------------------------------| 22 | Starting Sector Number, Side Zero | -----|-----------------------------------------------------------------------| 23 | Starting Sector Number, Side One | ============================================================================== This Page is mainly intended for defining parameters of flexible disk drives, but may be used for rigid disk drives when applicable. Common Command Set for Direct-Access Devices Rev 4b Transfer Rate (byte 2 and 3) is expressed in kilobits per second. As typical examples, the value in byte 2 and 3 shall be : -00FAh to select 250 kbit/second transfer rate. -012Ch to select 300 kbit/second transfer rate. -01F4h to select 500 kbit/second transfer rate. -03E8h to select 1 megabit/second transfer rate. -07D0h to select 2 megabit/second transfer rate. -1388h to select 5 megabit/second transfer rate. Motor On Delay : This function depends on the state of the TRDY bit. If TRDY is not set, the Motor On Delay indicates the amount of time in 1/10 second which the target will delay, before trying to access data after asserting the motor on signal to the drive. If TRDY is set , the Motor On Delay indicates the amount of time which the target will delay for drive ready status before aborting a disk access. Motor Off Delay indicates the amount of time in 1/10 second which the target will delay before de-asserting the motor on signal to the drive after the target has become idle. A value of FFh indicates that the motors are to be left on. In this case, the motors may still be controlled by the START/STOP UNIT command. A TRDY (True Ready) bit of one indicates that the drive provides a ready signal which indicates that the spindle motor is up to speed and the drive and medium are ready to transmit and receive data. In this case, the target may attempt to access the disk immediately upon sensing drive ready. Drive Step Rate and Step Pulse Width are expressed in units of 1 microsecond. The target shall round up to its next supported value. CERTIFICATION PATTERN. Page code 6h. ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2-n | Reserved | ============================================================================== This Page is intended to provide the pattern to be used by the target to fill out the data fields of the logical blocks during the FORMAT UNIT command. The following is to be defined during subsequent meetings. Various schemes may be requested, all are vendor unique. Some examples may be: -Fixed pattern of zero -Fixed pattern of one -Fixed and repetitive pattern of a defined value and of a defined length -Pattern becoming variable starting with a fixed value and increasing by a defined value for a defined length -Pattern becoming variable starting with a fixed value and shifting by a certain number of bits for a defined length -Blocks filled with their Logical block address repeated -Blocks filled with their Physical block address (cyl, head, sector) repeated Common Command Set for Direct-Access Devices Rev 4b 8.1.8 RESERVE UNIT Command Extent Reservation is optional. 8.1.9 RELEASE UNIT Command Extent Release is required only if the Extent Reservation Option is implemented. 8.1.7 MODE SENSE Command Peripheral Device Type: Direct Access Operation Code Type: Optional Operation Code: 15h Table 8-13: MODE SENSE Command ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Operation Code | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | PCF | Page Code | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Parameter List Length | -----|-----------------------------------------------------------------------| 5 | Vendor Unique | Reserved | Flag | Link | ============================================================================== The MODE SENSE command (Table 8-18) provides a means for a target to report its medium, logical unit, target or peripheral device parameters to the initiator. It is a complementary command to the MODE SELECT command. If the MODE SELECT command is implemented, it is Required that the MODE SENSE command be also implemented. It is recommended that the target implements this optional command, even if the MODE SELECT command is not implemented. It is recommended that the MODE SENSE command be issued prior to the MODE SELECT command. The PCF (Page Control Field) bits 7 and 6 of byte 2 defines the type of Page Parameter values to be returned. Either: -Current -Changeable -Default -or Saved The Page Code bits 5 through 0 of byte 2 indicates which Page(s) to return. The Allocation Length specifies the number of bytes that the initiator has allocated for returned MODE SENSE data. An Allocation Length of zero indicates that no MODE SENSE data shall be transferred. This condition shall not be considered as an error. Any other value indicates the maximum number of bytes that shall be transferred. The target shall terminate the DATA IN phase when the Allocation Length have been Common Command Set for Direct-Access Devices Rev 4b transferred or when all available MODE SENSE data have been transferred to the initiator, whichever is less. The MODE SENSE data (TABLE 8-19) contains a four-byte header, followed by zero or more eight-byte block descriptors, followed by zero or more Pages. Page Code Field bits 7 and 6 byte 2 of the CDB. 7 6 0 0 Report Current Values -If the Page Code is equal to 3Fh, all Pages (except Page 0) implemented by the target are to be returned to the initiator with fields and bits set to Current values. Page zero, if supported, shall be returned last. -If the Page Code is different than 3Fh, the Page defined by the Page Code, if supported by the target is to be returned to the initiator with fields and bits set to Current values. The Current values are either: -as set in the last successfully completed MODE SELECT command. -or are identical to the Saved values if saving is available and if no MODE SELECT command were yet issued since the last power on. -or are identical to the Default values if no saving is available or if no Saved values are available. -Fields and bits not supported by the target shall be set to zero. The Page Length byte value of each Page returned by the target indicates up to which field are supported within the particular Page. 0 1 Report Changeable Values -If the Page Code is equal to 3Fh, all Pages (except Page 0) implemented by the target are to be returned to the initiator with bits and fields that are allowed to be changed by the initiator set to one. Fields and bits not allowed to be changed by the initiator shall be set to zero. Page zero, if supported, shall be returned last. -If the Page Code is different than 3Fh, the Page defined by the Page Code, if supported by the target, is to be returned to the initiator with bits and fields that are allowed to be changed by the initiator set to one. Fields and bits not allowed to be changed by the initiator shall be set to zero. -If no bits or fields are changeable within a Page, the target may or may not return bytes 0 and 1 of the Page. If the target returns these two bytes, the Page Length byte value shall be set to zero by the target. -The Page Length byte value of each Page returned by the target indicates up to which field are supported within the particular page. 1 0 Report Default Values -If the Page Code is equal to 3Fh, all Pages (except Page 0) implemented by the target are to be returned to the initiator with fields and bits set to the target’s or device’s default values. Page zero, if supported, shall be returned last. -If the Page Code is different than 3Fh, the Page defined by the Page Code, if supported by the target, is to be returned to the initiator with fields and bits set to the target’sor device’s default values. -Fields and bits not supported by the target shall be set to zero. The Page Length byte value of each Page returned by the target indicates up to which field are supported within the particular page. -The value of the fields returned with this code is intended to avoid confusion over whether the value of zero is the default or the non supported value. Common Command Set for Direct-Access Devices Rev 4b 1 1 Report Saved Values -If the Page Code is equal to 3Fh, all Pages (except Page 0) implemented by the target are to be returned to the initiator with fields and bits set to the saved values if saving is supported by the target. Page zero, if supported, shall be returned last. -If the Page Code is different than 3Fh, the Page defined by the Page Code, if code supported by the target, is to be returned to the initiator with fields and bits set to the saved values if saving is supported by the target. The Saved values are either: -the values saved during the last successfully completed FORMAT UNIT or MODE SELECT commands. -or identical to the Default values if no saving possibility is available. -The mode of saving is vendor unique, the values may either be recorded on disk or saved in another matter. Fields and bits not supported by the target shall be set to zero. The Page Length byte value of each Page returned by the target indicates up to which field are supported within the particular page. Current values may be modified by successfully completed MODE SELECT commands. Saved values may only be updated by a successfully completed FORMAT UNIT command. A FORMAT UNIT command completing with No CHECK CONDITION status shall indicate that the Saved values have been successfully saved. An initiator may request a particular Page to be returned by the target by selecting its code in byte two of the CDB. Page Codes (bits 0 through 5 of byte 2 of the CDB) ============================================================================== Page code Meaning 0h Vendor Unique (unspecified) 1h Error Recovery parameters 2h Disconnect/Reconnect Control parameters 3h Direct Access Device Format parameters 4h Rigid Disk Drive Geometry parameters 5h Flexible Disk Drive parameters 6h through 1Fh Reserved 20h through 3Eh Vendor Unique Page formats 3Fh Return all Pages to the initiator. See PCF bit configuration. Page Code valid for MODE SENSE commands only. ============================================================================== The target shall return the same Page Length value in each Page that it supports with the 3Fh Page Code whatever the value of each bit of the PCF field is. Common Command Set for Direct-Access Devices Rev 4b TABLE 8-19: MODE SENSE Parameter List ============================================================================== Byte | MODE SENSE Header | ============================================================================== 0 | Sense Data Length | -----|-----------------------------------------------------------------------| 1 | Medium Type | -----|-----------------------------------------------------------------------| 2 | WP | Reserved | -----|-----------------------------------------------------------------------| 3 | Block Descriptor Length | ============================================================================== | Block Descriptor(s) | ============================================================================== 0 | Density Code | -----|-----------------------------------------------------------------------| 1 | Number of Blocks (MSB) | -----|-----------------------------------------------------------------------| 2 | Number of Blocks | -----|-----------------------------------------------------------------------| 3 | Number of Blocks (LSB) | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Block Length (MSB) | -----|-----------------------------------------------------------------------| 6 | Block Length | -----|-----------------------------------------------------------------------| 7 | Block Length (LSB) | ============================================================================== | Page Descriptor(s) | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page Length in bytes | -----|-----------------------------------------------------------------------| 2-n | Refer to each page | ============================================================================== | Vendor Unique Parameter(s) | ============================================================================== 0 _ n| Vendor Unique | | Parameter Byte(s) | ============================================================================== The Sense Data Length byte specifies the length in bytes of the following MODE SENSE data that is available to be transferred during the DATA IN phase. The Sense Data Length byte shall not include itself. If the Allocation Length of the CDB is too small to transfer all of the Sense Data Length, the Sense Data Length shall not be adjusted to reflect the truncation. Refer to the SCSI draft standard for the code values of the Medium Type field and of the Density Code field. Optional additional blocks of parameters called "Pages" may be sent to the target in the Data Out phase of the MODE SELECT command, following either: -the MODE SELECT Header, if the Block Descriptor length is set to zero. -or all Block Descriptors, if the Block Descriptor length is different than zero. The Block Descriptor Length shall not include the length of the Pages. Each defined Page is preceded by a Header of two bytes defining the Page Code and the length of the page. Following the Header the Pages are separated into sub-blocks containing a list of related flags and/or values. Common Command Set for Direct-Access Devices Rev 4b PS (Parameters Saveable) bit 7 byte 0 of each Page Header set to one by the target indicates that the supported parameters can be saved by the target. PS set to zero indicates that the supported parameters cannot be saved by the target. Bits 6 of byte 0 is reserved. The Page Code identifies the meaning of the following bytes in the Page. The Page Code is either defined, reserved or vendor unique. The parameters in the defined Pages are classified in priority to ease implementation by the target. The Page Length indicates the number of bytes that the target supports in each Page. The Page Length value of each defined page, shall not include the Page Length byte. The target may return in the Pages of the MODE SENSE commands as many consecutive bytes that it supports, for each Page that it supports, without splitting fields of multiple bytes. The Page Length shall be set in the pages of the MODE SELECT commands to the exact same value (zero value included) returned by the target in the MODE SENSE Page Length bytes. Otherwise, the target shall create CHECK CONDITION status with the Sense Key of ILLEGAL REQUEST. The initiator shall issue a MODE SENSE command requesting the target to return all Changeable values (PCF field configuration 0 1 and Page Code 3Fh in byte 2 of the MODE SENSE CDB) prior to issuing any MODE SELECT commands, in order to find out which Pages are implemented by the target and the length of each Pages for that particular LUN. Vendor Unique fields shall be addressed in Vendor Unique Pages 20h through 3Eh, but not within the defined or reserved pages. It is highly recommended not to use Page 0 as vendor unique page for new development. After a power on or reset, following are the actions to be taken by the target following MODE SENSE commands: If MODE SENSE is requesting: Target shall: Default Values Report Default Values Saved Values Report existing valid restore of parameters, or Execute a restore of parameters if not previously performed yet,or report Drive Not Ready if unable to yet access the specific location on the drive where the saved values have been stored. Current Values Report a valid set of saved parameters if available, or Execute a restore of parameters if not previously performed yet, or report Drive Not Ready if unable to yet access the specific location on the drive where the saved values have been stored. or attempt to identify the parameters if no saving is available (such as cyl., track, sector) or if the above is unsuccessful, it is legitimate to report Default values. 7.1.6 SEND DIAGNOSTIC Command DevOfl and UnitOfl bits are optional. Common Command Set for Direct-Access Devices Rev 4b 8.1.x READ DEFECT DATA Command Peripheral Device Type: Direct Access Operation Code Type: Optional Operation Code: 37h Table 8-xx: READ DEFECT DATA Command ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Operation Code | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | RESERVED | P | G | Defect List Format | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Allocation Length (MSB) | -----|-----------------------------------------------------------------------| 8 | Allocation Length (LSB) | -----|-----------------------------------------------------------------------| 9 | Vendor Unique | Reserved | Flag | Link | ============================================================================== The READ DEFECT DATA command requests that the target transfer the medium defect data to the initiator. The meaning of bits 0 through 2 of byte 2 is similar to the bit definition of the bits 0 through 2 of the byte 1 of the FORMAT UNIT command. The initiator indicates with this field a preferred format for the defect list to be returned by the target. This Defect List Format field is intended for those targets capable of returning various formats. A target unable to return various formats may return its default format and create the CHECK CONDITION status with RECOVERED ERROR Sense Key at the end of the Read Defect Data transfer. -The P bit set to one indicates that the initiator requests that the Primary list of defects be returned. The P bit of zero indicates that the target shall not return the Primary list of defects. -The G bit set to one indicates that the initiator requests that the Growing list of defects be returned. The target shall include the Certification list of defects, if implemented, to be returned with this selection. The G bit of zero indicates that the target shall not return the Growing list of defects. -With bits P and G both set to one, the target is requested to return the primary and the growing list of defects. The target shall determine the order in which the lists are to be returned and shall determine if the lists will be merged or not. -With bits P and G both set to zero, the Defect List Header is only to be returned. The Allocation Length specifies the number of bytes that the initiator has allocated for returned READ DEFECT DATA. An Allocation Length of zero indicates that no READ DEFECT DATA shall be transferred. Any other value indicates the maximum number of bytes that shall be transferred. The target shall terminate the DATA IN phase when the Allocation Length have been transferred or when all available READ DEFECT DATA have been transferred to the initiator, whichever is less. Common Command Set for Direct-Access Devices Rev 4b The READ DEFECT DATA contains a four byte header, followed by zero or more defect descriptors. Table 8-xx: DEFECT LIST HEADER ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | RESERVED | -----|-----------------------------------------------------------------------| 1 | RESERVED | P | G | Defect List Format | -----|-----------------------------------------------------------------------| 2 | Defect List Length (MSB) | -----|-----------------------------------------------------------------------| 3 | Defect List Length (LSB) | ============================================================================== The meanings of bits 0 through 2 of byte 1 are similar to the Defect List Format in Table 8-4 of the FORMAT UNIT command. The bits P, G and the Defect List Format indicate which defect list is actually returned by the target. The format of the defect descriptors, if the Defect list length is different than zero, are shown in Table 8-5, 8-6, 8-7 in the FORMAT UNIT command. The length of each defect descriptor may be four bytes or eight bytes depending upon the Defect List format code. The defect list length specifies the total length in bytes of the defect descriptors that follow. The Defect List Length is equal to four or eight times the number of defect descriptors. If the Allocation Length of the CDB is too small to transfer all of the defect descriptors, the Defect List Length shall not be adjusted to reflect the truncation. The target shall not create a CHECK CONDITION status. It is recommended that the initiator compares the Defect List Length to the Allocation Length to ensure that it did not receive a partial list due to a too small Allocation Length. The defect descriptors may or may not be sent in ascending order. The initiator may be informed about the exact number of defects by dividing the Defect List Length by the Defect Descriptor Length. Common Command Set for Direct-Access Devices Rev 4b 7.2.3 WRITE BUFFER Command Peripheral Device Type: All Operation Code Type: Optional Operation Code: 3Bh Table 7-22: WRITE BUFFER Command ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Operation Code | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | BCV | -----|-----------------------------------------------------------------------| 2 | Vendor Unique | -----|-----------------------------------------------------------------------| 3 | Vendor Unique | -----|-----------------------------------------------------------------------| 4 | Vendor Unique | -----|-----------------------------------------------------------------------| 5 | Vendor Unique | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Byte Transfer Length (MSB) | -----|-----------------------------------------------------------------------| 8 | Byte Transfer Length (LSB) | -----|-----------------------------------------------------------------------| 9 | Vendor Unique | Reserved | Flag | Link | ============================================================================== The WRITE BUFFER Command is used in conjunction with the READ BUFFER command as a diagnostic function for testing the target’s buffer memory and the SCSI bus integrity. There shall be no access to the medium during the execution of this command. The Byte Transfer Length specifies the maximum number of bytes to be transferred to and retained in the target’s buffer. The Byte Transfer Length contains a four byte header, followed by the WRITE BUFFER data. A Byte Transfer Length of zero indicates that no Write Buffer Header and no WRITE BUFFER data shall be transferred. This condition shall not create the CHECK CONDITION status. Up to 65,535 bytes of data may be transferred including four bytes of header and up to 65,531 bytes of WRITE BUFFER data. If the Byte Transfer Length is greater than the Available Length plus four reported by the READ BUFFER command , the target shall create the CHECK CONDITION status with the Sense Key of ILLEGAL REQUEST. In this case no data shall be transferred from the initiator. It shall not be considered an error to request a Byte Transfer Length less than the Available Length. BCV (Buffer Control Valid) bit 0 byte 1 set to one indicates that bytes 2 through 6 are vendor unique. It is recommended to use bytes 2 through 6 to specify buffer number and/or buffer address. A large Byte Transfer Length greater than 65,531 bytes may then be written by various WRITE BUFFER commands with different buffer numbers or addresses. BCV of zero indicates that bytes 2 through 6 are reserved. Common Command Set for Direct-Access Devices Rev 4b Table 7-24: Write Buffer Data Header ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | ============================================================================== Condition Sense Key Byte Transfer length greater ILLEGAL REQUEST Sense Key than the sum of the Available Length added to the 4 bytes of Read Buffer Header. Target reset or medium change UNIT ATTENTION with either additional sense code 28h, 29h, or 30h. since last command from this initiator. Common Command Set for Direct-Access Devices Rev 4b 7.2.4 READ BUFFER Command Peripheral Device Type: All Operation Code Type: Optional Operation Code: 3Ch Table 7-23: READ BUFFER Command ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Operation Code | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | BCV | -----|-----------------------------------------------------------------------| 2 | Vendor Unique | -----|-----------------------------------------------------------------------| 3 | Vendor Unique | -----|-----------------------------------------------------------------------| 4 | Vendor Unique | -----|-----------------------------------------------------------------------| 5 | Vendor Unique | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Allocation Length (MSB) | -----|-----------------------------------------------------------------------| 8 | Allocation Length (LSB) | -----|-----------------------------------------------------------------------| 9 | Vendor Unique | Reserved | Flag | Link | ============================================================================== The READ BUFFER Command may be used in conjunction with the WRITE BUFFER command as a diagnostic function for testing the target’s data buffer memory and the SCSI bus integrity. There shall be no access to the medium during the execution of this command. The Allocation Length specifies the maximum number of bytes that the initiator has allocated for returned data. The Allocation Length contains a four byte header, followed by the READ BUFFER data called Available Length. The Available Length is determined by the target. An Allocation Length of zero indicates that no Read Buffer Header and no READ BUFFER data shall be transferred. This condition shall not create the CHECK CONDITION status. This data is to be used by the initiator for comparison with the data pattern sent during the WRITE BUFFER command. Up to 65,535 bytes may be requested to be transferred including four bytes of header and up to 65,531 bytes of READ BUFFER data. If the Allocation Length is greater than the Available Length added to the four bytes of Read Buffer Header, the Read Buffer Header and the Available Length shall be transferred to the initiator. It shall not be considered an error to request an Allocation Length less than the Available Length. The target shall terminate the DATA IN phase when the Allocation Length have been transferred or when the Read Buffer Header and the Available Length have been transferred to the initiator, whichever is less. BCV (Buffer Control Valid) bit 0 byte 1 set to one indicates that bytes 2 through 6 are vendor unique. It is recommended to use bytes 2 through 6 to specify buffer number and/or buffer address. A large Available Length greater than 65,531 bytes may then be read by various READ BUFFER commands with different buffer numbers or addresses. BCV of zero indicates that bytes 2 through 6 are reserved. Common Command Set for Direct-Access Devices Rev 4b Table 7-25: Read Buffer Data Header ============================================================================== Bit|7 |6 |5 |4 |3 |2 |1 |0 | Byte| | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Available Length (MSB) | -----|-----------------------------------------------------------------------| 3 | Available Length (LSB) | ============================================================================== It is recommended that the initiator issues the RESERVE UNIT command to all Logical Unit of a target prior to the WRITE BUFFER command, and issues the RELEASE UNIT command after the READ BUFFER command is completed, in order to avoid corruption of the target’s buffer by another initiator. Another recommendation is to link the above commands and not allowing disconnection during the process to guarantee that the data buffer be not corrupted by uncompleted commands issued from the same initiator to other LUNs using the same buffer. Condition Sense Key Target reset or medium change UNIT ATTENTION with either additional sense code 28h, 29h or 30h. since last command from this initiator. Buffer corrupted MISCOMPARE Common Command Set for Direct-Access Devices Rev 4b SCSI ERROR CONDITIONS This section describes the various SCSI bus related errors which can occur during the execution of a command and the actions taken by the target in response to these errors. A proper handling of the SCSI bus related errors is by the implementation of : -most messages of the Error Recovery Set, by both, target and initiator. -Bus Parity enabled in both, target and initiator. 5.6.1 Target Mode Error Conditions Under several error conditions, the target may change the phase to BUS FREE, without correctly terminating the command (i.e. No Disconnect or Command Complete messages sent to the initiator). The target shall then clear all information regarding the command, to the exception of Sense Data (if any), and shall not attempt to reconnect to the initiator. The initiator shall consider this as a catastrophic error. The initiator may issue a REQUEST SENSE command attempting to recover further information concerning the catastrophic error. 5.6.1.1 Message Out Phase Parity Error Parity is optional, the following does not apply to those SCSI devices communicating on the bus and which are not configured with Parity enabled. When the target detects a Parity error during the MESSAGE OUT Phase, it may retry the MESSAGE OUT phase using the following sequence (see section 5.1.9.2): 1) Continue the REQ/ACK handshakes until the initiator negates ATN (all message bytes received). 2) Notify the initiator to resend all previous Message Out message bytes within the current phase, by not changing the phase and by asserting REQ. 3) The initiator shall then resend all previous message bytes. If the message is not received correctly, the target may process the error using one of the following sequences: 1) Immediately go to BUS FREE phase with no Sense Key/ Sense Code information set. 2) Terminate the present command with a CHECK CONDITION status and set the Sense Key/Sense Code to "Aborted Command/SCSI Interface Parity Error". This error does not prevent the initiator from retrying the command. Note: This method can only be used, if the addressed LUN is known from an Identify message or from the LUN field in the CDB. 5.6.1.2 Command Phase Parity Error Parity is optional, the following does not apply to those SCSI devices communicating on the bus and which are not configured with Parity enabled. When the target detects a parity error during the COMMAND phase, it may retry the COMMAND Phase using the following sequence : 1) Change the phase to MESSAGE IN, send the initiator a Restore Pointers message to reset the command pointer to the byte 0 of the command. 2) Attempt to receive all command bytes over. If the command is not received successfully, the target will abort the command using one of the following sequences: 1) Immediately go to the BUS FREE Phase with No Sense Key/ Sense Code information set. 2) Terminate the command with a CHECK CONDITION status and set the Sense Key/Sense Code to "Aborted Command/ SCSI Interface Parity Error". This error does not prevent the initiator from retrying the command. Note: This method can only be used, if the addressed LUN is known from an Identify message. Common Command Set for Direct-Access Devices Rev 4b 5.6.1.3 Data Out Phase Parity Error Parity is optional, the following does not apply to those SCSI devices communicating on the bus and which are not configured with Parity enabled. When the target detects a parity error during the DATA OUT phase, it may retry the DATA OUT Phase using the following sequence: 1) Change the phase to MESSAGE IN send to the initiator the Restore Pointers message to reset the data pointer to the first byte. 2) Change the phase to DATA OUT to receive the data over again. If the data is not received successfully, the target will terminate the command with a CHECK CONDITION status and set the Sense Key/Sense Code to "Aborted Command/ SCSI Interface Parity Error". This error does not prevent the initiator from retrying the command. 5.6.1.4 Initiator Detected Error Message If the target receives an "Initiator Detected Error" message, it may retry the previous operation using the following sequence: 1) Change the phase to MESSAGE IN, send to the initiator the Restore Pointers message. 2) Return to the phase just prior to the receipt of the "Initiator Detected Error" message and retry the operation. If the operation cannot be completed successfully, the target will abort the command using one of the following sequences: 1) Immediately go to the BUS FREE Phase with no Sense Key/ Sense Code information set. 2) Terminate the current command with a CHECK CONDITION status and set the Sense Key/Sense Code to "Hardware error or Aborted Command/Initiator Detected Error". This error does not prevent the initiator from retrying the command. 5.6.1.5 Rejected Messages When the target receives a "Message Reject" message from the initiator, it may retry the operation by sending the original message again. If the message cannot be sent successfully, the target will take the following action, based on which message was rejected. Command Complete: The target shall go to BUS FREE phase and not consider this as an error. Disconnect: The target shall not disconnect and shall continue the current command. This condition does not preclude the target from attempting to disconnect at a later time. Note: The target shall not send the Disconnect message to an initiator which indicated previously in the Identify message that it does not support the disconnect/ reconnect option. Identify: Sent to reconnect. The target shall immediately go to the BUS FREE phase and abort the command. No further reconnection shall be attempted, and no STATUS or MESSAGE IN phase with Command Complete message shall be created by the target. The target shall set the Sense Key/Sense Code to "Hardware Error or Aborted Command/ Message Reject Error". Linked Command Complete or Linked Command Complete with Flag: The target shall immediately go to the BUS FREE phase and shall not attempt to change the phase to COMMAND phase. The link shall be broken. The target shall set the Sense Key/Sense Code to "Hardware Error or Aborted Command/ Message Reject Error". Common Command Set for Direct-Access Devices Rev 4b Message Reject: The target shall immediately terminate the command with CHECK CONDITION status and set the Sense Key/Sense Code to "Hardware Error or Aborted Command/ Message Reject Error". Restore Pointers: Since the Restore Pointers message is normally used during retries or error recovery, the target shall shall abort the retry or recovery attempt, shall assume that the error is unrecoverable, then complete the command according to the error condition. Save Data Pointer: The target shall assume that the initiator does not support the Save Data Pointer message, shall not attempt to disconnect from the bus, but shall complete the command. Synchronous Data Transfer: The target shall assume that the initiator does not support the Synchronous Transfer mode, and shall continue the command execution using asynchronous transfer. 5.6.1.6 Initiator Message Parity Error When the target receives a Message Parity Error message from the initiator, it may retry the operation by sending the original message again once. If the message cannot be sent successfully, the target shall immediately go to the BUS FREE phase and abort the current SCSI command. No further reconnection shall be attempted, no status or Command Complete message shall be returned for the command. The target shall set the Sense Key/Sense Code to " Hardware Error or Aborted Command/ SCSI Interface Parity Error". 5.6.1.7 Reselection Timeout When the target attempts to reselect to the initiator and the initiator does not respond within a Selection Timeout Delay, the reselection shall be aborted. The target may attempt reselection one or more times. The target shall determine after how many attempts to abort the command. No further reconnection shall be attempted and no status or Command Complete message shall be created for the command. The target shall set Sense Key/Sense Code to " Hardware Error or Aborted Command/ Select-Reselect Failed". Implementors Note: The initiator shall implement an overall command timeout delay to detect this error. 5.6.1.8 Internal Target Errors If an error occurs within the target which is related to the SCSI hardware or firmware, the target shall terminate the present command with a CHECK CONDITION status and set the Sense Key/Error Code to "Hardware Error or Aborted Command/Internal Controller Error". This error does not prevent the initiator from retrying the command. *********************************************************************************** END OF DOCUMENT ***********************************************************************************