# SCSI-2 Spec - All device types

8.1 Model for all device typesThis model describes some of the general characteristics expected of most SCSI devices. It is not intended to define any requirements nor is it intended to alter any requirements defined elsewhere in this International Standard. Clause 7 also contains model information pertaining to all device types.

### 8.1.1 SCSI addresses

There are two levels of addresses within the SCSI architecture: the SCSI device address and the logical unit number or target routine number.

#### 8.1.1.1 SCSI device address

SCSI devices occupy (i.e. respond to) one address on the SCSI bus. Generally, the SCSI device provides a means (e.g. switches, jumpers) to select one of the eight available addresses (0 through 7). This address is used during bus arbitration and selection or reselection of SCSI devices. Each device on the SCSI bus is assigned a unique address.

Normally, the SCSI device address is set when the system is configured and it remains static thereafter. Some systems and devices provide vendor- specific means to alter this address at other times.

#### 8.1.1.2 Logical units

Each target has one or more logical units, beginning with logical unit zero. There is a maximum of eight logical units. These logical units are usually mapped directly to peripheral devices, but they may be a portion of a peripheral device or may comprise multiple peripheral devices.

An initiator can determine whether a target implements a logical unit by issuing an INQUIRY command and examining the returned peripheral qualifier and peripheral device type.

The concept of a logical unit is not defined for an initiator. (An SCSI device may implement both the initiator role and the target role. In this case logical unit(s) are defined only for the target role.)

#### 8.1.1.3 Target routines

An optional feature of the SCSI architecture permits each target to have one or more target routines, beginning with target routine number zero. There is a maximum of eight target routines. These target routines are processes that execute directly on the target and are not associated with a particular logical unit or peripheral device. Target routines are addressed using the LUNTAR bit of the IDENTIFY message (see

Target routines are principally intended to return information about the target and the only valid commands are INQUIRY and REQUEST SENSE.

7.6) is established, the initiator that received the error should issue a REQUEST SENSE command to receive the sense data describing what caused the contingent allegiance condition. If the initiator issues some other command, the sense data is lost.

### 8.1.2 Commands implemented by all SCSI devices

This standard defines four commands that all SCSI-2 targets implement - INQUIRY, REQUEST SENSE, SEND DIAGNOSTIC, and TEST UNIT READY. These commands are used to configure the system, to test targets, and to return important information concerning errors and exception conditions.

#### 8.1.2.1 Using the INQUIRY command

The INQUIRY command may be used by a system to determine the configuration of the SCSI bus. Target devices respond with information that includes their type and standard level and may include the vendor's identification, model number and other useful information. It is recommended that SCSI targets be capable of returning this information (or whatever part of it that is available) upon completing power-on initialization. An SCSI device may take longer to get certain portions of this information, especially if it retrieves the information from the medium.

#### 8.1.2.2 Using the REQUEST SENSE command

Whenever a contingent allegiance condition (see

#### 8.1.2.3 Using the SEND DIAGNOSTIC command

The SEND DIAGNOSTIC command provides a means to request the target to perform a self test. While the test is target specific, the means of requesting the test is standardized and the response is simply GOOD status if all is well or CHECK CONDITION status if the test fails.

The SEND DIAGNOSTIC command also provides other powerful features when used in conjunction with the RECEIVE DIAGNOSTIC RESULTS command, but this capability is optional.

#### 8.1.2.4 Using the TEST UNIT READY command

The TEST UNIT READY command is useful in that it allows an initiator to poll a logical unit until it is ready without the need to allocate space for returned data. It is especially useful to check cartridge status of logical units with removable media. Targets are expected to respond promptly to indicate the current status of the device (i.e. a target should avoid lengthy disconnections in an attempt to respond with GOOD status).

## 8.2 Commands for all device types

The operation codes for commands that apply to all device types are listed in

8.2.1 | | COMPARE | 39h | O | 8.2.2 | | COPY | 18h | O | 8.2.3 | | COPY AND VERIFY | 3Ah | O | 8.2.4 | | INQUIRY | 12h | M | 8.2.5 | | LOG SELECT | 4Ch | O | 8.2.6 | | LOG SENSE | 4Dh | O | 8.2.7 | | MODE SELECT(6) | 15h | Z | 8.2.8 | | MODE SELECT(10) | 55h | Z | 8.2.9 | | MODE SENSE(6) | 1Ah | Z | 8.2.10 | | MODE SENSE(10) | 5Ah | Z | 8.2.11 | | READ BUFFER | 3Ch | O | 8.2.12 | | RECEIVE DIAGNOSTIC RESULTS | 1Ch | O | 8.2.13 | | REQUEST SENSE | 03h | M | 8.2.14 | | SEND DIAGNOSTIC | 1Dh | M | 8.2.15 | | TEST UNIT READY | 00h | M | 8.2.16 | | WRITE BUFFER | 3Bh | O | 8.2.17 | |----------------------------------------------------------------------| |Key: M = Command implementation is mandatory. | | O = Command implementation is optional. | | Z = Command implementation is device type specific. | +======================================================================+

#### Table 31 - Commands for all device types

+=====================================-============-======-============+
|  Command name                       | Operation  | Type |  Subclause |
|                                     |   code     |      |            |
|-------------------------------------+------------+------+------------|
|  CHANGE DEFINITION                  |    40h     |   O  |   

### 8.2.1 CHANGE DEFINITION command

The CHANGE DEFINITION command (see
table 32) modifies the operating definition of the selected logical unit or target with respect to commands from the selecting initiator or for all initiators.

#### Table 32 - CHANGE DEFINITION command

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (40h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |              Reserved                      |
|-----+-----------------------------------------------------------------------|
| 2   |                  Reserved                                    |  Save  |
|-----+-----------------------------------------------------------------------|
| 3   |Reserved|                  Definition parameter                        |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 8   |                           Parameter data length                       |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

A save control bit (Save) of zero indicates that the target shall not save the operating definition. A Save bit of one indicates that the target shall save the operating definition to non-volatile memory.

The definition parameter field is defined in

8.3.4.3).

#### Table 33 - Definition parameter field

+============-====================================+
|   Value    |  Meaning of definition parameter   |
|------------+------------------------------------|
|    00h     |  Use current operating definition  |
|    01h     |  SCSI-1 operating definition       |
|    02h     |  CCS operating definition          |
|    03h     |  SCSI-2 operating definition       |
|  04 - 3Fh  |  Reserved                          |
|  40 - 7Fh  |  Vendor-specific                   |
+=================================================+

NOTE 57 The current operating definition parameter values establish operating definitions compatible with the appropriate SCSI specification. Vendor- specific values are available for those applications where more complex operation definition changes are required. Definitions supported by a device are returned in the implemented operating definition page (see

The parameter data length field specifies the length in bytes of the parameter data that shall be transferred from the initiator to the target. A parameter data length of zero indicates that no data shall be transferred. This condition shall not be considered as an error. Parameter data lengths greater than zero indicate the number of bytes of parameter data that shall be transferred.

The parameter data is vendor-specific.

NOTE 58 The parameter data may be used to specify a password to validate an operating definition change.

The CHANGE DEFINITION command causes one of the operating definition modifications listed below:

NOTES
59
This International Standard does not provide a direct means to determine which of the above four methods has been implemented by the target. An indirect means of determining which method is implemented exists in that the target is required to inform affected initiators of operating definition changes via the unit attention condition.

60 The final two mondifications listed above may result in incompatibilities if other initiators are operated below the SCSI-2 level.

The operating definition is modified after successful completion of the command. A target shall consider the command successfully completed when it detects the assertion of the ACK signal for the COMMAND COMPLETE message. The initiator should verify the new operating definition by issuing an INQUIRY command requesting the implemented operating definition page (see 8.3.4.1).

It is permissible for an SCSI-2 device that has its definition changed to an SCSI-1 device to accept a CHANGE DEFINITION command.

NOTE 61 The method of changing the operating definition is implementation dependent. Some implementations may require that the target's operating mode be reinitialized as if a power-up or hard-reset had occurred. Other implementations may modify only those operating definitions that are affected by the CHANGE DEFINITION command.

If the CHANGE DEFINITION command is not executed successfully for any reason, the operating definition shall remain the same as it was before the CHANGE DEFINITION command was attempted. If it is impossible to return to the previous operating definition, a unit attention condition shall be generated by the target.

NOTE 62 The present operating definition of the target may always be interrogated through the INQUIRY command. When an SCSI-2 target has its operating definition changed to CCS or SCSI-1, certain changes are needed to promote compatibility with preexisting SCSI-1 initiators. The recommended changes are as follows:
 a) Change the operating definition of a logical unit relative to the initiator that issued the command. In this case, the target is capable of maintaining an unique operating definition for each logical unit relative to each initiator in the system. b) Change the operating definition of the target relative to the initiator that issued the command. In this case, the target is capable of maintaining a unique operating definition, for each initiator in the system, that applies to all logical units of the target. c) The operating definition of a logical unit relative to all initiators in the system. In this case, the target is capable of maintaining an unique operating definition for each logical unit relative to all initiators in the system. d) The operating definition of the target relative to all initiators in the system. In this case, the target is capable of maintaining only one operating definition.
 a) The target should not initiate selections to other SCSI devices to determine if any initiators support AEN. The target should assume that none are capable of receiving AEN and not issue an AEN. b) The target should not generate extended contingent allegiance conditions by issuing an INITIATE RECOVERY message. c) If a REQUEST SENSE command with an allocation length of zero is received, the target should return four bytes of sense data. d) If an INQUIRY command is received, the returned data should have appropriate values in the ANSI version and response data format fields. The features supported bits should be zero. e) A change in the operating definition may change the vendor identifier, the device type, the device model, the SCSI implementation level, the command set, mode pages, and any other operating characteristics.

After a power-on condition or a hard RESET condition, the target shall set its initial operating definition to the last saved value, if saving is implemented, or its default value, if saving is not implemented. table 34) provides the means to compare data from one logical unit with another or the same logical unit in a manner similar to the COPY command.

8.2.3 for additional information about the COPY command.)

If the comparison is unsuccessful, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to MISCOMPARE. The remaining fields in the sense data shall be set as documented in the COPY command. table 35) provides a means to copy data from one logical unit to another or the same logical unit. The logical unit that receives and performs the COPY command is called the copy manager. The copy manager is responsible for copying data from a logical unit (source device) to a logical unit (destination device). These logical units may reside on different SCSI devices or the same SCSI device (in fact all three may be the same logical unit). Some SCSI devices that implement this command may not support copies to or from another SCSI device, or may not support third party copies (i.e. both the source and the destination logical units reside on other SCSI devices).

8.2.3.7) is used in conjunction with the cat bit (8.2.3.7) in the segment descriptors to define what action should be taken when a segment of the copy does not fit exactly into an integer number of destination blocks.

The parameter list length field specifies the length in bytes of the parameters that shall be sent during the DATA OUT phase of the command. A parameter list length of zero indicates that no data shall be transferred. This condition shall not be considered as an error.

The COPY parameter list (see table 36) begins with a four-byte header that contains the COPY function code and priority. Following the header is one or more segment descriptors.

table 37. A target need not support all function codes for its device type.

8.2.5.1 for peripheral device type definitions. | +============================================================================+

### 8.2.3 COPY command

The COPY command (see

### 8.2.2 COMPARE command

The COMPARE command (see
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (39h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |              Reserved             |  Pad   |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 4   |                           Parameter list length                       |
|-----+---                                                                 ---|
| 5   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 8   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

This command functions in the same manner as the COPY command, except that the data from the source is compared on a byte-by-byte basis with the data from the destination. The parameter list transferred to the target is the same as for the COPY command. This parameter list contains the information to identify the logical units involved in the comparison and the length of the comparison. (See
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (18h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |              Reserved             |  Pad   |
|-----+-----------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 3   |                           Parameter list length                       |
|-----+---                                                                 ---|
| 4   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

The pad bit (
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+============================================+==========================|
| 0   |         COPY function code                 |         Priority         |
|-----+-----------------------------------------------------------------------|
| 1   |                           Vendor-specific                             |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|=====+=======================================================================|
|     |                         Segment descriptor(s)                         |
|=====+=======================================================================|
| 0   |                           Segment descriptor 0                        |
|- - -+---                                                                 ---|
| n   |                     (See specific table for length.)                  |
|-----+-----------------------------------------------------------------------|
|     |                                 .                                     |
|     |                                 .                                     |
|-----+-----------------------------------------------------------------------|
| 0   |                           Segment descriptor x                        |
|- - -+---                                                                 ---|
| n   |                     (See specific table for length.)                  |
+=============================================================================+

The COPY function code field defines a specific format for the segment descriptors. The COPY function codes are defined in
+===============================================-========-==========-========+
|       Peripheral device type                  |  COPY  | Segment  |        |
|-----------------------------------------------|function|descriptor|        |
| Source                | Destination           |  code  |  table   |Comments|
|-----------------------+-----------------------+--------+----------+--------|
| Block devices         | Stream devices        |    0   |    38    |        |
| (Device types 0,4,5,7)| (Device types 1,2,3,9)|        |          |        |
| Stream devices        | Block devices         |    1   |    38    |(Note 3)|
| (Device types 1,3,9)  | (Device types 0,4,5,7)|        |          |        |
| Block devices         | Block devices         |    2   |    39    |(Note 3)|
| (Device types 0,4,5,7)| (Device types 0,4,5,7)|        |          |        |
| Stream devices        | Stream devices        |    3   |    40    |        |
| (Device types 1,3,9)  | (Device types 1,2,3,9)|        |          |        |
| Sequential-access     | Sequential-access     |    4   |    41    | Image  |
| (Device type 1)       | (Device type 1)       |        |          |  copy  |
|----------------------------------------------------------------------------|
|  NOTES                                                                     |
|   1 COPY function codes 05h - 0Fh are reserved.                            |
|   2 COPY function codes 10h - 1Fh are vendor-specific.                     |
|   3 When using the COMPARE command the destination block device may be a   |
|      CD-ROM device or an optical-memory device that uses read-only media.  |
|   4 See 
The priority field of the COPY parameter list establishes the relative priority of this COPY command to other commands being executed by the same target. All other commands are assumed to have a priority of 1. Priority 0 is the highest priority, with increasing values indicating lower priorities.

The segment descriptor formats are determined by the COPY function code. The segment descriptor format used for block devices (i.e. write-once, CD- ROM, optical-memory, and direct-access devices) shall be the same. The segment descriptor format used for stream devices (i.e. printer, processor, communications, and sequential-access devices) shall be the same. Thus a copy operation from a write-once device to a printer device uses the same segment descriptor format as a copy operation from a direct-access device to a sequential-access device (see table 37). The segment descriptor formats are described in 8.2.3.3 through 8.2.3.6. A maximum of 256 segment descriptors are permitted. The segment descriptors are identified by ascending numbers beginning with zero.

table 38. This format is required for COPY function codes 00h or 01h. The segment descriptor may be repeated up to 256 times within the parameter list length specified in the command descriptor block.

#### 8.2.3.1 Errors detected by the managing SCSI device

Two classes of exception conditions may occur during execution of a COPY command. The first class consists of those exception conditions detected by the SCSI device that received the COPY command and is managing the execution of the command. These conditions include parity errors while transferring the COPY command and status byte, invalid parameters in the COPY command, invalid segment descriptors, and inability of the SCSI device controlling the COPY functions to continue operating. In the event of such an exception condition, the SCSI device managing the COPY shall:

#### 8.2.3.2 Errors detected by a target

The second class of errors consists of exception conditions detected by the SCSI device transferring data at the request of the SCSI device managing the transfer. The SCSI device managing the COPY command detects exception conditions by receiving CHECK CONDITION status from one of the SCSI devices it is managing. It then shall recover the sense data associated with the exception condition.

The SCSI device managing the COPY command may also be the source or destination SCSI device (or both). It shall distinguish between a failure of the management of the COPY and a failure of the data transfer being requested. It shall then create the appropriate sense data internally.

After recovering the sense data associated with the detected error, the SCSI device managing the COPY command shall:

The first byte of the command-specific information field shall specify the starting byte number, relative to the first byte of sense data, of an area that contains (unchanged) the source logical unit's status byte and sense data. A zero value indicates that no status byte or sense data is being returned for the source logical unit.

The second byte of the command-specific information field shall specify the starting byte number, relative to the first byte of sense data, of an area that contains (unchanged) the destination logical unit's status byte and sense data. A zero value indicates that no status byte or sense data is being returned for the destination logical unit.

#### 8.2.3.3 COPY function code 00h and 01h

The format for the segment descriptors for COPY transfers between block and stream devices is specified in

8.2.3.1).

A catenate (Cat) bit (optional) of one indicates that the COPY manager shall catenate the last source block of a segment with the first source block of the next segment if the last source block does not end exactly at the end of the destination block. The definition of a cat bit of zero depends on the setting of the pad bit in the command descriptor block (see 8.2.3.7).

The stream device block-length field specifies the block length to be used on the stream device logical unit during this segment of the COPY command. If the SCSI device managing the COPY knows this block length is not supported, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN PARAMETER LIST. If the block length is found to be invalid while executing a read or write operation to the stream device, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to COPY ABORTED (see 8.2.3.2).

The block device number of blocks field specifies the number of blocks in the current segment to be copied. A value of zero indicates that no blocks shall be transferred in this segment.

The block device logical block address field specifies the starting logical block address on the logical unit for this segment.

table 39. This format is required for COPY function code 02h. The segment descriptor may be repeated up to 256 times within the parameter list length specified in the command descriptor block.

#### 8.2.3.4 COPY function code 02h

The format for the segment descriptors for COPY transfers among block devices is specified in

8.2.3.3 for definitions of the source address, the source LUN, the destination address, the destination LUN, and CAT fields.

A destination count (DC) bit of zero indicates that the number of blocks field refers to the source logical unit. A DC bit of one indicates that the number of blocks field refers to the destination logical unit.

The number of blocks field specifies the number of blocks to be transferred to or from (depending on the DC bit) the block device during this segment. A value of zero indicates that no blocks shall be transferred.

The source logical block address field specifies the starting logical block address on the source block device.

The destination logical block address field specifies the starting logical block address on the destination block device.

table 40. This format is required for COPY function code 03h. The segment descriptor may be repeated up to 256 times within the parameter list length specified in the command descriptor block.

#### 8.2.3.5 COPY function code 03h

The format for the segment descriptors for COPY transfers among stream devices is specified by

8.2.3.3 for definitions of the source address, the source LUN, the destination address, the destination LUN, and CAT fields.

A destination count (DC) bit of zero indicates that the number of blocks field refers to the source logical unit. A DC bit of one indicates that the number of blocks field refers to the destination logical unit.

The source block length field specifies the block-length of the source device for this segment of the COPY. A zero in this field indicates variable block-length. For non-zero values, this field shall match the logical unit's actual block-length.

If block-length mismatches are detected prior to the beginning of the read operation by the SCSI device managing the COPY, the command shall be terminated with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST (see 8.2.3.1).

If the mismatches are detected during the read operation by the COPY manager, the command shall be terminated with CHECK CONDITION status. The sense key shall be set to COPY ABORTED (see 8.2.3.2). and the additional sense code shall be set to INVALID FIELD IN PARAMETER LIST.

The destination block-length field specifies the block length to be used on the destination logical unit during the COPY. Destination block length mismatches are handled in an analogous manner as source block length mismatches.

The number of blocks field specifies the number of blocks to be transferred to or from (depending on the DC bit) the device during this segment. A value of zero indicates that no blocks shall be transferred.

table 41. This format is required for COPY function code 04h. The segment descriptor may be repeated up to 256 times within the parameter list length specified in the command descriptor block.

#### 8.2.3.6 COPY function code 04h

The format for the segment descriptors for image COPY transfers between sequential-access devices is specified in

8.2.3.3 for definitions of the source address, the source LUN, the destination address, the destination LUN, and CAT fields.

The image mode COPY command copies an exact image of the source device medium to the destination device medium, beginning at their current positions. The copy function terminates when the source device:

A count field of zero indicates that the COPY command shall not terminate due to any number of consecutive filemarks or setmarks. Other error or exception conditions (e.g. early-warning end-of-partition on the destination device) may cause the COPY command to terminate prior to completion. In such cases, it is not possible to calculate a residue, so the information field in the sense data shall be set to zero.

4s Copies with unequal block lengths

When copying data between two devices with unequal block lengths, it is possible for the last source block to not completely fill the last destination block for one or more segments in the COPY command. Two optional bits are defined to assist in controlling the copy manager's actions in this circumstance. The Pad bit (in the command descriptor block) and the Cat bit (in each applicable segment descriptor) are defined in table 42.

table 43) performs the same function as the COPY command, except that a verification of the data written to the destination logical unit is performed after the data is written. The parameter list transferred to the target is the same as for the COPY command. This parameter list contains the information to identify the logical units involved in the copy and the length of the copy. See 8.2.3 for additional information about the COPY command.

table 44) requests that information regarding parameters of the target and its attached peripheral device(s) be sent to the initiator. An option allows the initiator to request additional information about the target or logical unit (see 8.2.5.2).

8.3.4).

#### Table 38 - Segment descriptor for COPY function codes 00h and 01h

 a) terminate the COPY command with CHECK CONDITION status. b) set the valid bit in the sense data to one. The segment number shall contain the number of the segment descriptor being processed at the time the exception condition is detected. The sense key shall contain the sense key code describing the exception condition (i.e. not COPY ABORTED). The information field shall contain the difference between the number of blocks field in the segment descriptor being processed at the time of the failure and the number of blocks successfully copied. This number is the residue of unprocessed blocks remaining for the segment descriptor.
 a) terminate the COPY command with CHECK CONDITION status. b) The valid bit in the sense data shall be set to one. The segment number shall contain the number of the segment descriptor being processed at the time the exception condition is detected. The sense key shall be set to COPY ABORTED. The information field shall contain the difference between the number of blocks field in the segment descriptor being processed at the time of the failure and the number of blocks successfully copied. This number is the residue of unprocessed blocks remaining for the segment descriptor.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+========+========+==========================|
| 0   | Source address           |Reserved|  Cat   |     Source LUN           |
|-----+--------------------------+-----------------+--------------------------|
| 1   | Destination address      |    Reserved     |     Destination LUN      |
|-----+-----------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|-----+---                        Stream device block length               ---|
| 3   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 4   | (MSB)                                                                 |
|-----+---                        Block device number of blocks            ---|
| 7   |                                                                 (LSB) |
|--- -+-----------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|--- -+---                        Block device logical block address       ---|
| 11  |                                                                 (LSB) |
+=============================================================================+

The source address and source LUN fields specify the SCSI bus ID and logical unit of the device to copy the data from for this segment of the COPY command. The destination address and destination LUN fields specify the SCSI bus ID and logical unit to copy the data to for this segment of the COPY command. Some SCSI devices may not support third-party COPY in which the copying SCSI device is not the source or destination device. Some SCSI devices only support COPY within the SCSI device and not to other SCSI devices. If an unsupported COPY operation is requested, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN PARAMETER LIST (see
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+========+========+==========================|
| 0   | Source address           |   DC   |  Cat   | Source LUN               |
|-----+--------------------------+-----------------+--------------------------|
| 1   | Destination address      |   Reserved      | Destination LUN          |
|-----+-----------------------------------------------------------------------|
| 2   |                              Reserved                                 |
|-----+-----------------------------------------------------------------------|
| 3   |                              Reserved                                 |
|-----+-----------------------------------------------------------------------|
| 4   | (MSB)                                                                 |
|- - -+---                Number of blocks                                 ---|
| 7   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|- - -+---                Source logical block address                     ---|
| 11  |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 12  | (MSB)                                                                 |
|- - -+---                Destination logical block address                ---|
| 15  |                                                                 (LSB) |
+=============================================================================+

See
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+========+========+==========================|
| 0   | Source address           |   DC   |  Cat   | Source LUN               |
|-----+--------------------------+-----------------+--------------------------|
| 1   | Destination address      |   Reserved      | Destination LUN          |
|-----+-----------------------------------------------------------------------|
| 2   |                              Reserved                                 |
|-----+-----------------------------------------------------------------------|
| 3   |                              Reserved                                 |
|-----+-----------------------------------------------------------------------|
| 4   | (MSB)                                                                 |
|-----+---                        Source block length                      ---|
| 5   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|-----+---                        Destination block length                 ---|
| 7   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|- - -+---                        Number of blocks                         ---|
| 11  |                                                                 (LSB) |
+=============================================================================+

See
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+=================+==========================|
| 0   | Source address           |   Reserved      | Source LUN               |
|-----+--------------------------+-----------------+--------------------------|
| 1   | Destination address      |   Reserved      | Destination LUN          |
|-----+-----------------------------------------------------------------------|
| 2   |                              Count                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                                                                       |
|- - -+---                           Reserved                              ---|
| 7   |                                                                       |
|-----+-----------------------------------------------------------------------|
| 8   |                                                                       |
|- - -+---                           Vendor-specific                       ---|
| 11  |                                                                       |
+=============================================================================+

See
 a) encounters an end-of-partition as defined by the source device; b) encounters an end-of-data as defined by the source device (i.e. BLANK CHECK sense key); c) has copied the number of consecutive filemarks specified in the count field from the source device to the destination device; d) has copied the number of consecutive setmarks specified in the count field from the source device to the destination device, if the RSmk bit in the device configuration page (see 10.3.3.1) is one.
+=====-=====-=================================================================+
| Pad | Cat | COPY manager's action                                           |
|-----+-----+-----------------------------------------------------------------|
|  0  |  0  | On inexact segments, it is device specific whether the COPY     |
|     |     | manager rejects the COPY command with CHECK CONDITION status and|
|     |     | ILLEGAL REQUEST sense key, the COPY manager writes or accepts   |
|     |     | short blocks (variable-block mode on sequential-access devices),|
|     |     | or the COPY manager adds pad characters (00h) to the destination|
|     |     | block or strips pad characters from the source block.           |
|     |     |                                                                 |
|  1  |  0  | On inexact segments, the COPY manager shall add pad characters  |
|     |     | (00h) to the destination block to completely fill the block, or |
|     |     | it shall strip pad characters from the source block, always     |
|     |     | stopping at the end of a complete block.                        |
|     |     |                                                                 |
|  X  |  1  | The COPY manager shall always write or read complete blocks.  On|
|     |     | inexact segments, the remainder of the block contains data from |
|     |     | the next segment.  This code is not valid in the last segment of|
|     |     | the COPY command.                                               |
+=============================================================================+

NOTE 63 Use of pad characters is intended to assist in managing COPY commands between devices of different block lengths where partial-block residues may occur. The initiator who issued the COPY command is responsible for management of these pad areas (i.e. remembering where they are). One possible method is to write the COPY parameter list information to the destination medium prior to issuing the COPY command for backup and to read this information prior to issuing the COPY command for restore.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (3Ah)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |        Reserved          | BytChk |  Pad   |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 4   |                           Parameter list length                       |
|-----+---                                                                 ---|
| 5   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 8   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

A byte check (BytChk) bit of zero causes a medium verification to be performed with no data comparison. A BytChk bit of one causes a byte-by- byte comparison of data written on the destination medium and the data transferred from the source medium. If the comparison is unsuccessful for any reason, the copy manager shall return CHECK CONDITION status with the sense key set to MISCOMPARE. The remaining fields in the sense data shall be set as documented in the COPY command.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (12h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |                  Reserved         |  EVPD  |
|-----+-----------------------------------------------------------------------|
| 2   |                           Page code                                   |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Allocation length                           |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

An enable vital product data (EVPD) bit of one specifies that the target shall return the optional vital product data specified by the page code field. If the target does not support vital product data and this bit is set to one, the target shall return CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and an additional sense code of INVALID FIELD IN CDB.

An EVPD bit of zero specifies that the target shall return the standard INQUIRY data. If the page code field is not zero, the target shall return CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and an additional sense code of INVALID FIELD IN CDB.

The page code field specifies which page of vital product data information the target shall return (see

The INQUIRY command shall return CHECK CONDITION status only when the target cannot return the requested INQUIRY data.

NOTE 64 The INQUIRY data should be returned even though the peripheral device may not be ready for other commands.

If an INQUIRY command is received from an initiator with a pending unit attention condition (i.e. before the target reports CHECK CONDITION status), the target shall perform the INQUIRY command and shall not clear the unit attention condition (see 7.9).

NOTES
65
The INQUIRY command is typically used by the initiator after a reset or power-up condition to determine the device types for system configuration. To minimize delays after a reset or power-up condition, the standard INQUIRY data should be available without incurring any media access delays. If the target does store some of the INQUIRY data on the device, it may return zeros or ASCII spaces (20h) in those fields until the data is available from the device.

66 The INQUIRY data may change as the target executes its initialization sequence or in response to a CHANGE DEFINITION command. For example, the target may contain a minimum command set in its non-volatile memory and may load its final firmware from the device when it becomes ready. After it has loaded the firmware, it may support more options and therefore return different supported options information in the INQUIRY data.

table 45) contains 36 required bytes, followed by a variable number of vendor-specific parameters. Bytes 56 through 95, if returned, are reserved for future standardization.

#### 8.2.5.1 Standard INQUIRY data

The standard INQUIRY data (see

table 46 and the peripheral device type is defined in table 47.

table 48.

#### Table 45 - Standard INQUIRY data format

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+============================================|
| 0   | Peripheral qualifier     |           Peripheral device type           |
|-----+-----------------------------------------------------------------------|
| 1   |  RMB   |                  Device-type modifier                        |
|-----+-----------------------------------------------------------------------|
| 2   |   ISO version   |       ECMA version       |  ANSI-approved version   |
|-----+-----------------+-----------------------------------------------------|
| 3   |  AENC  | TrmIOP |     Reserved    |         Response data format      |
|-----+-----------------------------------------------------------------------|
| 4   |                           Additional length (n-4)                     |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   | RelAdr | WBus32 | WBus16 |  Sync  | Linked |Reserved| CmdQue | SftRe  |
|-----+-----------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|- - -+---                        Vendor identification                    ---|
| 15  |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 16  | (MSB)                                                                 |
|- - -+---                        Product identification                   ---|
| 31  |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 32  | (MSB)                                                                 |
|- - -+---                        Product revision level                   ---|
| 35  |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 36  |                                                                       |
|- - -+---                        Vendor-specific                          ---|
| 55  |                                                                       |
|-----+-----------------------------------------------------------------------|
| 56  |                                                                       |
|- - -+---                        Reserved                                 ---|
| 95  |                                                                       |
|=====+=======================================================================|
|     |                       Vendor-specific parameters                      |
|=====+=======================================================================|
| 96  |                                                                       |
|- - -+---                        Vendor-specific                          ---|
| n   |                                                                       |
+=============================================================================+

The peripheral qualifier and peripheral device-type fields identify the device currently connected to the logical unit. If the target is not capable of supporting a device on this logical unit, this field shall be set to 7Fh (peripheral qualifier set to 011b and peripheral device type set to 1Fh). The peripheral qualifier is defined in
+=========-===================================================================+
|Qualifier|  Description                                                      |
|---------+-------------------------------------------------------------------|
|   000b  |  The specified peripheral device type is currently connected to   |
|         |  this logical unit.  If the target cannot determine whether or    |
|         |  not a physical device is currently connected, it shall also use  |
|         |  this peripheral qualifier when returning the INQUIRY data.       |
|         |  This peripheral qualifier does not mean that the device is ready |
|         |  for access by the initiator.                                     |
|         |                                                                   |
|   001b  |  The target is capable of supporting the specified peripheral     |
|         |  device type on this logical unit;  however, the physical device  |
|         |  is not currently connected to this logical unit.                 |
|         |                                                                   |
|   010b  |  Reserved                                                         |
|         |                                                                   |
|   011b  |  The target is not capable of supporting a physical device on     |
|         |  this logical unit. For this peripheral qualifier the peripheral  |
|         |  device type shall be set to 1Fh to provide compatibility with    |
|         |  previous versions of SCSI.  All other peripheral device type     |
|         |  values are reserved for this peripheral qualifier.               |
|         |                                                                   |
|   1XXb  |  Vendor-specific                                                  |
+=============================================================================+

+=============-===============================================================+
|    Code     |  Description                                                  |
|-------------+---------------------------------------------------------------|
|     00h     |  Direct-access device (e.g. magnetic disk)                    |
|     01h     |  Sequential-access device (e.g. magnetic tape)                |
|     02h     |  Printer device                                               |
|     03h     |  Processor device                                             |
|     04h     |  Write-once device (e.g. some optical disks)                  |
|     05h     |  CD-ROM device                                                |
|     06h     |  Scanner device                                               |
|     07h     |  Optical memory device (e.g. some optical disks)              |
|     08h     |  Medium changer device (e.g. jukeboxes)                       |
|     09h     |  Communications device                                        |
|  0Ah - 0Bh  |  Defined by ASC IT8 (Graphic arts pre-press devices)          |
|  0Ch - 1Eh  |  Reserved                                                     |
|     1Fh     |  Unknown or no device type                                    |
+=============================================================================+

A removable medium (RMB) bit of zero indicates that the medium is not removable. A RMB bit of one indicates that the medium is removable.

The device-type modifier field was defined in SCSI-1 to permit vendor- specific qualification codes of the device type. This field is retained for compatibility with SCSI-1. Targets that do not support this field should return a value of zero.

The usage of non-zero code values in the ISO version and ECMA version fields are defined by the International Organization for Standardization and the European Computer Manufacturers Association, respectively. A zero code value in these fields shall indicate that the target does not claim compliance to the ISO version of SCSI (ISO 9316) or the ECMA version of SCSI (ECMA-111). It is possible to claim compliance to more than one of these SCSI standards.

The ANSI-approved version field indicates the implemented version of this International Standard and is defined in

7.5.5.

#### Table 48 - ANSI-approved version

+=============-===============================================================+
|    Code     |  Description                                                  |
|-------------+---------------------------------------------------------------|
|      0h     |  The device might or might not comply to an ANSI-approved     |
|             |  standard.                                                    |
|      1h     |  The device complies to ANSI X3.131-1986 (SCSI-1).            |
|      2h     |  The device complies to this version of SCSI.  This code is   |
|             |  reserved to designate this standard upon approval by ANSI.   |
|   3h - 7h   |  Reserved                                                     |
+=============================================================================+

The asynchronous event notification capability (AENC) bit indicates that the device supports the asynchronous event notification capability as defined in
 a) Processor device-type definition: An AENC bit of one indicates that the processor device is capable of accepting asynchronous event notifications. An AENC bit of zero indicates that the processor device does not support asynchronous event notifications. b) All other device-types: This bit is reserved.

A terminate I/O process (TrmIOP) bit of one indicates that the device supports the TERMINATE I/O PROCESS message as defined in 6.6.22. A value of zero indicates that the device does not support the TERMINATE I/O PROCESS message.

A response data format value of zero indicates the INQUIRY data format is as specified in SCSI-1. A response data format value of one indicates compatibility with some products that were designed prior to the development of this standard (i.e. CCS). A response data format value of two indicates that the data shall be in the format specified in this International Standard. Response data format values greater than two are reserved.

The additional length field shall specify the length in bytes of the parameters. If the allocation length of the command descriptor block is too small to transfer all of the parameters, the additional length shall not be adjusted to reflect the truncation.

A relative addressing (RelAdr) bit of one indicates that the device supports the relative addressing mode for this logical unit. If this bit is set to one, the linked command (Linked) bit shall also be set to one; since relative addressing can only be used with linked commands. A RelAdr bit of zero indicates the device does not support relative addressing for this logical unit.

A wide bus 32 (Wbus32) bit of one indicates that the device supports 32- bit wide data transfers. A value of zero indicates that the device does not support 32-bit wide data transfers.

A wide bus 16 (Wbus16) bit of one indicates that the device supports 16- bit wide data transfers. A value of zero indicates that the device does not support 16-bit wide data transfers.

NOTE 67 If the values of both the Wbus16 and Wbus32 bits are zero, the device only supports 8-bit wide data transfers.

A synchronous transfer (Sync) bit of one indicates that the device supports synchronous data transfer. A value of zero indicates the device does not support synchronous data transfer.

A linked command (Linked) bit of one indicates that the device supports linked commands for this logical unit. A value of zero indicates the device does not support linked commands for this logical unit.

A command queuing (CmdQue) bit of one indicates that the device supports tagged command queuing for this logical unit. A value of zero indicates the device does not support tagged command queuing for this logical unit.

A soft reset (SftRe) bit of zero indicates that the device responds to the RESET condition with the hard RESET alternative (see 6.2.2.1). A SftRe bit of one indicates that the device responds to the RESET condition with the soft RESET alternative (see 6.2.2.2).

ASCII data fields shall contain only graphic codes (i.e. code values 20h through 7Eh). Left-aligned fields shall place any unused bytes at the end of the field (highest offset) and the unused bytes shall be filled with space characters (20h). Right-aligned fields shall place any unused bytes at the start of the field (lowest offset) and the unused bytes shall be filled with space characters (20h).

The vendor identification field contains eight bytes of ASCII data identifying the vendor of the product. The data shall be left aligned within this field.

NOTE 68 It is intended that this field provide a unique vendor identification of the manufacturer of the SCSI device. In the absence of a formal registration procedure, X3T9.2 maintains a list of vendor identification codes in use. Vendors are requested to voluntarily submit their identification codes to X3T9.2 to prevent duplication of codes (see annex E).

The product identification field contains sixteen bytes of ASCII data as defined by the vendor. The data shall be left-aligned within this field.

The product revision level field contains four bytes of ASCII data as defined by the vendor. The data shall be left-aligned within this field.

8.3.4). If the target does not implement the requested page it shall return CHECK CONDITION status. The a sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN CDB.

#### 8.2.5.2 Vital product data

Implementation of vital product data is optional. The information returned consists of configuration data (e.g. vendor identification, product identification, model, serial number), manufacturing data (e.g. plant and date of manufacture), field replaceable unit data and other vendor- or device-specific data.

The initiator requests the vital product data information by setting the EVPD bit to one and specifying the page code of the desired vital product data (see

NOTES
69
The target should have the ability to execute the INQUIRY command even when a device error occurs that prohibits normal command execution. In such a case, CHECK CONDITION status should be returned for commands other than INQUIRY or REQUEST SENSE. The sense data returned may contain the field replaceable unit code. The vital product data should be obtained for the failing device using the INQUIRY command.

70 This International Standard defines a format that allows device- independent initiator software to display the vital product data returned by the INQUIRY command. For example, the initiator may display the data associated for the field replaceable unit returned in the sense data. The contents of the data may be vendor-specific; therefore, it may not be usable without detailed information about the device.

71 This International Standard does not define the location or method of storing the vital product data. The retrieval of the data may require completion of initialization operations within the device that may induce delays before the data is available to the initiator. Time-critical requirements are an implementation consideration and are not addressed in this International Standard.

### 8.2.6 LOG SELECT command

The LOG SELECT command (see
table 49) provides a means for the initiator to manage statistical information maintained by the device about the device or its logical units. Targets that implement the LOG SELECT command shall also implement the LOG SENSE command. Structures in the form of log parameters within log pages are defined as a way to manage the log data. The LOG SELECT command provides for sending zero or more log pages during a DATA OUT phase. This International Standard defines the format of the log pages, but does not define the exact conditions and events that are logged.

8.3.2). A SP bit of zero specifies that parameters shall not be saved.

#### Table 49 - LOG SELECT command

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (4Ch)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |              Reserved    |  PCR   |   SP   |
|-----+-----------------------------------------------------------------------|
| 2   |        PC       |         Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   | (MSB)                                                                 |
|-----+---                        Parameter list length                    ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

A parameter code reset (PCR) bit of one and a parameter list length of zero shall cause all implemented parameters to be set to the target- defined default values (e.g. zero). If the PCR bit is one and the parameter list length is greater than zero, the command is terminated with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN CDB. A PCR bit of zero specifies that the log parameters shall not be reset.

A save parameters (SP) bit of one indicates that after performing the specified LOG SELECT operation the target shall save to non-volatile memory all parameters identified as savable by the DS bit in the log page (see

Saving of log parameters is optional and indicated for each log parameter by the DS bit in the page. Log parameters may be saved at vendor-specific times subject to the TSD bit (see 8.3.2) in the log parameter. If the target does not implement saved parameters for any log parameter and the SP bit is set to one, the command shall be terminated with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST, and the additional sense code set to INVALID FIELD IN CDB.

It is not an error to set the SP bit to one and to set the DS bit of a log parameter to one. In this case, the parameter value for that log parameter is not saved.

The page control (PC) field defines the type of parameter values to be selected. The page control field is defined in table 50.

8.3.2) of each log parameter control the updating and saving of the current cumulative parameters.

The target shall set the current threshold parameters to the default threshold values in response to a LOG SELECT command with the PC field set to 10b and the parameter list length field set to zero.

The target shall set all cumulative parameters to their default values in response to a LOG SELECT command with the PC field set to 11b and the parameter list length field set to zero.

The current threshold value can only be modified by the initiator via the LOG SELECT command. If the initiator attempts to change current threshold values that are not available or not implemented for that log parameter, then the target shall terminate the LOG SELECT command with CHECK CONDITION status, the sense key set to ILLEGAL REQUEST, and the additional sense code set to INVALID FIELD IN PARAMETER LIST. The saving of current threshold parameters and the criteria for the current threshold being met are controlled by bits in the parameter control byte (see 8.3.2).

NOTE 72 Pages or log parameters that are not available may become available at some later time (e.g. after the device has become ready).

The parameter list length field specifies the length in bytes of the parameter list that shall be transferred from the initiator to the target during the DATA OUT phase. A parameter list length of zero indicates that no pages shall be transferred. This condition shall not be considered an error. If the initiator sends page codes or parameter codes within the parameter list that are reserved or not implemented by the target, the target shall terminate the LOG SELECT command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.

If a parameter list length results in the truncation of any log parameter, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.

The initiator should send pages in ascending order by page code value if multiple pages are sent during a DATA OUT phase. If multiple log parameters within a page are sent during the DATA OUT phase, they should be sent in ascending order by parameter code value. The target shall return CHECK CONDITION status if the initiator sends pages out of order or parameter codes out of order. The sense key shall be set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN PARAMETER LIST.

NOTE 73 Initiators should issue LOG SENSE commands prior to issuing LOG SELECT commands to determine supported pages and page lengths.

The target may provide independent sets of log parameters for each logical unit or for each combination of logical units and initiators. If the target does not support independent sets of log parameters and any log parameters are changed that affect other initiators, then the target shall generate a unit attention condition for all initiators except the one that issued the LOG SELECT command (see 7.9). This unit attention condition is returned with an additional sense code of LOG PARAMETERS CHANGED.

If the initiator sends a log parameter that is not supported by the target, the target shall terminate the command with CHECK CONDITION status, set the sense key to ILLEGAL REQUEST, and set the additional sense code to INVALID FIELD IN PARAMETER LIST. table 51) provides a means for the initiator to retrieve statistical information maintained by the device about the device or its logical units. It is a complementary command to the LOG SELECT command.

8.3.2) to a non-volatile, vendor-specific location.

### 8.2.7 LOG SENSE command

The LOG SENSE command (see

#### Table 50 - Page control field

+=======-==============================-==============================+ | Type  |  LOG SELECT parameter values |  LOG SENSE parameter values  |
|-------+------------------------------+------------------------------|
|  00b  |  Current threshold values    |  Threshold values            |
|  01b  |  Current cumulative values   |  Cumulative values           |
|  10b  |  Default threshold values    |  Default threshold values    |
|  11b  |  Default cumulative values   |  Default cumulative values   |
+=====================================================================+

The current cumulative values may be updated by the target or by the initiator using the LOG SELECT command to reflect the cumulative number of events experienced by the target. Fields in the parameter control byte (see
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (4Dh)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |         Reserved         |  PPC   |    SP  |
|-----+-----------------------------------------------------------------------|
| 2   |        PC        |        Page code                                   |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   | (MSB)                                                                 |
|-----+---                        Parameter pointer                        ---|
| 6   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 7   | (MSB)                                                                 |
|-----+---                        Allocation length                        ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

The parameter pointer control (PPC) bit controls the type of parameters requested from the target:
 a) A PPC bit of one indicates that the target shall return a log page with parameter code values that have changed since the last LOG SELECT or LOG SENSE command. The target shall return only those parameter codes following the parameter pointer field. b) A PPC bit of zero indicates that the log parameter requested from the target shall begin with the parameter code specified in the parameter pointer field and return the number of bytes specified by the allocation length field in ascending order of parameter codes from the specified log page. A PPC bit of zero and a parameter pointer field of zero shall cause all available log parameters for the specified log page to be returned to the initiator subject to the specified allocation length.

Saving parameters is an optional function of the LOG SENSE command. If the target does not implement saving log parameters and if the save parameters (SP) bit is one, then the target shall return CHECK CONDITION status, set the sense key to ILLEGAL REQUEST, and set the additional sense code to INVALID FIELD IN CDB.

An SP bit of zero indicates the target shall perform the specified LOG SENSE command and shall not save any log parameters. If saving log parameters is implemented, an SP bit of one indicates that the target shall perform the specified LOG SENSE command and shall save all log parameters identified as savable by the DS bit (see

The page control (PC) field defines the type of parameter values to be selected (see 8.2.6 for the definition of the page control field). The parameter values returned by a LOG SENSE command are determined as follows:

The page code field identifies which page of data is being requested (see 8.3.2). If the page code is reserved or not implemented, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN CDB.

The parameter pointer field allows the initiator to request parameter data beginning from a specific parameter code to the maximum allocation length or the maximum parameter code supported by the target, whichever is less. If the value of the parameter pointer field is larger than the largest available parameter code that can be returned by the target on the specified page, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code shall be set to INVALID FIELD IN CDB.

Log parameters within the specified log page shall be transferred in ascending order according to parameter code. table 52) provides a means for the initiator to specify medium, logical unit, or peripheral device parameters to the target. Targets that implement the MODE SELECT command shall also implement the MODE SENSE command. Initiators should issue MODE SENSE prior to each MODE SELECT to determine supported pages, page lengths, and other parameters.

7.9). The target shall set the additional sense code to MODE PARAMETERS CHANGED.

### 8.2.8 MODE SELECT(6) command

The MODE SELECT(6) command (see
 a) The specified parameter values at the last update (in response to a LOG SELECT or LOG SENSE command or done automatically by the target for cumulative values). b) The saved values, if an update has not occurred since the last power-on, hard RESET condition, or BUS DEVICE RESET message and saved parameters are implemented. c) The default values, if an update has not occurred since the last power-on, hard RESET condition, or BUS DEVICE RESET message and saved values are not available or not implemented.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (15h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |   PF   |         Reserved         |  SP    |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Parameter list length                       |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

If a target supports saved pages, it may save only one copy of the page for each logical unit and have it apply to all initiators, or it may save separate copies for each initiator for each logical unit. If separate copies are saved, the target shall maintain separate current values for each I_T_L nexus. Pages that are common to all initiators are not required to have multiple copies.

If an initiator sends a MODE SELECT command that changes any parameters applying to other initiators, the target shall generate a unit attention condition for all initiators except the one that issued the MODE SELECT command (see

The target may provide for independent sets of parameters for each attached logical unit or for each combination of logical unit and initiator. If independent sets of parameters are implemented, and a third party reservation is requested, the target transfers the set of parameters in effect for the initiator of the RESERVE command to the parameters used for commands from the third party device (see 9.2.12.3 and 10.2.10.1).

A page format (PF) bit of zero indicates that the MODE SELECT parameters are as specified in SCSI-1, (i.e. all parameters after the block descriptors are vendor-specific). A PF bit of one indicates that the MODE SELECT parameters following the header and block descriptor(s) are structured as pages of related parameters and are as specified in this standard.

A save pages (SP) bit of zero indicates the target shall perform the specified MODE SELECT operation, and shall not save any pages. An SP bit of one indicates that the target shall perform the specified MODE SELECT operation, and shall save to a non-volatile vendor-specific location all the savable pages including any sent during the DATA OUT phase. The SP bit is optional, even when mode pages are supported by the target. Pages that are saved are identified by the parameter savable bit that is returned in the page header by the MODE SENSE command (see 8.3.3). If the PS bit is set in the MODE SENSE data then the page shall be savable by issuing a MODE SELECT command with the SP bit set. If the target does not implement saved pages and the SP bit is set to one, the command shall be terminated with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST, and the additional sense code set to INVALID FIELD IN CDB.

The parameter list length field specifies the length in bytes of the mode parameter list that shall be transferred from the initiator to the target 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 target shall terminate the command with CHECK CONDITION status if the parameter list length results in the truncation of any mode parameter header, mode parameter block descriptor(s), or mode page. The sense key shall be set to ILLEGAL REQUEST, and the additional sense code shall be set to PARAMETER LIST LENGTH ERROR.

The mode parameter list for the MODE SELECT and MODE SENSE commands is defined in 8.3.3. Parts of each mode parameter list are uniquely defined for each device-type.

The target shall terminate the MODE SELECT command with CHECK CONDITION status, set the sense key to ILLEGAL REQUEST, set the additional sense code to INVALID FIELD IN PARAMETER LIST, and shall not change any mode parameters for the following conditions:

If the initiator sends a value for a mode parameter that is outside the range supported by the target and rounding is implemented for that mode parameter, the target may either:

A target may alter any mode parameter in any mode page (even those reported as non-changeable) as a result of changes to other mode parameters.

The target validates the non-changeable mode parameters against the current values that existed for those mode parameters prior to the MODE SELECT command.

NOTE 74 If the current values calculated by the target affect the initiator's operation, the initiator should issue a MODE SENSE command after each MODE SELECT command.

### 8.2.9 MODE SELECT(10) command

The MODE SELECT(10) command (see
table 53) provides a means for the initiator to specify medium, logical unit, or peripheral device parameters to the target. See the MODE SELECT(6) command (8.2.8) for a description of the fields in this command. Initiators should issue MODE SENSE prior to each MODE SELECT to determine supported mode pages, mode page lengths, and other parameters.

table 54) provides a means for a target to report parameters to the initiator. It is a complementary command to the MODE SELECT(6) command.

8.3.3), at the target's discretion. A DBD bit of one specifies that the target shall not return any block descriptors in the returned MODE SENSE data.

The page control (PC) field defines the type of mode parameter values to be returned in the mode pages. The page control field is defined in table 55.

8.2.10.1 | | 01b | Changeable values | 8.2.10.2 | | 10b | Default values | 8.2.10.3 | | 11b | Saved values | 8.2.10.4 | +==========================================+

#### Table 53 - MODE SELECT(10) command

 a) If the initiator sets any field that is reported as not changeable by the target to a value other than its current value. b) If the initiator sets any field in the mode parameter header or block descriptor(s) to an unsupported value. c) If an initiator sends a mode page with a page length not equal to the page length returned by the MODE SENSE command for that page. d) If the initiator sends a unsupported value for a mode parameter and rounding is not implemented for that mode parameter. e) If the initiator sets any reserved field in the mode parameter list to a non-zero value.
 a) round the parameter to an acceptable value and terminate the command as described in 7.5.4; b) terminate the command with CHECK CONDITION status, the sense key set to ILLEGAL REQUEST, and set the additional sense code to INVALID FIELD IN PARAMETER LIST.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (55h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |   PF   |         Reserved         |  SP    |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   | (MSB)                                                                 |
|-----+---                        Parameter list length                    ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

Targets that implement the MODE SELECT(10) command shall also implement the MODE SENSE(10) command.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (1Ah)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |Reserved|   DBD  |         Reserved         |
|-----+-----------------------------------------------------------------------|
| 2   |       PC        |                   Page code                         |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Allocation length                           |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

A disable block descriptors (DBD) bit of zero indicates that the target may return zero or more block descriptors in the returned MODE SENSE data (see
+=======-=====================-============+
| Code  |  Type of parameter  | Subclause  |
|-------+---------------------+------------|
|  00b  |  Current values     |  
NOTE 75 The page control field only affects the mode parameters within the mode pages, however the PS bit, page code and page length fields should return current values since they have no meaning when used with other types. The mode parameter header and mode parameter block descriptor should return current values.

The page code specifies which mode page(s) to return. Mode page code usage is defined in table 56.

8.3.3. Parts of the mode parameter list are specifically defined for each device type. See subclause three of each peripheral device type for further information.

### 8.2.10.3 Default values

A PC field value of 2h requests that the target return the default values of the mode parameters. Parameters not supported by the target shall be set to zero. Default values are accessible even if the device is not ready.

### 8.2.10.4 Saved values

A PC field value of 3h requests that the target return the saved values of the mode parameters. Implementation of saved page parameters is optional. Mode parameters not supported by the target shall be set to zero. If saved values are not implemented, the command shall be terminated with CHECK CONDITION status, the sense key set to ILLEGAL REQUEST and the additional sense code set to SAVING PARAMETERS NOT SUPPORTED.

NOTE 80 The method of saving parameters is vendor-specific. The parameters are preserved in such a manner that they are retained when the target is powered down. All savable pages can be considered saved when a MODE SELECT command issued with the SP bit set to one has returned a GOOD status or after the successful completion of a FORMAT UNIT command.

### 8.2.10.5 Initial responses

After a power-up condition or hard reset condition, the target shall respond in the following manner:
table 57) provides a means for a target to report parameters to the initiator. It is a complementary command to the MODE SELECT(10) command. If the MODE SELECT(10) command is implemented the MODE SENSE(10) command shall be implemented. See the MODE SENSE(6) command for a description of the fields in this command. 8.2.8).

79 The initiator should issue a MODE SENSE command with the PC field set to 1h and the page code field set to 3Fh to determine which mode pages are supported, which mode parameters within the mode pages are changeable, and the supported length of each mode page prior to issuing any MODE SELECT commands.

#### Table 56 - Mode page code usage for all devices

+=============-==================================================-============+
|  Page code  |  Description                                     |  Subclause |
|-------------+--------------------------------------------------+------------|
|     00h     |  Vendor-specific (does not require page format)  |            |
|  01h - 1Fh  |  See specific device-types                       |            |
|  20h - 3Eh  |  Vendor-specific (page format required)          |            |
|     3Fh     |  Return all mode pages                           |            |
+=============================================================================+

An initiator may request any one or all of the supported mode pages from a target. If an initiator issues a MODE SENSE command with a page code value not implemented by the target, the target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST and the additional sense code to INVALID FIELD IN CDB.

A page code of 3Fh indicates that all mode pages implemented by the target shall be returned to the initiator. If the mode parameter list exceeds 256 bytes for a MODE SENSE(6) command or 65 536 bytes for a MODE SENSE(10) command, the target shall return CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.

Mode page 00h, if implemented, shall be returned after all other mode pages.

NOTES
76
Mode pages should be returned in ascending page code order except for mode page 00h.

77 If the PC field and the page code field are both set to zero the target should return a mode parameter header and block descriptor (if applicable). This provides for compatibility with existing SCSI-1 initiators.

The mode parameter list for all device types for MODE SELECT and MODE SENSE is defined in

### 8.2.10.1 Current values

A PC field value of 0h requests that the target return the current values of the mode parameters. The current values returned are:
 a) the current values of the mode parameters established by last successful MODE SELECT command; b) the saved values of the mode parameters if a MODE SELECT command has not successfully completed since the last power-on, hard RESET condition, or BUS DEVICE RESET message; c) the default values of the mode parameters, if saved values, are not available or not supported.
 a) If default values are requested, report the default values. b) If saved values are requested, report valid restored mode parameters, or restore the mode parameters and report them. If the saved values of the mode parameters are not able to be accessed from the non-volatile vendor-specific location, terminate the command with CHECK CONDITION status and set the sense key set to NOT READY. If saved parameters are not implemented respond as defined in 8.2.10.4. c) If current values are requested and the current values of the mode parameters have not been sent by the initiator (via a MODE SELECT command), the target may return either the default or saved values, as defined above. If current values have been sent, the current values shall be reported.

MODE SENSE(10) command

The MODE SENSE(10) command (see

table 58) is used in conjunction with the WRITE BUFFER command as a diagnostic function for testing target memory and the SCSI bus integrity. This command shall not alter the medium.

### 8.2.12.3 Data mode (010b)

In this mode, the DATA IN phase contains buffer data. The buffer ID field identifies a specific buffer within the target from which data shall be transferred. The vendor assigns buffer ID codes to buffers within the target. Buffer ID zero shall be supported. If more than one buffer is supported, additional buffer ID codes shall be assigned contiguously, beginning with one. Buffer ID code assignments for the READ BUFFER command shall be the same as for the WRITE BUFFER command. If an unsupported buffer ID code is selected, the target shall return CHECK CONDITION status, shall set the sense key to ILLEGAL REQUEST, and set the additional sense code to ILLEGAL FIELD IN CDB. The target terminates the DATA IN phase when allocation length bytes have been transferred or when all the available data from the buffer has been transferred to the initiator, whichever amount is less.

The buffer offset field contains the byte offset within the specified buffer from which data shall be transferred from. The initiator should conform to the offset boundary requirements returned in the READ BUFFER descriptor (see

### 8.2.12.4 Descriptor mode (011b)

In this mode, a maximum of four bytes of READ BUFFER descriptor information is returned. The target shall return the descriptor information for the buffer specified by the buffer ID (see the description of the buffer ID in
8.2.12.4). If the target is unable to accept the specified buffer offset, it shall return CHECK CONDITION status, shall set the sense key to ILLEGAL REQUEST, and set the additional sense code to ILLEGAL FIELD IN CDB. 8.2.12.3). If there is no buffer associated with the specified buffer ID, the target shall return all zeros in the READ BUFFER descriptor. The buffer offset field is reserved in this mode. The allocation length should be set to four or greater. The target shall transfer the lesser of the allocation length or four bytes of READ BUFFER descriptor. The READ BUFFER descriptor is defined as shown in table 61.

#### Table 60 - READ BUFFER header

table 60) is followed by data bytes from the target's data buffer.

#### Table 57 - MODE SENSE(10) command

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (5Ah)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |Reserved|  DBD   |         Reserved         |
|-----+-----------------------------------------------------------------------|
| 2   |       PC        |                   Page code                         |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   | (MSB)                                                                 |
|-----+---                        Allocation length                        ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (3Ch)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |     Reserved    |           Mode           |
|-----+-----------------------------------------------------------------------|
| 2   |                           Buffer ID                                   |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 4   |                           Buffer offset                               |
|-----+---                                                                 ---|
| 5   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 7   |                           Allocation length                           |
|-----+---                                                                 ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

The function of this command and the meaning of fields within the command descriptor block depend on the contents of the mode field. The mode field is defined in
+========-============================-===================+
|  Mode  |  Description               |    Type           |
|--------+----------------------------+-------------------|
|  000b  |  Combined header and data  |  Optional         |
|  001b  |  Vendor-specific           |  Vendor-specific  |
|  010b  |  Data                      |  Optional         |
|  011b  |  Descriptor                |  Optional         |
|  100b  |  Reserved                  |  Reserved         |
|  101b  |  Reserved                  |  Reserved         |
|  110b  |  Reserved                  |  Reserved         |
|  111b  |  Reserved                  |  Reserved         |
+=========================================================+

NOTE 81 Modes 000b and 001b are included for compatibility with products that were designed prior to the generation of this International Standard. Some products that were designed prior to the generation of this International Standard restrict the available length to 65 535 bytes.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 1   | (MSB)                                                                 |
|- - -+---                        Buffer capacity                          ---|
| 3   |                                                                 (LSB) |
+=============================================================================+

The buffer capacity field specifies the total number of data bytes available in the target's data buffer. This number is not reduced to reflect the allocation length; nor is it reduced to reflect the actual number of bytes written using the WRITE BUFFER command. Following the READ BUFFER header, the target shall transfer data from its data buffer. The target terminates the DATA IN phase when allocation length bytes of header plus data have been transferred or when all available header and buffer data have been transferred to the initiator, whichever is less.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Offset boundary                             |
|--- -+-----------------------------------------------------------------------|
| 1   | (MSB)                                                                 |
|- - -+---                        Buffer capacity                          ---|
| 3   |                                                                 (LSB) |
+=============================================================================+

The offset boundary field returns the boundary alignment within the selected buffer for subsequent WRITE BUFFER and READ BUFFER commands. The value contained in the offset boundary field shall be interpreted as a power of two.

The value contained in the buffer offset field of subsequent WRITE BUFFER and READ BUFFER commands should be a multiple of 2^offset boundary as shown in

table 63) requests analysis data be sent to the initiator after completion of a SEND DIAGNOSTIC command (see 8.2.15). If the target supports the optional page format, the page code field sent in the previous SEND DIAGNOSTIC command specifies the format of the returned data.

8.3.1 for RECEIVE DIAGNOSTIC RESULTS page format definitions. table 64) requests that the target transfer sense data to the initiator.

#### Table 62 - Buffer offset boundary

+========-====================-==========================================+
|Offset  |                    |                                          |
|boundary| 2**Offset boundary |  Buffer offsets                          |
|--------+--------------------+------------------------------------------|
|   0    |      2**0 = 1      |  Byte boundaries                         |
|   1    |      2**1 = 2      |  Even-byte boundaries                    |
|   2    |      2**2 = 4      |  Four-byte boundaries                    |
|   3    |      2**3 = 8      |  Eight-byte boundaries                   |
|   4    |      2**4 = 16     |  16-byte boundaries                      |
|   .    |          .         |         .                                |
|   .    |          .         |         .                                |
|  FFh   |  Not applicable    |  0 is the only supported buffer offset.  |
+========================================================================+

The buffer capacity field shall return the size of the selected buffer in bytes.

NOTE 82 In a multi-tasking system, a buffer may be altered between the WRITE BUFFER and READ BUFFER commands by another task. Buffer testing applications may wish to insure that only a single task is active. Use of reservations (to all logical units on the device) or linked commands may also be helpful in avoiding buffer alteration between these two commands.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (1Ch)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |             Reserved                       |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|-----+---                        Allocation length                        ---|
| 4   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

NOTES
83
To insure that the diagnostic command information is not destroyed by a command sent from another initiator, either the SEND DIAGNOSTIC command should either be linked to the RECEIVE DIAGNOSTIC RESULTS command or the logical unit should be reserved.

84 Although diagnostic software is generally device-specific, this command and the SEND DIAGNOSTIC command provide a means to isolate the operating system software from the device-specific diagnostic software. Hence, the operating system can remain device-independent. This also allows diagnostic software to be transferred more easily to other operating systems.

See

### 8.2.14 REQUEST SENSE Command

The REQUEST SENSE command (see
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (03h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |                  Reserved                  |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Allocation length                           |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

The sense data:
 a) shall be available if a contingent allegiance condition exists for the I_T_x nexus; b) shall be available if other information (e.g. medium position) is available in any field; c) may be available if an unexpected disconnect occurred.

If the target has no other sense data available to return, it shall return a sense key of NO SENSE and an additional sense code of NO ADDITIONAL SENSE INFORMATION.

The sense data shall be preserved by the target fo the initiator until retrieved by a REQUEST SENSE command or until the receipt of any other I/O process for the same I_T_x nexus. Sense data shall be cleared upon receipt of any subsequent I/O process (including REQUEST SENSE) to the same I_T_x nexus.

NOTE 85 Some target implementations do not update sense data except on commands that return CHECK CONDITION or COMMAND TERMINATED status. Thus when polling for a logical unit to become ready, the initiator should issue TEST UNIT READY commands until GOOD status is returned. If desired, the initiator may issue REQUEST SENSE commands after the TEST UNIT READY commands that return CHECK CONDITION or COMMAND TERMINATED status to obtain the sense data.

The target shall return CHECK CONDITION status for a REQUEST SENSE command only to report exception conditions specific to the command itself. For example:

If a recovered error occurs during the execution of the REQUEST SENSE command, the target shall return the sense data with GOOD status. If a target returns CHECK CONDITION status for a REQUEST SENSE command, the sense data may be invalid.

NOTE 86 The sense data appropriate to the selection of an invalid logical unit is defined in

Targets shall be capable of returning eighteen bytes of data in response to a REQUEST SENSE command. If the allocation length is eighteen or greater, and a target returns less than eighteen bytes of data, the initiator should assume that the bytes not transferred would have been zeros had the target returned those bytes. Initiators can determine how much sense data has been returned by examining the allocation length parameter in the command descriptor block and the additional sense length in the sense data. Targets shall not adjust the additional sense length to reflect truncation if the allocation length is less than the sense data available.

The sense data format for error codes 70h (current errors) and 71h (deferred errors) are defined in table 65. Error code values of 72h to 7Eh are reserved. Error code 7Fh is for a vendor-specific sense data format. Targets shall implement error code 70h; implementation of error code 71h is optional. Error code values of 00h to 6Fh are not defined by this International Standard and their use is not recommended.

10.3.3.1).

#### Table 65 - Error codes 70h and 71h sense data format

 a) A non-zero reserved bit is detected in the command descriptor block; b) An unrecovered parity error is detected on the data bus; c) A target malfunction prevents return of the sense data.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+==============================================================|
| 0   | Valid  |                  Error code (70h or 71h)                     |
|-----+-----------------------------------------------------------------------|
| 1   |                           Segment number                              |
|-----+-----------------------------------------------------------------------|
| 2   |Filemark|  EOM   |  ILI   |Reserved|         Sense key                 |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|- - -+---                        Information                              ---|
| 6   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 7   |                           Additional sense length (n-7)               |
|-----+-----------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|- - -+---                        Command-specific information             ---|
| 11  |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 12  |                           Additional sense code                       |
|-----+-----------------------------------------------------------------------|
| 13  |                           Additional sense code qualifier             |
|-----+-----------------------------------------------------------------------|
| 14  |                           Field replaceable unit code                 |
|-----+-----------------------------------------------------------------------|
| 15  |  SKSV  |                                                              |
|- - -+------------               Sense-key specific                       ---|
| 17  |                                                                       |
|-----+-----------------------------------------------------------------------|
| 18  |                                                                       |
|- - -+---                        Additional sense bytes                   ---|
| n   |                                                                       |
+=============================================================================+

A valid bit of zero indicates that the information field is not as defined in this International Standard. A valid bit of one indicates the information field contains valid information as defined in this International Standard. Targets shall implement the valid bit.

The segment number field contains the number of the current segment descriptor if the REQUEST SENSE command is in response to a COPY, COMPARE, or COPY AND VERIFY command. Up to 256 segments are supported, beginning with segment zero.

The filemark bit is mandatory for sequential-access devices, and this bit is reserved for all other device types. A filemark bit of one indicates that the current command has read a filemark or setmark. The additional sense code field may be used to indicate whether a filemark or setmark was read. Reporting of setmarks is optional and indicated by the Rsmk bit for sequential-access devices in the configuration parameters page (see

The end-of-medium (EOM) bit is mandatory for sequential-access and printer devices, and this bit is reserved for all other device types. An EOM bit of one indicates that an end-of-medium condition (end-of-partition, beginning-of-partition, out-of-paper, etc.) exists. For sequential-access devices, this bit indicates that the unit is at or past the early-warning if the direction was forward, or that the command could not be completed because beginning-of-partition was encountered if the direction was reverse.

An incorrect length indicator (ILI) bit of one usually indicates that the requested logical block length did not match the logical block length of the data on the medium.

The sense key, additional sense code and additional sense code qualifier provide a hierarchy of information. The intention of the hierarchy is to provide a top-down approach for an initiator to determine information relating to the error and exception conditions. The sense key provides generic categories in which error and exception conditions can be reported. Initiators would typically use sense keys for high level error recovery procedures. Additional sense codes provide further detail describing the sense key. Additional sense code qualifiers add further detail to the additional sense code. The additional sense code and additional sense code qualifier can be used by initiators where sophisticated error recovery procedures require detailed information describing the error and exception conditions.

The sense key field is mandatory and indicates generic information describing an error or exception condition. The sense keys are defined in 8.2.14.3.

The contents of the information field is device-type or command specific and is defined within the appropriate clause for the device type or command of interest. Targets shall implement the information field. Unless specified otherwise, this field contains:

The additional sense length field indicates the number of additional sense bytes to follow. If the allocation length of the command descriptor block is too small to transfer all of the additional sense bytes, the additional sense length is not adjusted to reflect the truncation.

The command-specific information field contains information that depends on the command that was executed. Further meaning for this field is defined within the command description. The command-specific information field is mandatory if the target supports any of the following commands: COPY, COMPARE, COPY AND VERIFY, SEARCH DATA, and REASSIGN BLOCKS.

The additional sense code (ASC) field indicates further information related to the error or exception condition reported in the sense key field. Targets shall support the additional sense code field. Support of the additional sense codes not explicitly required by this International Standard is optional. A list of additional sense codes is in 8.2.14.3. If the target does not have further information related to the error or exception condition, the additional sense code is set to NO ADDITIONAL SENSE INFORMATION.

The additional sense code qualifier (ASCQ) indicates detailed information related to the additional sense code. The additional sense code qualifier is optional. If the error or exception condition is reportable by the device, the value returned shall be as specified in 8.2.14.3. If the target does not have detailed information related to the error or exception condition, the additional sense code qualifier is set to zero.

Non-zero values in the field replaceable unit code field are used to define a device-specific mechanism or unit that has failed. A value of zero in this field shall indicate that no specific mechanism or unit has been identified to have failed or that the data is not available. The field replaceable unit code field is optional. The format of this information is not specified by this standard. Additional information about the field replaceable unit may be available in the ASCII information page (see 8.3.4.2), if supported by the target.

The sense-key specific bytes are described in 8.2.14.1, below.

The additional sense bytes field may contain command specific data, peripheral device specific data, or vendor-specific data that further defines the nature of the CHECK CONDITION status. table 66. The field pointer field indicates which illegal parameters in the command descriptor block or the data parameters are in error.

### 8.2.14.1 Sense-key specific

The sense-key specific field as defined by this International Standard when the value of the sense-key specific valid (SKSV) bit is one. The sense-key specific valid bit and sense-key specific field are optional. The definition of this field is determined by the value of the sense key field. This field is reserved for sense keys not described below. An SKSV value of zero indicates that this field is not as defined by this International Standard.

If the sense key field is set to ILLEGAL REQUEST and the SKSV bit is set to one, the sense-key specific field shall be as defined as shown in

#### Table 66 - Field pointer bytes

 a) the unsigned logical block address associated with the sense key, for direct-access devices (device type 0), write-once devices (device type 4), CD-ROM devices (device type 5), and optical memory devices (device type 7). b) the difference (residue) of the requested length minus the actual length in either bytes or blocks, as determined by the command, for sequential-access devices (device type 1), printer devices (device type 2), processor devices (device type 3) and some direct access device commands, except as defined for d) below. (Negative values are indicated by two's complement notation.) c) the difference (residue) of the requested number of blocks minus the actual number of blocks copied or compared for the current segment descriptor of a COPY, COMPARE, or COPY AND VERIFY command. d) For sequential-access devices operating in buffered modes 1h or 2h that detect an unrecoverable write error when unwritten data blocks, filemarks, or setmarks remain in the buffer, the value of the information field for all commands shall be: 1) the total number of data blocks, filemarks, and setmarks in the buffer if the device is in fixed block mode (block length field of the MODE SENSE block descriptor is non-zero and the fixed bit of the WRITE command is one). 2) the number of bytes in the buffer, including filemarks and setmarks, if the device is in variable mode (the fixed bit of the WRITE command is zero).
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+========+========+========+========+==========================|
| 15  |  SKSV  |  C/D   |Reserved|Reserved|  BPV   |    Bit pointer           |
|-----+-----------------------------------------------------------------------|
| 16  | (MSB)                                                                 |
|-----+---                        Field pointer                            ---|
| 17  |                                                                 (LSB) |
+=============================================================================+

A command data (C/D) bit of one indicates that the illegal parameter is in the command descriptor block. A C/D bit of zero indicates that the illegal parameter is in the data parameters sent by the initiator during the DATA OUT phase.

A bit pointer valid (BPV) bit of zero indicates that the value in the bit pointer field is not valid. A BPV bit of one indicates that the bit pointer field specifies which bit of the byte designated by the field pointer field is in error. When a multiple-bit field is in error, the bit pointer field shall point to the most-significant (left-most) bit of the field.

The field pointer field indicates which byte of the command descriptor block or of the parameter data was in error. Bytes are numbered starting from zero, as shown in the tables describing the commands and parameters. When a multiple-byte field is in error, the pointer shall point to the most- significant (left-most) byte of the field.

NOTE 87 Bytes identified as being in error are not necessarily the place that has to be changed to correct the problem.

If the sense key is RECOVERED ERROR, HARDWARE ERROR or MEDIUM ERROR and if the SKSV bit is one, the sense-key specific field shall be as shown in

table 68. These fields only apply to the FORMAT UNIT command with the Immed bit set to one.

#### Table 67 - Actual retry count bytes

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+==============================================================|
| 15  |  SKSV  |                  Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 16  | (MSB)                                                                 |
|-----+---                        Actual retry count                       ---|
| 17  |                                                                 (LSB) |
+=============================================================================+

The actual retry count field returns implementation-specific information on the actual number of retries of the recovery algorithm used in attempting to recover an error or exception condition.

NOTE 88 This field should relate to the retry count fields within the error recovery page of the MODE SELECT command.

If the sense key is NOT READY and the SKSV bit is one, the sense-key specific field shall be as shown in

### 8.2.14.3 Sense key and sense code definitions

The sense keys are defined in tables
69 and 70.

6.6.7). | |--------+--------------------------------------------------------------------| | 6h | UNIT ATTENTION. Indicates that the removable medium may have been| | | changed or the target has been reset. See 7.9 for more detailed | | | information about the unit attention condition. | |--------+--------------------------------------------------------------------| | 7h | DATA PROTECT. Indicates that a command that reads or writes the | | | medium was attempted on a block that is protected from this | | | operation. The read or write operation is not performed. | +=============================================================================+

#### Table 69 - Sense key (0h-7h) descriptions

7.5.5) if AEN is supported by both the initiator and target.

#### Table 68 - Format progress indication bytes

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+==============================================================|
| 15  |  SKSV  |                  Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 16  | (MSB)                                                                 |
|-----+---                        Progress indication                      ---|
| 17  |                                                                 (LSB) |
+=============================================================================+

The progress indication field is a percent complete indication in which the returned value is the numerator that has 65 536 (10000h) as its denominator. The progress indication shall based upon the total format operation including any certification or initialization operations.

NOTE 89 It is intended that the progress indication be time related. However, since format time varies with the number of defects encountered, etc., it is reasonable for the target to assign values to various steps within the process. The granularity of these steps should be small enough to provide reasonable assurances to the initiator that progress is being made.
 a) If a deferred error can be recovered with no external system intervention, a deferred error indication shall not be posted unless required by the error handling parameters of the MODE SELECT command. The occurrence of the error may be logged if statistical or error logging is supported. b) If a deferred error can be associated with a causing initiator and with a particular function or a particular subset of data, and the error is either unrecovered or required to be reported by the mode parameters, a deferred error indication shall be returned to the causing initiator. If an initiator other than the causing initiator attempts access to the particular function or subset of data associated with the deferred error, a BUSY status shall be returned to that initiator in response to the command attempting the access.
 c) If a deferred error cannot be associated with a causing initiator or with a particular subset of data, a deferred error indication shall be returned on behalf of the failing logical unit to each initiator. If multiple deferred errors have accumulated for some initiators, only the last error shall be returned. d) If a deferred error cannot be associated with a particular logical unit, it shall be returned to the appropriate initiator for all logical units supported by the target. e) If a current command has not yet started executing, and a deferred error occurs, the command shall be terminated with CHECK CONDITION status and deferred error information posted in the sense data. By convention, the current command is considered to have started execution if the target has changed phase from the COMMAND phase to the next normal phase of the command sequence. If a deferred error occurs while a current command is executing and the current command has been affected by the error, the command shall be terminated by CHECK CONDITION status and current error information shall be returned in the sense data. In this case, if the current error information does not adequately define the deferred error condition, a deferred error may be returned after the current error information has been recovered. If a deferred error occurs while a current command is executing and the current command completes successfully, the target may choose to return the deferred error information after the completion of the current command.
+========-====================================================================+
| Sense  |  Description                                                       |
|  key   |                                                                    |
|--------+--------------------------------------------------------------------|
|   0h   |  NO SENSE.  Indicates that there is no specific sense key          |
|        |  information to be reported for the designated logical unit.  This |
|        |  would be the case for a successful command or a command that      |
|        |  received CHECK CONDITION or COMMAND TERMINATED status because one |
|        |  of the filemark, EOM, or ILI bits is set to one.                  |
|--------+--------------------------------------------------------------------|
|   1h   |  RECOVERED ERROR.  Indicates that the last command completed       |
|        |  successfully with some recovery action performed by the target.   |
|        |  Details may be determinable by examining the additional sense     |
|        |  bytes and the information field.  When multiple recovered errors  |
|        |  occur during one command, the choice of which error to report     |
|        |  (first, last, most severe, etc.) is device specific.              |
|--------+--------------------------------------------------------------------|
|   2h   |  NOT READY.  Indicates that the logical unit addressed cannot be   |
|        |  accessed.  Operator intervention may be required to correct this  |
|        |  condition.                                                        |
|--------+--------------------------------------------------------------------|
|   3h   |  MEDIUM ERROR.  Indicates that the command terminated with a non-  |
|        |  recovered error condition that was probably caused by a flaw in   |
|        |  the medium or an error in the recorded data.  This sense key may  |
|        |  also be returned if the target is unable to distinguish between a |
|        |  flaw in the medium and a specific hardware failure (sense key 4h).|
|--------+--------------------------------------------------------------------|
|   4h   |  HARDWARE ERROR.  Indicates that the target detected a non-        |
|        |  recoverable hardware failure (for example, controller failure,    |
|        |  device failure, parity error, etc.) while performing the command  |
|        |  or during a self test.                                            |
|--------+--------------------------------------------------------------------|
|   5h   |  ILLEGAL REQUEST.  Indicates that there was an illegal parameter in|
|        |  the command descriptor block or in the additional parameters      |
|        |  supplied as data for some commands (FORMAT UNIT, SEARCH DATA,     |
|        |  etc.).  If the target detects an invalid parameter in the command |
|        |  descriptor block, then it shall terminate the command without     |
|        |  altering the medium.  If the target detects an invalid parameter  |
|        |  in the additional parameters supplied as data, then the target may|
|        |  have already altered the medium.  This sense key may also indicate|
|        |  that an invalid IDENTIFY message was received (

#### Table 70 - Sense key (8h-Fh) descriptions

8.2.3.2 for | | | additional information about this sense key.) | |--------+--------------------------------------------------------------------| | Bh | ABORTED COMMAND. Indicates that the target aborted the command. | | | The initiator may be able to recover by trying the command again. | |--------+--------------------------------------------------------------------| | Ch | EQUAL. Indicates a SEARCH DATA command has satisfied an equal | | | comparison. | |--------+--------------------------------------------------------------------| | Dh | VOLUME OVERFLOW. Indicates that a buffered peripheral device has | | | reached the end-of-partition and data may remain in the buffer | | | that has not been written to the medium. A RECOVER BUFFERED DATA | | | command(s) may be issued to read the unwritten data from the | | | buffer. | |--------+--------------------------------------------------------------------| | Eh | MISCOMPARE. Indicates that the source data did not match the data| | | read from the medium. | |--------+--------------------------------------------------------------------| | Fh | RESERVED. | +=============================================================================+
+========-====================================================================+
| Sense  |  Description                                                       |
|  key   |                                                                    |
|--------+--------------------------------------------------------------------|
|   8h   |  BLANK CHECK.  Indicates that a write-once device or a sequential- |
|        |  access device encountered blank medium or format-defined end-of-  |
|        |  data indication while reading or a write-once device encountered a|
|        |  non-blank medium while writing.                                   |
|--------+--------------------------------------------------------------------|
|   9h   |  VENDOR-SPECIFIC.  This sense key is available for reporting vendor|
|        |  specific conditions.                                              |
|--------+--------------------------------------------------------------------|
|   Ah   |  COPY ABORTED.  Indicates a COPY, COMPARE, or COPY AND VERIFY      |
|        |  command was aborted due to an error condition on the source       |
|        |  device, the destination device, or both.  (See 
The additional sense codes and additional sense code qualifiers are defined in table 71.

table 72) requests the target to perform diagnostic operations on itself, on the logical unit, or on both. The only mandatory implementation of this command is the self-test feature with the parameter list length of zero. Except when the self-test bit is one, this command is usually followed by a RECEIVE DIAGNOSTIC RESULTS command.

8.3.1 for the definition of diagnostic pages. A PF bit of zero indicates that the SEND DIAGNOSTIC parameters are as specified in SCSI-1 (i.e. all parameters are vendor-specific).

A self-test (SelfTest) bit of one directs the target to complete its default self-test. If the self-test successfully passes, the command shall be terminated with GOOD status; otherwise, the command shall be terminated with CHECK CONDITION status and the sense key shall be set to HARDWARE ERROR.

A self-test bit of zero requests that the target perform the diagnostic operation specified in the parameter list. The diagnostic operation might or might not require a target to return data that contains diagnostic results. If the return of data is not required, the return of GOOD status indicates successful completion of the diagnostic operation. If the return of data is required, the target shall either:

NOTE 92 To insure that the diagnostic command information is not destroyed by a command sent from another initiator, either the SEND DIAGNOSTIC command should be linked to the RECEIVE DIAGNOSTIC RESULTS command or the logical unit should be reserved.

The device off-line (DevOfL) and unit off-line (UnitOfL) bits are generally set by operating system software, while the parameter list is prepared by diagnostic application software. These bits grant permission to perform vendor-specific diagnostic operations on the target that may be visible to attached initiators. Thus, by preventing operations that are not enabled by these bits, the target assists the operating system in protecting its resources.

A UnitOfL bit of one grants permission to the target to perform diagnostic operations that may affect the user accessible medium on the logical unit, e.g. write operations to the user accessible medium, or repositioning of the medium on sequential access devices. The implementation of the UnitOfl bit is optional. A UnitOfL bit of zero prohibits any diagnostic operations that may be detected by subsequent I/O processes.

A DevOfl bit of one grants permission to the target to perform diagnostic operations that may affect all the logical units on a target, e.g. alteration of reservations, log parameters, or sense data. The implementation of the DevOfl bit is optional. A DevOfL bit of zero prohibits diagnostic operations that may be detected by subsequent I/O processes.

The parameter list length field specifies the length in bytes of the parameter list that shall be transferred from the initiator to the target. A parameter list length of zero indicates that no data shall be transferred. This condition shall not be considered an error. If the specified parameter list length results in the truncation of one or more pages (PF bit set to one) the target shall return CHECK CONDITION status with a sense key of ILLEGAL REQUEST and an additional sense code of INVALID FIELD IN CDB.

See note 83 under the RECEIVE DIAGNOSTIC RESULTS command in 8.2.13. table 73) provides a means to check if the logical unit is ready. This is not a request for a self-test. If the logical unit would accept an appropriate medium-access command without returning CHECK CONDITION status, this command shall return a GOOD status. If the logical unit cannot become operational or is in a state such that an initiator action (e.g. START UNIT command) is required to make the unit ready, the target shall return CHECK CONDITION status with a sense key of NOT READY.

Table 74 defines the preferred responses to the TEST UNIT READY command. Higher-priority responses (e.g. BUSY or RESERVATION CONFLICT) are also permitted.

table 75) is used in conjunction with the READ BUFFER command as a diagnostic for testing target memory and the SCSI bus integrity. Additional modes are provided for downloading microcode and for downloading and saving microcode.

### 8.2.16 TEST UNIT READY Command

The TEST UNIT READY command (see

#### Table 71 - ASC and ASCQ assignments

+=============================================================================+
|           D - DIRECT ACCESS DEVICE                                          |
|           .T - SEQUENTIAL ACCESS DEVICE                                     |
|           . L - PRINTER DEVICE                                              |
|           .  P - PROCESSOR DEVICE                                           |
|           .  .W - WRITE ONCE READ MULTIPLE DEVICE                           |
|           .  . R - READ ONLY (CD-ROM) DEVICE                                |
|           .  .  S - SCANNER DEVICE                                          |
|           .  .  .O - OPTICAL MEMORY DEVICE                                  |
|           .  .  . M - MEDIA CHANGER DEVICE                                  |
|           .  .  .  C - COMMUNICATION DEVICE                                 |
|           .  .  .  .                                                        |
| ASC ASCQ  DTLPWRSOMC  DESCRIPTION                                           |
| --- ----              ----------------------------------------------------- |
| 13h  00h  D   W  O    ADDRESS MARK NOT FOUND FOR DATA FIELD                 |
| 12h  00h  D   W  O    ADDRESS MARK NOT FOUND FOR ID FIELD                   |
| 00h  11h       R      AUDIO PLAY OPERATION IN PROGRESS                      |
| 00h  12h       R      AUDIO PLAY OPERATION PAUSED                           |
| 00h  14h       R      AUDIO PLAY OPERATION STOPPED DUE TO ERROR             |
| 00h  13h       R      AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED           |
| 00h  04h   T    S     BEGINNING-OF-PARTITION/MEDIUM DETECTED                |
| 14h  04h   T          BLOCK SEQUENCE ERROR                                  |
| 30h  02h  DT  WR O    CANNOT READ MEDIUM - INCOMPATIBLE FORMAT              |
| 30h  01h  DT  WR O    CANNOT READ MEDIUM - UNKNOWN FORMAT                   |
| 52h  00h   T          CARTRIDGE FAULT                                       |
| 3Fh  02h  DTLPWRSOMC  CHANGED OPERATING DEFINITION                          |
| 11h  06h      WR O    CIRC UNRECOVERED ERROR                                |
| 30h  03h  DT          CLEANING CARTRIDGE INSTALLED                          |
| 4Ah  00h  DTLPWRSOMC  COMMAND PHASE ERROR                                   |
| 2Ch  00h  DTLPWRSOMC  COMMAND SEQUENCE ERROR                                |
| 2Fh  00h  DTLPWRSOMC  COMMANDS CLEARED BY ANOTHER INITIATOR                 |
| 2Bh  00h  DTLPWRSO C  COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT      |
| 41h  00h  D           DATA PATH FAILURE (SHOULD USE 40 NN)                  |
| 4Bh  00h  DTLPWRSOMC  DATA PHASE ERROR                                      |
| 11h  07h      W  O    DATA RESYNCHRONIZATION ERROR                          |
| 16h  00h  D   W  O    DATA SYNCHRONIZATION MARK ERROR                       |
| 19h  00h  D      O    DEFECT LIST ERROR                                     |
| 19h  03h  D      O    DEFECT LIST ERROR IN GROWN LIST                       |
| 19h  02h  D      O    DEFECT LIST ERROR IN PRIMARY LIST                     |
| 19h  01h  D      O    DEFECT LIST NOT AVAILABLE                             |
| 1Ch  00h  D      O    DEFECT LIST NOT FOUND                                 |
| 32h  01h  D   W  O    DEFECT LIST UPDATE FAILURE                            |
| 40h  NNh  DTLPWRSOMC  DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)          |
| 63h  00h       R      END OF USER AREA ENCOUNTERED ON THIS TRACK            |
| 00h  05h   T    S     END-OF-DATA DETECTED                                  |
| 14h  03h   T          END-OF-DATA NOT FOUND                                 |
| 00h  02h   T    S     END-OF-PARTITION/MEDIUM DETECTED                      |
| 51h  00h   T     O    ERASE FAILURE                                         |
| 0Ah  00h  DTLPWRSOMC  ERROR LOG OVERFLOW                                    |
| 11h  02h  DT  W SO    ERROR TOO LONG TO CORRECT                             |
| 03h  02h   T          EXCESSIVE WRITE ERRORS                                |
| 3Bh  07h    L         FAILED TO SENSE BOTTOM-OF-FORM                        |
| 3Bh  06h    L         FAILED TO SENSE TOP-OF-FORM                           |
| 00h  01h   T          FILEMARK DETECTED                                     |
| 14h  02h   T          FILEMARK OR SETMARK NOT FOUND                         |
| 09h  02h      WR O    FOCUS SERVO FAILURE                                   |
| 31h  01h  D L    O    FORMAT COMMAND FAILED                                 |
| 58h  00h         O    GENERATION DOES NOT EXIST                             |
| 1Ch  02h  D      O    GROWN DEFECT LIST NOT FOUND                           |
| 00h  06h  DTLPWRSOMC  I/O PROCESS TERMINATED                                |
| 10h  00h  D   W  O    ID CRC OR ECC ERROR                                   |
| 22h  00h  D           ILLEGAL FUNCTION (SHOULD USE 20 00, 24 00, OR 26 00)  |
| 64h  00h       R      ILLEGAL MODE FOR THIS TRACK                           |
| 28h  01h          M   IMPORT OR EXPORT ELEMENT ACCESSED                     |
| 30h  00h  DT  WR OM   INCOMPATIBLE MEDIUM INSTALLED                         |
| 11h  08h   T          INCOMPLETE BLOCK READ                                 |
| 48h  00h  DTLPWRSOMC  INITIATOR DETECTED ERROR MESSAGE RECEIVED             |
| 3Fh  03h  DTLPWRSOMC  INQUIRY DATA HAS CHANGED                              |
| 44h  00h  DTLPWRSOMC  INTERNAL TARGET FAILURE                               |
| 3Dh  00h  DTLPWRSOMC  INVALID BITS IN IDENTIFY MESSAGE                      |
| 2Ch  02h        S     INVALID COMBINATION OF WINDOWS SPECIFIED              |
| 20h  00h  DTLPWRSOMC  INVALID COMMAND OPERATION CODE                        |
| 21h  01h          M   INVALID ELEMENT ADDRESS                               |
| 24h  00h  DTLPWRSOMC  INVALID FIELD IN CDB                                  |
| 26h  00h  DTLPWRSOMC  INVALID FIELD IN PARAMETER LIST                       |
| 49h  00h  DTLPWRSOMC  INVALID MESSAGE ERROR                                 |
| 11h  05h      WR O    L-EC UNCORRECTABLE ERROR                              |
| 60h  00h        S     LAMP FAILURE                                          |
| 5Bh  02h  DTLPWRSOM   LOG COUNTER AT MAXIMUM                                |
| 5Bh  00h  DTLPWRSOM   LOG EXCEPTION                                         |
| 5Bh  03h  DTLPWRSOM   LOG LIST CODES EXHAUSTED                              |
| 2Ah  02h  DTL WRSOMC  LOG PARAMETERS CHANGED                                |
| 21h  00h  DT  WR OM   LOGICAL BLOCK ADDRESS OUT OF RANGE                    |
| 08h  00h  DTL WRSOMC  LOGICAL UNIT COMMUNICATION FAILURE                    |
| 08h  02h  DTL WRSOMC  LOGICAL UNIT COMMUNICATION PARITY ERROR               |
| 08h  01h  DTL WRSOMC  LOGICAL UNIT COMMUNICATION TIME-OUT                   |
| 05h  00h  DTLPWRSOMC  LOGICAL UNIT DOES NOT RESPOND TO SELECTION            |
| 4Ch  00h  DTLPWRSOMC  LOGICAL UNIT FAILED SELF-CONFIGURATION                |
| 3Eh  00h  DTLPWRSOMC  LOGICAL UNIT HAS NOT SELF-CONFIGURED YET              |
| 04h  01h  DTLPWRSOMC  LOGICAL UNIT IS IN PROCESS OF BECOMING READY          |
| 04h  00h  DTLPWRSOMC  LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE          |
| 04h  04h  DTL    O    LOGICAL UNIT NOT READY, FORMAT IN PROGRESS            |
| 04h  02h  DTLPWRSOMC  LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED |
| 04h  03h  DTLPWRSOMC  LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED  |
| 25h  00h  DTLPWRSOMC  LOGICAL UNIT NOT SUPPORTED                            |
| 15h  01h  DTL WRSOM   MECHANICAL POSITIONING ERROR                          |
| 53h  00h  DTL WRSOM   MEDIA LOAD OR EJECT FAILED                            |
| 3Bh  0Dh          M   MEDIUM DESTINATION ELEMENT FULL                       |
| 31h  00h  DT  W  O    MEDIUM FORMAT CORRUPTED                               |
| 3Ah  00h  DTL WRSOM   MEDIUM NOT PRESENT                                    |
| 53h  02h  DT  WR OM   MEDIUM REMOVAL PREVENTED                              |
| 3Bh  0Eh          M   MEDIUM SOURCE ELEMENT EMPTY                           |
| 43h  00h  DTLPWRSOMC  MESSAGE ERROR                                         |
| 3Fh  01h  DTLPWRSOMC  MICROCODE HAS BEEN CHANGED                            |
| 1Dh  00h  D   W  O    MISCOMPARE DURING VERIFY OPERATION                    |
| 11h  0Ah  DT     O    MISCORRECTED ERROR                                    |
| 2Ah  01h  DTL WRSOMC  MODE PARAMETERS CHANGED                               |
| 07h  00h  DTL WRSOM   MULTIPLE PERIPHERAL DEVICES SELECTED                  |
| 11h  03h  DT  W SO    MULTIPLE READ ERRORS                                  |
| 00h  00h  DTLPWRSOMC  NO ADDITIONAL SENSE INFORMATION                       |
| 00h  15h       R      NO CURRENT AUDIO STATUS TO RETURN                     |
| 32h  00h  D   W  O    NO DEFECT SPARE LOCATION AVAILABLE                    |
| 11h  09h   T          NO GAP FOUND                                          |
| 01h  00h  D   W  O    NO INDEX/SECTOR SIGNAL                                |
| 06h  00h  D   WR OM   NO REFERENCE POSITION FOUND                           |
| 02h  00h  D   WR OM   NO SEEK COMPLETE                                      |
| 03h  01h   T          NO WRITE CURRENT                                      |
| 28h  00h  DTLPWRSOMC  NOT READY TO READY TRANSITION, MEDIUM MAY HAVE CHANGED|
| 5Ah  01h  DT  WR OM   OPERATOR MEDIUM REMOVAL REQUEST                       |
| 5Ah  00h  DTLPWRSOM   OPERATOR REQUEST OR STATE CHANGE INPUT (UNSPECIFIED)  |
| 5Ah  03h  DT  W  O    OPERATOR SELECTED WRITE PERMIT                        |
| 5Ah  02h  DT  W  O    OPERATOR SELECTED WRITE PROTECT                       |
| 61h  02h        S     OUT OF FOCUS                                          |
| 4Eh  00h  DTLPWRSOMC  OVERLAPPED COMMANDS ATTEMPTED                         |
| 2Dh  00h   T          OVERWRITE ERROR ON UPDATE IN PLACE                    |
| 3Bh  05h    L         PAPER JAM                                             |
| 1Ah  00h  DTLPWRSOMC  PARAMETER LIST LENGTH ERROR                           |
| 26h  01h  DTLPWRSOMC  PARAMETER NOT SUPPORTED                               |
| 26h  02h  DTLPWRSOMC  PARAMETER VALUE INVALID                               |
| 2Ah  00h  DTL WRSOMC  PARAMETERS CHANGED                                    |
| 03h  00h  DTL W SO    PERIPHERAL DEVICE WRITE FAULT                         |
| 50h  02h   T          POSITION ERROR RELATED TO TIMING                      |
| 3Bh  0Ch        S     POSITION PAST BEGINNING OF MEDIUM                     |
| 3Bh  0Bh        S     POSITION PAST END OF MEDIUM                           |
| 15h  02h  DT  WR O    POSITIONING ERROR DETECTED BY READ OF MEDIUM          |
| 29h  00h  DTLPWRSOMC  POWER ON, RESET, OR BUS DEVICE RESET OCCURRED         |
| 42h  00h  D           POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN)      |
| 1Ch  01h  D      O    PRIMARY DEFECT LIST NOT FOUND                         |
| 40h  00h  D           RAM FAILURE (SHOULD USE 40 NN)                        |
| 15h  00h  DTL WRSOM   RANDOM POSITIONING ERROR                              |
| 3Bh  0Ah        S     READ PAST BEGINNING OF MEDIUM                         |
| 3Bh  09h        S     READ PAST END OF MEDIUM                               |
| 11h  01h  DT  W SO    READ RETRIES EXHAUSTED                                |
| 14h  01h  DT  WR O    RECORD NOT FOUND                                      |
| 14h  00h  DTL WRSO    RECORDED ENTITY NOT FOUND                             |
| 18h  02h  D   WR O    RECOVERED DATA - DATA AUTO-REALLOCATED                |
| 18h  05h  D   WR O    RECOVERED DATA - RECOMMEND REASSIGNMENT               |
| 18h  06h  D   WR O    RECOVERED DATA - RECOMMEND REWRITE                    |
| 17h  05h  D   WR O    RECOVERED DATA USING PREVIOUS SECTOR ID               |
| 18h  03h       R      RECOVERED DATA WITH CIRC                              |
| 18h  01h  D   WR O    RECOVERED DATA WITH ERROR CORRECTION & RETRIES APPLIED|| 18h  00h  DT  WR O    RECOVERED DATA WITH ERROR CORRECTION APPLIED          |
| 18h  04h       R      RECOVERED DATA WITH L-EC                              |
| 17h  03h  DT  WR O    RECOVERED DATA WITH NEGATIVE HEAD OFFSET              |
| 17h  00h  DT  WRSO    RECOVERED DATA WITH NO ERROR CORRECTION APPLIED       |
| 17h  02h  DT  WR O    RECOVERED DATA WITH POSITIVE HEAD OFFSET              |
| 17h  01h  DT  WRSO    RECOVERED DATA WITH RETRIES                           |
| 17h  04h      WR O    RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED       |
| 17h  06h  D   W  O    RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED    |
| 17h  07h  D   W  O    RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT   |
| 17h  08h  D   W  O    RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE        |
| 1Eh  00h  D   W  O    RECOVERED ID WITH ECC CORRECTION                      |
| 3Bh  08h   T          REPOSITION ERROR                                      |
| 36h  00h    L         RIBBON, INK, OR TONER FAILURE                         |
| 37h  00h  DTL WRSOMC  ROUNDED PARAMETER                                     |
| 5Ch  00h  D      O    RPL STATUS CHANGE                                     |
| 39h  00h  DTL WRSOMC  SAVING PARAMETERS NOT SUPPORTED                       |
| 62h  00h        S     SCAN HEAD POSITIONING ERROR                           |
| 47h  00h  DTLPWRSOMC  SCSI PARITY ERROR                                     |
| 54h  00h     P        SCSI TO HOST SYSTEM INTERFACE FAILURE                 |
| 45h  00h  DTLPWRSOMC  SELECT OR RESELECT FAILURE                            |
| 3Bh  00h   TL         SEQUENTIAL POSITIONING ERROR                          |
| 00h  03h   T          SETMARK DETECTED                                      |
| 3Bh  04h    L         SLEW FAILURE                                          |
| 09h  03h      WR O    SPINDLE SERVO FAILURE                                 |
| 5Ch  02h  D      O    SPINDLES NOT SYNCHRONIZED                             |
| 5Ch  01h  D      O    SPINDLES SYNCHRONIZED                                 |
| 1Bh  00h  DTLPWRSOMC  SYNCHRONOUS DATA TRANSFER ERROR                       |
| 55h  00h     P        SYSTEM RESOURCE FAILURE                               |
| 33h  00h   T          TAPE LENGTH ERROR                                     |
| 3Bh  03h    L         TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY      |
| 3Bh  01h   T          TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM            |
| 3Bh  02h   T          TAPE POSITION ERROR AT END-OF-MEDIUM                  |
| 3Fh  00h  DTLPWRSOMC  TARGET OPERATING CONDITIONS HAVE CHANGED              |
| 5Bh  01h  DTLPWRSOM   THRESHOLD CONDITION MET                               |
| 26h  03h  DTLPWRSOMC  THRESHOLD PARAMETERS NOT SUPPORTED                    |
| 2Ch  01h        S     TOO MANY WINDOWS SPECIFIED                            |
| 09h  00h  DT  WR O    TRACK FOLLOWING ERROR                                 |
| 09h  01h      WR O    TRACKING SERVO FAILURE                                |
| 61h  01h        S     UNABLE TO ACQUIRE VIDEO                               |
| 57h  00h       R      UNABLE TO RECOVER TABLE-OF-CONTENTS                   |
| 53h  01h   T          UNLOAD TAPE FAILURE                                   |
| 11h  00h  DT  WRSO    UNRECOVERED READ ERROR                                |
| 11h  04h  D   W  O    UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED       |
| 11h  0Bh  D   W  O    UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT       |
| 11h  0Ch  D   W  O    UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA   |
| 46h  00h  DTLPWRSOMC  UNSUCCESSFUL SOFT RESET                               |
| 59h  00h         O    UPDATED BLOCK READ                                    |
| 61h  00h        S     VIDEO ACQUISITION ERROR                               |
| 50h  00h   T          WRITE APPEND ERROR                                    |
| 50h  01h   T          WRITE APPEND POSITION ERROR                           |
| 0Ch  00h   T    S     WRITE ERROR                                           |
| 0Ch  02h  D   W  O    WRITE ERROR - AUTO REALLOCATION FAILED                |
| 0Ch  01h  D   W  O    WRITE ERROR RECOVERED WITH AUTO REALLOCATION          |
| 27h  00h  DT  W  O    WRITE PROTECTED                                       |
|                                                                             |
| 80h  XXh     /                                                              |
| THROUGH       >       Vendor-specific.                                      |
| FFh  XX      /                                                              |
|                                                                             |
| XXh  80h     /                                                              |
| THROUGH       >       Vendor-specific QUALIFICATION OF STANDARD ASC.        |
| XXh  FFh     /                                                              |
|                       ALL CODES NOT SHOWN ARE RESERVED.                     |
|-----------------------------------------------------------------------------|
|NOTE - Annex D contains the ASC and ASCQ assignments in numeric order.       |
+=============================================================================+

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (1Dh)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |   PF   |Reserved|SelfTest| DevOfL | UnitOfL|
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|-----+---                        Parameter list length                    ---|
| 4   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

A page format (PF) bit of one specifies that the SEND DIAGNOSTIC parameters conform to the page structure as specified in this International Standard. The implementation of the PF bit is optional. See
 a) perform the requested diagnostic operation, prepare the data to be returned and indicate completion by returning GOOD status. The initiator issues a RECEIVE DIAGNOSTIC RESULTS command to recover the data; b) accept the parameter list, and if no errors are detected in the parameter list, return GOOD status. The requested diagnostic operation and the preparation of the data to be returned are performed upon receipt of a RECEIVE DIAGNOSTIC RESULTS command.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (00h)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |                  Reserved                  |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

+=================-=================-=========================================+
|      Status     |    Sense key    |             ASC and ASCQ                |
|-----------------+-----------------+-----------------------------------------|
| GOOD            | NO SENSE        | NO ADDITIONAL SENSE INFORMATION or      |
|                 |                 |    other valid additional sense code.   |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | ILLEGAL REQUEST | LOGICAL UNIT NOT SUPPORTED              |
|                 |                 |                                         |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | LOGICAL UNIT DOES NOT RESPOND           |
|                 |                 |    TO SELECTION                         |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | MEDIUM NOT PRESENT                      |
|                 |                 |                                         |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | LOGICAL UNIT NOT READY,                 |
|                 |                 |    CAUSE NOT REPORTABLE                 |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | LOGICAL UNIT IS IN PROCESS              |
|                 |                 |    OF BECOMING READY                    |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | LOGICAL UNIT NOT READY,                 |
|                 |                 |    INITIALIZING COMMAND REQUIRED        |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | LOGICAL UNIT NOT READY,                 |
|                 |                 |    MANUAL INTERVENTION REQUIRED         |
|-----------------+-----------------+-----------------------------------------|
| CHECK CONDITION | NOT READY       | LOGICAL UNIT NOT READY,                 |
|                 |                 |    FORMAT IN PROGRESS                   |
+=============================================================================+

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (3Bh)                        |
|-----+-----------------------------------------------------------------------|
| 1   | Logical unit number      |     Reserved    |          Mode            |
|-----+-----------------------------------------------------------------------|
| 2   |                           Buffer ID                                   |
|-----+-----------------------------------------------------------------------|
| 3   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 4   |                           Buffer offset                               |
|-----+---                                                                 ---|
| 5   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 7   |                           Parameter list length                       |
|-----+---                                                                 ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

This command shall not alter any medium of the target when the data mode or the combined header and data mode is specified.

The function of this command and the meaning of fields within the command descriptor block depend on the contents of the mode field. The mode field is defined in

8.2.12.1) that is returned in the header of the READ BUFFER command (mode 00b). If the parameter list length exceeds the buffer capacity target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST.

### 8.2.17.2 Vendor-specific mode (001b)

In this mode, the meaning of the buffer ID, buffer offset, and parameter list length fields are not specified by this International Standard.

### 8.2.17.3 Data mode (010b)

In this mode, the DATA OUT phase contains buffer data. The buffer ID field identifies a specific buffer within the target. The vendor assigns buffer ID codes to buffers within the target. Buffer ID zero shall be supported. If more than one buffer is supported, additional buffer ID codes shall be assigned contiguously, beginning with one. If an unsupported buffer ID code is selected, the target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN CDB.

Data are written to the target buffer starting at the location specified by the buffer offset. The initiator should conform to the offset boundary requirements returned in the READ BUFFER descriptor. If the target is unable to accept the specified buffer offset, it shall return CHECK CONDITION status and it shall set the sense key to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN CDB.

The parameter list length specifies the maximum number of bytes that shall be transferred during the DATA OUT phase to be stored in the specified buffer beginning at the buffer offset. The initiator should attempt to ensure that the parameter list length plus the buffer offset does not exceed the capacity of the specified buffer. (The capacity of the buffer can be determined by the buffer capacity field in the READ BUFFER descriptor.) If the buffer offset and parameter list length fields specify a transfer that would exceed the buffer capacity, the target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN CDB.

In this mode, vendor-specific microcode or control information shall be transferred to the control memory space of the target. After a power- cycle or reset, the device operation shall revert to a vendor-specific condition. The meanings of the buffer ID, buffer offset, and parameter list length fields are not specified by this International Standard and are not required to be zero-filled. When the microcode download has completed successfully the target shall generate a unit attention condition for all initiators except the one that issued the WRITE BUFFER command (see
7.9). The additional sense code shall be set to MICROCODE HAS BEEN CHANGED.

### 8.2.17.5 Download microcode and save mode (101b)

In this mode, vendor-specific microcode or control information shall be transferred to the target and, if the WRITE BUFFER command is completed successfully, also shall be saved in a non-volatile memory space (semiconductor, disk, or other). The downloaded code shall then be effective after each power-cycle and reset until it is supplanted in another download microcode and save operation. The meanings of the buffer ID, buffer offset, and parameter list length fields are not specified by this International Standard and are not required to be zero- filled. When the download microcode and save command has completed successfully the target shall generate a unit attention condition (see
7.9) for all initiators except the one that issued the WRITE BUFFER command. When reporting the unit attention condition, the target shall set the additional sense code to MICROCODE HAS BEEN CHANGED.

## 8.3 Parameters for all device types

### 8.3.1 Diagnostic parameters

This subclause describes the diagnostic page structure and the diagnostic pages that are applicable to all SCSI devices. Pages specific to each device type are described in the third subclause of each device-type clause (i.e.
9.3, 10.3, etc.).

A SEND DIAGNOSTIC command with a PF bit of one specifies that the SEND DIAGNOSTIC parameter list consists of zero or more diagnostic pages and that the data returned by the subsequent RECEIVE DIAGNOSTIC RESULTS command shall use the diagnostic page format (see table 77) described in this International Standard.

#### Table 76 - WRITE BUFFER mode field

+========-==================================-===================+
|  Mode  |  Description                     |  Implementation   |
|        |                                  |  requirements     |
|--------+----------------------------------+-------------------|
|  000b  |  Write combined header and data  |  Optional         |
|  001b  |  Vendor-specific                 |  Vendor-specific  |
|  010b  |  Write data                      |  Optional         |
|  011b  |  Reserved                        |  Reserved         |
|  100b  |  Download microcode              |  Optional         |
|  101b  |  Download microcode and save     |  Optional         |
|  110b  |  Reserved                        |  Reserved         |
|  111b  |  Reserved                        |  Reserved         |
+===============================================================+

NOTE 93 Modes 000b and 001b are included for compatibility with CCS products that were designed prior to the generation of this International Standard. These products restrict the maximum transfer length to 65 535 bytes.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Page code                                   |
|-----+-----------------------------------------------------------------------|
| 1   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|-----+---                        Page length (n-3)                        ---|
| 3   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|- - -+---                        Diagnostic parameters                    ---|
| n   |                                                                       |
+=============================================================================+

Each diagnostic page defines a function or operation that the target shall perform. The page contains a page header followed by the analysis data that is formatted according to the page code specified in the previous SEND DIAGNOSTIC command.

Targets that implement diagnostic pages are only required to accept a single diagnostic page per command.

The page code field identifies which diagnostic page is being sent or returned. The page codes are defined in

8.3.1.1 | | 01h - 3Fh | Reserved (for all device type pages) | | | 40h - 7Fh | See specific device type for definition | | | 80h - FFh | Vendor-specific pages | | +=============================================================================+

#### Table 78 - Diagnostic page codes

+=============-==================================================-============+
|  Page code  |  Description                                     | Subclause  |
|-------------+--------------------------------------------------+------------|
|     00h     |  Supported diagnostics pages                     |  
The page length field specifies the length in bytes of the diagnostic parameters that follow this field. If the initiator sends a page length that results in the truncation of any parameter, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST.

The diagnostic parameters are defined for each page code. The diagnostic parameters within a page may be defined differently in a SEND DIAGNOSTIC command than in a RECEIVE DIAGNOSTIC RESULTS command.

table 79) returns the list of diagnostic pages implemented by the target. This page shall be implemented if the target implements the page format option of the SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC RESULTS commands.

#### 8.3.1.1 Supported diagnostic pages

The supported diagnostics page (see

9.3.2, 10.3.2, etc.). The LOG SELECT command supports the ability to send zero or more log pages. The LOG SENSE command returns a single log page specified in the page code field of the command descriptor block (see 8.2.7).

Each log page begins with a four-byte page header followed by zero or more variable-length log parameters defined for that page. The log page format is defined in table 80.

table 81). Log parameters may be data counters that record a count of a particular event (or events) or log parameters may be list parameters (strings) which contain a description of a particular event.

#### Table 79 - Supported diagnostic pages

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Page code (00h)                             |
|-----+-----------------------------------------------------------------------|
| 1   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|-----+---                        Page length (n-3)                        ---|
| 3   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|- - -+---                        Supported page list                      ---|
| n   |                                                                       |
+=============================================================================+

The definition of this page for the SEND DIAGNOSTIC command includes only the first four bytes. If the page length field is not zero, the target shall terminate the SEND DIAGNOSTIC command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN PARAMETER LIST. This page instructs the target to make available the list of all supported diagnostic pages to be returned by a subsequent RECEIVE DIAGNOSTIC RESULTS command.

The definition of this page for the RECEIVE DIAGNOSTIC RESULTS command includes the list of diagnostic pages supported by the target.

The page length field specifies the length in bytes of the following supported page list.

The supported page list field shall contain a list of all diagnostic page codes implemented by the target in ascending order beginning with page code 00h.

### 8.3.2 Log parameters

This subclause describes the log page structure and the log pages that are applicable to all SCSI devices. Pages specific to each device type are described in the third subclause of each device-type clause (i.e.
+=======-========-========-========-========-========-========-========-========+
|    Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte   |        |        |        |        |        |        |        |        |
|=======+=================+=====================================================|
| 0     |    Reserved     |            Page code                                |
|-------+-----------------------------------------------------------------------|
| 1     |                              Reserved                                 |
|-------+-----------------------------------------------------------------------|
| 2     | (MSB)                                                                 |
|-------+---                           Page length (n-3)                     ---|
| 3     |                                                                 (LSB) |
|=======+=======================================================================|
|       |                         Log parameters(s)                             |
|=======+=======================================================================|
| 4     |                              Log parameter (First)                    |
|- --- -+---                           (Length x)                            ---|
| x+3   |                                                                       |
|-------+-----------------------------------------------------------------------|
|       |                                 .                                     |
|       |                                 .                                     |
|-------+-----------------------------------------------------------------------|
| n-y+1 |                              Log parameter (Last)                     |
|- --- -+---                           (Length y)                            ---|
| n     |                                                                       |
+===============================================================================+

The page code field identifies which log page is being transferred.

The page length field specifies the length in bytes of the following log parameters. If the initiator sends a page length that results in the truncation of any parameter, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST.

Most log pages contain one or more special data structures called log parameters (see

table 82) defines the basis for comparison of the cumulative and threshold values. The TMC field is valid only if the ETC bit is one. The value of the TMC field is the same for cumulative and threshold parameters.

#### Table 81 - Log parameter

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   | (MSB)                                                                 |
|-----+---                        Parameter code                           ---|
| 1   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 2   |   DU   |   DS   |  TSD   |   ETC  |       TMC       |Reserved|  LP    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Parameter length (n-3)                      |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|- - -+---                        Parameter value                          ---|
| n   |                                                                       |
+=============================================================================+

Each log parameter begins with a four-byte parameter header followed by one or more bytes of parameter value data.

The parameter code field identifies the log parameter is being transferred for that log page.

The DU, DS, TSD, ETC, TMC, and LP fields are collectively referred to as the parameter control byte. These fields are described below.

For cumulative log parameter values (indicated by the PC field of the LOG SELECT and LOG SENSE command descriptor block), the disable update (DU) bit is defined as follows:

NOTE 94 When updating cumulative log parameter values, a target may use volatile memory to hold these values until a LOG SELECT or LOG SENSE command is received with an SP bit of one (or a target-defined event occurs). Thus the updated cumulative log parameter values may be lost if a power cycle occurs.

The DU bit is not defined for threshold values (indicated by the PC field of the LOG SENSE command descriptor block) nor for list parameters (indicated by the LP bit). The target shall ignore the value of any DU bits in a LOG SELECT command.

A disable save (DS) bit of zero indicates that the target supports saving for that log parameter. The target shall save the current cumulative or the current threshold parameter value (depending on the value in the PC field of the command descriptor block) in response to a LOG SELECT or LOG SENSE command with an SP bit of one. A DS bit of one indicates that the target does not support saving that log parameter in response to a LOG SELECT or LOG SENSE command with an SP bit of one.

A target save disable (TSD) bit of zero indicates that the target provides a target-defined method for saving log parameters. This implicit saving operation shall be done frequently enough to insure that the cumulative parameter values retain statistical significance (i.e. across power cycles). A TSD bit of one indicates that either the target does not provide a target-defined method for saving log parameters or the target- defined method has been disabled by the initiator.

An enable threshold comparison (ETC) bit of one indicates that a comparison to the threshold value is performed whenever the cumulative value is updated. An ETC bit of zero indicates that a comparison is not performed. The value of the ETC bit is the same for cumulative and threshold parameters.

The threshold met criteria (TMC) field (see

8.3.3.1) is set to one; then the target shall terminate the command with CHECK CONDITION status and set the sense key to RECOVERED ERROR with the additional sense code set to LOG COUNTER AT MAXIMUM.

#### Table 82 - Threshold met criteria

 a) A zero value indicates that the target shall update the log parameter value to reflect all events that should be noted by that parameter. b) A one value indicates that the target shall not update the log parameter value except in response to a LOG SELECT command that specifies a new value for the parameter.
+========-=================================================+
|  Code  |  Basis for comparison                           |
|--------+-------------------------------------------------|
|   00b  |  Every update of the cumulative value           |
|   01b  |  Cumulative value     equal    threshold value  |
|   10b  |  Cumulative value   not equal  threshold value  |
|   11b  |  Cumulative value greater than threshold value  |
+==========================================================+

If the ETC bit is one and the result of the comparison is true, a unit attention condition shall be generated for all initiators. When reporting the unit attention condition, the target shall set the sense key to UNIT ATTENTION and set the additional sense code to THRESHOLD CONDITION MET.

The list parameter (LP) bit indicates the format of the log parameter. If an initiator attempts to set the value of the LP bit to a value other than the one returned for the same parameter in the LOG SENSE command, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST.

An LP bit of zero indicates that the parameter is a data counter. Data counters are associated with one of more events; the data counter is updated whenever one of these events occurs by incrementing of the counter value. If each data counter has associated with it a target-defined maximum value. Upon reaching this maximum value, the data counter shall not be incremented (i.e. it does not wrap). When a data counter reaches its maximum value, the target shall set the associated DU bit to one. If the data counter is at or reaches its maximum value during the execution of a command, the target shall complete the command. If the command completes correctly (except for the data counter being at its maximum value) and if the RLEC bit of the control mode page (

An LP bit of one indicates that the parameter is a list parameter. List parameters are not counters and thus the ETC and TMC fields shall be set to zero. A list parameter is a string of ASCII graphic codes (i.e. code values 20h through 7Eh).

If more than one list parameter is defined in a single log page, the following rules apply to assigning parameter codes:

NOTE 95 List parameters can be used to store the locations of defective blocks in the following manner. When a defective block is identified, a list parameter is updated to reflect the location and cause of the defect. When the next defect is encountered, the list parameter with the next higher parameter code is updated to record this defect. The size of the page can be made target specific to accommodate memory limitations. It is recommended that one or more data counter parameters be defined for the page to keep track of the number of valid list parameters and the parameter code of the parameter with the oldest recorded defect. This technique can be adapted to record other types of information.

The parameter length field specifies the length in bytes of the following parameter value. If the initiator sends a parameter length value that results in the truncation of the parameter value, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST.

If the initiator sends a log parameter value that is outside the range supported by the target, and rounding is implemented for that parameter, the target may either:

When any counter in a log page reaches its maximum value, incrementing of all counters in that log page shall cease until reinitialized by the initiator via a LOG SELECT command. If the RLEC bit of the control mode page is one, then the target shall report the exception condition.

The page code assignments for the log pages are listed in table 83.

8.3.2.1 | | 03h | Error counter page (read) page | 8.3.2.2 | | 04h | Error counter page (read reverse) page | 8.3.2.2 | | 05h | Error counter page (verify) page | 8.3.2.2 | | 02h | Error counter page (write) page | 8.3.2.2 | | 07h | Last n error events page | 8.3.2.3 | | 06h | Non-medium error page | 8.3.2.4 | | 00h | Supported log pages | 8.3.2.5 | | 08h - 2Fh | Reserved | | | 3Fh | Reserved | | | 30h - 3Eh | Vendor-specific pages | | +=============================================================================+

#### Table 83 - Log page codes

 a) The parameter updated last shall have a higher parameter code than the previous parameter, except as defined in rule b). b) When the maximum parameter code value supported by the target is reached, the target shall assign the lowest parameter code value to the next log parameter (i.e. wrap-around parameter codes). If the associated command completes correctly (except for the parameter code being at its maximum value) and if the RLEC bit of the control mode page (8.3.3.1) is set to one; then the target shall terminate the command with CHECK CONDITION status and set the sense key to RECOVERED ERROR with the additional sense code set to LOG LIST CODES EXHAUSTED.
 a) round to an acceptable value and terminate the command as described in 7.5.4; or b) terminate the command with CHECK CONDITION status and set the sense key to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST.
+=============-==================================================-============+
|  Page code  |  Description                                     | Subclause  |
|-------------+--------------------------------------------------+------------|
|     01h     |  Buffer over-run/under-run page                  |  

#### 8.3.2.1 Buffer over-run/under-run page

The buffer over-run/under-run page (page code 01h) defines 24 data counters that may be used to record the number of buffer over-runs or under-runs for the logical unit. A target that implements this page may implement one or more of the defined data counters.

A buffer over-run or under-run can occur when an initiator does not transmit data to or from the target's buffer fast enough to keep up with reading or writing the media. This can be caused by a slow transfer rate across the SCSI bus or by a high SCSI bus utilization that prevents reconnection by the target. A buffer over-run condition can occur during a read operation when a buffer full condition prevents continued transfer of data from the media to the buffer. A buffer under-run condition can occur during a write operation when a buffer empty condition prevents continued transfer of data to the media from the buffer. Most devices incur a delay at this point while the media is repositioned.

Table 84 defines the parameter code field for the buffer over-run/under- run counters.

#### Table 84 - Parameter code field for buffer over-run/under-run counters

table 85), a four-bit cause field (see table 86), and a one-bit type field. These are concatenated to determine the value of the parameter code for that log parameter. For example, a counter for parameter code value of 0023h specifies a count basis of 001b; a cause of 0001b; and a type of 1b; this counter is incremented once per command that experiences an over-run due to the SCSI bus being busy.

#### Table 85 - Count basis definition

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                          Reserved                                     |
|-----+-----------------------------------------------------------------------|
| 1   |      Count basis         |               Cause               |  Type  |
+=============================================================================+

The parameter code field for buffer over-run/under-run counters is a 16- bit value comprised of eight reserved bits, a three-bit count basis field (see
+=============-========================+
| Count basis |  Description           |
|-------------+------------------------|
|    000b     |  Undefined             |
|    001b     |  Per command           |
|    010b     |  Per failed reconnect  |
|    011b     |  Per unit of time      |
| 100b - 111b |  Reserved              |
+======================================+

The count basis field defines the criteria for incrementing the counter. The following criteria are defined:

NOTE 95 The per unit of time count basis is device type specific. Direct- access devices typically use a latency period (i.e. one revolution of the medium) as the unit of time.

The cause field indicates the reason that the over-run or under-run occurred. The following causes are defined in

8.3.2. A page can return one or more log parameters this record events defined by the parameter codes.

#### Table 86 - Cause field definition

+============-========================+
|    Cause   |Description             |
|------------+------------------------|
|      0h    |Undefined               |
|      1h    |SCSI bus busy           |
|      2h    |Transfer rate too slow  |
|   3h - Fh  |Reserved                |
+=====================================+

The type field indicates whether the counter records under-runs or over- runs. A value of zero specifies a buffer under-run condition and a value of one specifies a buffer over-run condition.

The counters contain the total number of times buffer over-run or under- run conditions have occurred since the last time the counter was cleared. The counter shall be incremented for each occurrence of an under-run or over-run condition and can be incremented more than once for multiple occurrences during the execution of a single command.

#### 8.3.2.2 Error counter pages

This clause defines the optional error counter pages for write errors (page code 02h), read errors (page code 03h), read reverse errors (page code 04h) and verify errors (page code 05h). The log page format is defined near the beginning of

Table 87 defines the parameter codes for the error counter pages. Support of each log parameter is optional.

8.3.3.1) is set to one, the target shall return CHECK CONDITION status with the sense key set to RECOVERED ERROR and the additional sense code set to LOG LIST CODES EXHAUSTED. Alternatively, the target may report this condition via asynchronous event notification (see 7.5.5).

#### Table 87 - Parameter codes for error counter pages

+=================-==============================================+
| Parameter code  |  Description                                 |
|-----------------+----------------------------------------------|
|     0000h       |  Errors corrected without substantial delay  |
|     0001h       |  Errors corrected with possible delays       |
|     0002h       |  Total (e.g. rewrites or rereads)            |
|     0003h       |  Total errors corrected                      |
|     0004h       |  Total times correction algorithm processed  |
|     0005h       |  Total bytes processed                       |
|     0006h       |  Total uncorrected errors                    |
|  0007h - 7FFFh  |  Reserved                                    |
|  8000h - FFFFh  |  Vendor-specific                             |
+================================================================+

NOTE 96 The exact definition of the error counters is not part of this International Standard. These counters should not be used to compare products because the products may define errors differently.

#### 8.3.2.3 Last n error events page

Log page (07h) provides for a number of error-event records using the list parameter format of the log page. The number of these error-event records supported, n, is device-specific. Each error-event record contains device-specific diagnostic information for a single error encountered by the device. The parameter code associated with error-event record indicates the relative time at which the error occurred. A higher parameter code indicates that the error event occurred later in time.

The content of the parameter value field of each log parameter is an ASCII character string which may describe the error event. The exact contents of the character string is not defined by this International Standard.

When the last supported parameter code is used by an error-event record, the recording on this page of all subsequent error information shall cease until one or more of the list parameters with the highest parameter codes have been reinitialized. If the RLEC bit of the control mode page (

table 88). Vendor-specific discrimination may be provided through the vendor-specific parameter codes.

#### 8.3.2.4 Non-medium error page

This page (page code 06h) provides for summing the occurrences of recoverable error events other than write, read, or verify failures. No discrimination among the various types of events is provided by parameter code (see

9.3, 10.3, etc.).

The mode parameter list shown in table 90 contains a header, followed by zero or more block descriptors, followed by zero or more variable-length pages. Parameter lists are defined for each device type.

#### Table 89 - Supported log pages

table 89) returns the list of log pages implemented by the target. Targets that implement the LOG SENSE command shall implement this log page.

#### Table 88 - Non-medium error event parameter codes

+=================-==============================================+
| Parameter code  |  Description                                 |
|-----------------+----------------------------------------------|
|      0000h      |  Non-medium error count                      |
|  0001h - 7FFFh  |  Reserved                                    |
|  8000h - FFFFh  |  Vendor-specific error counts                |
+================================================================+

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=================+=====================================================|
| 0   |    Reserved     |        Page code (00h)                              |
|-----+-----------------------------------------------------------------------|
| 1   |                          Reserved                                     |
|-----+-----------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|-----+---                       Page length (n-3)                         ---|
| 3   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|- - -+---                       Supported page list                       ---|
| n   |                                                                       |
+=============================================================================+

This page is not defined for the LOG SELECT command. This log page returns the list of supported log pages for the specified logical unit.

The page length field specifies the length in bytes of the following supported page list.

The supported page list field shall contain a list of all log page codes implemented by the target in ascending order beginning with page code 00h.

### 8.3.3 Mode parameters

This subclause describes the block descriptors and the pages used with MODE SELECT and MODE SENSE commands that are applicable to all SCSI devices. Pages specific to each device type are described in the third subclause of each device-type clause (i.e.
+======-========-========-========-========-========-========-========-========+
|   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte  |        |        |        |        |        |        |        |        |
|======+=======================================================================|
|0 - n |                        Mode parameter header                          |
|======+=======================================================================|
|0 - n |                        Block descriptor(s)                            |
|======+=======================================================================|
|0 - n |                        Page(s)                                        |
+==============================================================================+

The six-byte command descriptor block parameter header is defined in
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Mode data length                            |
|-----+-----------------------------------------------------------------------|
| 1   |                           Medium type                                 |
|-----+-----------------------------------------------------------------------|
| 2   |                           Device-specific parameter                   |
|-----+-----------------------------------------------------------------------|
| 3   |                           Block descriptor length                     |
+=============================================================================+

The ten-byte command descriptor block parameter header is defined in
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   | (MSB)                                                                 |
|-----+---                        Mode data length                         ---|
| 1   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 2   |                           Medium type                                 |
|-----+-----------------------------------------------------------------------|
| 3   |                           Device-specific parameter                   |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|-----+---                        Block descriptor length                  ---|
| 7   |                                                                 (LSB) |
+=============================================================================+

When using the MODE SENSE command, the mode data length field specifies the length in bytes of the following data that is available to be transferred. The mode data length does not include itself. When using the MODE SELECT command, this field is reserved.

NOTE 97 Targets that support more than 256 bytes of block descriptors and pages may need to implement ten-byte mode commands. The mode data length field in the six-byte command descriptor block header limits the returned data to 256 bytes.

Medium types are unique for each device type. Refer to the mode parameters clause of the specific device type for definition of these values. Some device types reserve this field.

The device specific parameter is unique for each device type. Refer to the mode parameters clause of the specific device type for definition of this field. Some device types reserve all or part of this field.

The block descriptor length specifies the length in bytes of all the block descriptors. It is equal to the number of block descriptors times eight, and does not include pages or vendor-specific parameters, if any, that may follow the last block descriptor. A block descriptor length of zero indicates that no block descriptors are included in the mode parameter list. This condition shall not be considered an error.

The mode parameter block descriptor is shown in

7.9) shall be generated when any block descriptor values are changed.

The density code field is unique for each device type. Refer to the mode parameters clause of the specific device type for definition of this field. Some device types reserve all or part of this field.

The number of blocks field specifies the number of logical blocks on the medium to which the density code and block length fields apply. A value of zero indicates that all of the remaining logical blocks of the logical unit shall have the medium characteristics specified.

NOTES
98
There may be implicit association between parameters defined in the pages and block descriptors. For direct-access devices, the block length affects the optimum values (the values that achieve best performance) for the sectors per track, bytes per physical sector, track skew factor, and cylinder skew factor fields in the format parameters page. In this case, the target may change parameters not explicitly sent with the MODE SELECT command. A subsequent MODE SENSE command would reflect these changes.

99 The number of remaining logical blocks may be unknown for some device types.

The block length specifies the length in bytes of each logical block described by the block descriptor. For sequential-access devices, a block length of zero indicates that the logical block size written to the medium is specified by the transfer length field in the command descriptor block (see 10.2.4 and 10.2.14)

The mode page format is defined in table 94.

8.3.3.1 | | 02h | Disconnect-reconnect page | 8.3.3.2 | | 09h | Peripheral device page | 8.3.3.3 | | 01h | (See specific device type) | | | 03h - 08h | (See specific device type) | | | 0Bh - 1Fh | (See specific device type) | | | 00h | Vendor-specific (does not require page format) | | | 20h - 3Eh | Vendor-specific (page format required) | | | 3Fh | Return all pages | | | | (valid only for the MODE SENSE command) | | +=============================================================================+

#### Table 93 - Mode parameter block descriptor

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Density code                                |
|-----+-----------------------------------------------------------------------|
| 1   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 2   |                           Number of blocks                            |
|-----+---                                                                 ---|
| 3   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   | (MSB)                                                                 |
|-----+---                                                                 ---|
| 6   |                           Block length                                |
|-----+---                                                                 ---|
| 7   |                                                                 (LSB) |
+=============================================================================+

Block descriptors specify some of the medium characteristics for all or part of a logical unit. Support for block descriptors is optional. Each block descriptor contains a density code field, a number of blocks field, and a block length field. Block descriptor values are always current (i.e. saving is not supported). A unit attention condition (see
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+========+=====================================================|
| 0   |   PS   |Reserved|         Page code                                   |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page length (n-1))                          |
|-----+-----------------------------------------------------------------------|
| 2   |                                                                       |
|-----+--                         Mode parameters                          ---|
| n   |                                                                       |
+=============================================================================+

Each mode page contains a page code, a page length, and a set of mode parameters. The page codes are defined in this subclause and in the mode parameter sub-clauses of the specific device type.

When using the MODE SENSE command, a parameters savable (PS) bit of one indicates that the mode page can be saved by the target in a non-volatile, vendor-specific location. A PS bit of zero indicates that the supported parameters cannot be saved. When using the MODE SELECT command, the PS bit is reserved.

The page code field identifies the format and parameters defined for that mode page. Some page codes are defined as applying to all device types and other page codes are defined for the specific device type.

When using the MODE SENSE command, if page code 00h (vendor-specific page) is implemented, the target shall return that page last in response to a request to return all pages (page code 3Fh). When using the MODE SELECT command, this page should be sent last.

The page length field specifies the length in bytes of the mode parameters that follow. If the initiator does not set this value to the value that is returned for the page by the MODE SENSE command, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST. The target is permitted to implement a mode page that is less than the full page length defined in this International Standard, provided no field is truncated and the page length field correctly specifies the actual length implemented.

The mode parameters for each page are defined in the following subclauses, or in the mode parameters sub-clause for the specific device type. Mode parameters not implemented by the target shall be set to zero.

Table 95 defines the mode pages that are applicable to all device types that include the MODE SELECT and MODE SENSE commands.

#### Table 95 - Mode page codes

+=============-==================================================-============+
|  Page code  |  Description                                     | Subclause  |
|-------------+--------------------------------------------------+------------|
|     0Ah     |  Control mode page                               |  

#### 8.3.3.1 Control mode page

The control mode page (see

8.3.2. A RLEC bit of zero specifies that the target shall not report log exception conditions.

The queue algorithm modifier field (see table 97) specifies restrictions on the algorithm used for reordering commands that are tagged with the SIMPLE QUEUE TAG message.

7.8).

#### Table 96 - Control mode page

table 96) provides controls over several SCSI-2 features that are applicable to all device types such as tagged queuing, extended contingent allegiance, asynchronous event notification, and error logging.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+========+=====================================================|
| 0   |   PS   |Reserved|         Page code (0Ah)                             |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page length (06h)                           |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                           |  RLEC  |
|-----+--------------------------------------------------------------+--------|
| 3   |     Queue algorithm modifier      |    Reserved     |  QErr  |  DQue  |
|-----+-----------------------------------------------------+--------+--------|
| 4   |  EECA  |              Reserved             | RAENP  | UAAENP | EAENP  |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|-----+---                        Ready AEN holdoff period                 ---|
| 7   |                                                                 (LSB) |
+=============================================================================+

A report log exception condition (RLEC) bit of one specifies that the target shall report log exception conditions as described in
+===========-====================================+
|   Value   |  Definition                        |
|-----------+------------------------------------|
|     0h    |  Restricted reordering             |
|     1h    |  Unrestricted reordering allowed   |
|  2h - 7h  |  Reserved                          |
|  8h - Fh  |  Vendor-specific                   |
+================================================+

A value of zero in this field specifies that the target shall order the actual execution sequence of the commands with a SIMPLE QUEUE tag such that data integrity is maintained for that initiator. This means that, if the transmission of new commands is halted at any time, the final value of all data observable on the medium shall have exactly the same value as it would have if the commands had been executed in the same received sequence without tagged queuing. The restricted reordering value shall be the default value.

A value of one in this field specifies that the target may reorder the actual execution sequence of the commands with a SIMPLE QUEUE tag in any manner. Any data integrity exposures related to command sequence order are explicitly handled by the initiator through the selection of appropriate commands and queue tag messages.

A queue error management (QErr) bit of zero specifies that remaining suspended I/O process shall resume after the contingent allegiance condition or extended contingent allegiance condition (see

A QErr bit of one specifies all remaining suspended I/O processes shall be aborted after the contingent allegiance condition or extended contingent allegiance condition (see 7.8). A unit attention condition (see 7.9) shall be generated for each initiator that had a suspended I/O process aborted except for the initiator that had the contingent allegiance condition or extended contingent allegiance condition. The target shall set the additional sense code to TAGGED COMMANDS CLEARED BY ANOTHER INITIATOR.

A disable queuing (DQue) bit of zero specifies that tagged queuing shall be enabled if the target supports tagged queuing. A DQue bit of one specifies that tagged queuing shall be disabled. Any queued commands for that I_T_x nexus shall be aborted. Any subsequent queue tag message received shall be rejected with a MESSAGE REJECT message and the I/O process shall be executed as an untagged command (see 7.8.1).

An enable extended contingent allegiance (EECA) bit of one specifies that extended contingent allegiance is enabled (see 7.7). An EECA bit of zero specifies that extended contingent allegiance is disabled.

The RAENP, UAAENP, and EAENP bits enable specific events to be reported via the asynchronous event notification protocol. When all three bits are zero, the target shall not create asynchronous event notifications.

A ready AEN permission (RAENP) bit of one specifies that the target may issue an asynchronous event notification upon completing its initialization sequence instead of generating a unit attention condition. A RAENP bit of zero specifies that the target shall not issue an asynchronous event notification upon completing its initialization sequence.

NOTE 100 If the target's default value for the RAENP bit is one and it does not implement saved parameters or include a hardware switch, then it may not be possible to disable the initialization sequence asynchronous event notification.

A unit attention AEN permission (UAAENP) bit of one specifies that the target may issue an asynchronous event notification instead of creating a unit attention condition upon detecting an event that would cause a unit attention condition (other than upon completing an initialization sequence). A UAAENP bit of zero specifies that the target shall not issue an asynchronous event notification instead of creating a unit attention condition.

An error AEN permission (EAENP) bit of one specifies that the target may issue an asynchronous event notification upon detecting a deferred error condition instead of waiting to report the deferred error on the next command. An EAENP bit of zero specifies that the target shall not report deferred error conditions via an asynchronous event notification.

The ready AEN holdoff period field specifies the minimum time in milliseconds after the target starts its initialization sequence that it shall delay before attempting to issue an asynchronous event notification. This value may be rounded up as defined in 7.5.4. table 98) provides the initiator the means to tune the performance of the SCSI bus.

#### 8.3.3.2 Disconnect-reconnect page

The disconnect-reconnect page (see

The buffer empty ratio field indicates to the target, on write operations, how empty the buffer should be prior to attempting a reselection. Targets that do not implement the requested ratio should round down to the nearest implemented ratio as defined in 7.5.4.

The buffer full and buffer empty ratios are numerators of a fractional multiplier that has 256 as its denominator. A value of zero indicates that the target determines when to initiate reselection consistent with the disconnect time limit parameter. These parameters are advisory to the target.

NOTE 101 As an example, consider a target with ten 512-byte buffers and a specified buffer full ratio of 3Fh. The formula is: INTEGER((ratio/256)*number of buffers). Thus INTEGER((3Fh/256)*10) = 2. The target should attempt to reselect the initiator on read operations whenever two or more buffers are full.

The bus inactivity limit field indicates the maximum time in 100 us increments that the target is permitted to assert the BSY signal without a REQ/ACK handshake. If the bus inactivity limit is exceeded the target shall attempt to disconnect if the initiator has granted the disconnect privilege (see 6.6.7) and it is not restricted by DTDC. This value may be rounded as defined in 7.5.4. A value of zero indicates that there is no bus inactivity limit.

The disconnect time limit field indicates the minimum time in 100 us increments that the target shall wait after releasing the SCSI bus before attempting reselection. This value may be rounded as defined in 7.5.4. A value of zero indicates that there is no disconnect time limit.

The connect time limit field indicates the maximum time in 100 us increments that the target is allowed to use the SCSI bus before disconnecting, if the initiator has granted the disconnect privilege (see 6.6.7) and it is not restricted by DTDC. This value may be rounded as defined in 7.5.4. A value of zero indicates that there is no connect time limit.

The maximum burst size field indicates the maximum amount of data that the target shall transfer during a data phase before disconnecting if the initiator has granted the disconnect privilege. This value is expressed in increments of 512 bytes (e.g. a value of one means 512 bytes, two means 1024 bytes, etc.). A value of zero indicates there is no limit on the amount of data transferred per connection.

The data transfer disconnect control (DTDC) field (see table 99) defines further restrictions on when a disconnect is permitted.

table 100) is used to pass vendor-specific information between an initiator and a peripheral interface below the target (i.e. between the target and the peripheral device). This International Standard does not define the format of this data, except to provide a standard header.

#### Table 98 - Disconnect-reconnect page

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+========+=====================================================|
| 0   |   PS   |Reserved|         Page code (02h)                             |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page length (0Eh)                           |
|-----+-----------------------------------------------------------------------|
| 2   |                           Buffer full ratio                           |
|-----+-----------------------------------------------------------------------|
| 3   |                           Buffer empty ratio                          |
|-----+-----------------------------------------------------------------------|
| 4   | (MSB)                                                                 |
|-----+---                        Bus inactivity limit                     ---|
| 5   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|-----+---                        Disconnect time limit                    ---|
| 7   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|-----+---                        Connect time limit                       ---|
| 9   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 10  | (MSB)                                                                 |
|-----+---                        Maximum burst size                       ---|
| 11  |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 12  |                           Reserved                  |      DTDC       |
|-----+-----------------------------------------------------------------------|
| 13  |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 14  |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 15  |                           Reserved                                    |
+=============================================================================+

The buffer full ratio field indicates to the target, on read operations, how full the buffer should be prior to attempting a reselection. Targets that do not implement the requested ratio should round down to the nearest implemented ratio as defined in
+=======-=====================================================================+
| DTDC  |  Description                                                        |
|-------+---------------------------------------------------------------------|
|  00b  |  Data transfer disconnect control is not used.  Disconnect is       |
|       |  controlled by the other fields in this page.                       |
|  01b  |  A target shall not attempt to disconnect once the data transfer of |
|       |  a command has started until all data the command is to transfer has|
|       |  been transferred.  The connect time limit and bus inactivity limit |
|       |  are ignored during the data transfer.                              |
|  10b  |  Reserved                                                           |
|  11b  |  A target shall not attempt to disconnect once the data transfer of |
|       |  a command has started, until the command is complete.  The connect |
|       |  time limit and bus inactivity limit are ignored once data transfer |
|       |  has started.                                                       |
+=============================================================================+

If DTDC is non-zero and the maximum burst size is non-zero, the target shall return CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL FIELD IN PARAMETER LIST.

#### 8.3.3.3 Peripheral device page

The peripheral device page (see

table 102) that are applicable to all SCSI devices. These pages are optionally returned by the INQUIRY command (8.2.5) and contain vendor-specific product information about a target or logical unit. The vital product data may include vendor identification, product identification, unit serial numbers, device operating definitions, manufacturing data, field replaceable unit information, and other vendor- specific information. This International Standard defines the structure of the vital product data, but not the contents.

8.3.4.1 | | 01h - 7Fh | ASCII information page | 8.3.4.2 | | 81h | Implemented operating definitions page | 8.3.4.3 | | 00h | Supported vital product data pages | 8.3.4.4 | | 80h | Unit serial number page | 8.3.4.5 | | 83h - BFh | Reserved | | | C0h - FFh | Vendor-specific | | +=============================================================================+

#### Table 100 - Peripheral device page

+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+========+========+=====================================================|
| 0   |   PS   |Reserved|         Page code (09h)                             |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page length (n-1)                           |
|-----+-----------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|-----+---                        Interface identifier                     ---|
| 3   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 8   |                                                                       |
|-----+---                        Vendor-specific                          ---|
| n   |                                                                       |
+=============================================================================+

Interface identifier codes are defined in the
+=================-======================================-====================+
|                 |                                      |       ANSI         |
|   Code value    |               Interface              | Reference standard |
|-----------------+--------------------------------------+--------------------|
|      0000h      |  Small computer cystem interface     |  X3.131-1986       |
|      0001h      |  Storage module interface            |  X3.91M-1990       |
|      0002h      |  Enhanced small device interface     |  X3.170A-1991      |
|      0003h      |  Intelligent peripheral interface-2  |  X3.130-1986;      |
|                 |                                      |    X3T9.3/87-002   |
|      0004h      |  Intelligent peripheral interface-3  |  X3.132-1987;      |
|                 |                                      |    X3.147-1988     |
|  0005h - 7FFFh  |  Reserved                            |                    |
|  8000h - FFFFh  |  Vendor-specific                     |                    |
+=============================================================================+

+=============-==================================================-============+
|  Page code  |  Description                                     | Subclause  |
|-------------+--------------------------------------------------+------------|
|     82h     |  ASCII implemented operating definition page     |  

#### 8.3.4.1 ASCII implemented operating definition page

The ASCII implemented operation definition page (see

The page length field specifies the length of the following page data. If the allocation length is less than the length of the data to be returned, the page length shall not be adjusted to reflect the truncation.

The ASCII operating definition description length field specifies the length in bytes of the ASCII operating definition description data that follows. If the allocation length is less than the length of data to be returned, the ASCII operating definition description length shall not be adjusted to reflect the truncation. A value of zero in this field indicates that no ASCII operating definition description data is available.

The ASCII operating definition description data field contains the ASCII operating definition description data for the target or logical unit. The data in this field shall be formatted in lines (or character strings). Each line shall contain only graphic codes (i.e. code values 20h through 7Eh) and shall be terminated with a NULL (00h) character.

table 104) returns information for the field replaceable unit code returned in the REQUEST SENSE data (see 8.2.14).

#### 8.3.4.2 ASCII information page

The ASCII information page (see

The page code field contains the same value as in the page code field of the INQUIRY command descriptor block (see 8.2.5) and is associated with the field replaceable unit code returned by the REQUEST SENSE command.

NOTE 102 The field replaceable unit field in the sense data provides for 255 possible codes, while the page code field provides for only 127 possible codes. Thus it is not possible to return ASCII information pages for the upper code values.

The page length field specifies the length of the following page data. If the allocation length of the command descriptor block is too small to transfer all of the page, the page length shall not be adjusted to reflect the truncation.

The ASCII length field specifies the length in bytes of the ASCII information that follows. If the allocation length is less than the length of the data to be returned, the ASCII length shall not be adjusted to reflect the truncation. A value of zero in this field indicates that no ASCII information is available for the specified page code.

The ASCII information field contains ASCII information concerning the field replaceable unit identified by the page code. The data in this field shall be formatted in one or more lines (or character strings). Each line shall contain only graphic codes (i.e. code values 20h through 7Eh) and shall be terminated with a NULL (00h) character.

The contents of the vendor-specific information field is not defined in this International Standard.

table 105) defines the current operating definition, the default operating definition, and the operating definitions implemented by the target. These operating definition values are specified in the CHANGE DEFINITION command (see 8.2.1).

#### 8.3.4.3 Implemented operating definition page

The implemented operating definition page (see

The page length field specifies the length of the following operating definitions. If the allocation length of the command descriptor block is too small to transfer all of the page, the page length shall not be adjusted to reflect the truncation.

For each operating definition, there is an associated save implemented (SavImp) bit. A SavImp bit of zero indicates that the corresponding operating definition parameter cannot be saved. A SavImp bit of one indicates that the corresponding operating definition parameter can be saved.

All returned operating definitions use the codes defined in table 33. The current operating definition field returns the value of the present operating definition. If no operating definition is saved, the default operating definition field returns the value of the operating definition the target uses when power is applied. The supported operating definition list returns one or more operating definitions implemented by the target.

#### 8.3.4.4 Supported vital product data pages

The supported vital product data pages are shown in

The page code field shall be set to the value of the page code field in the INQUIRY command descriptor block (see 8.2.5).

The page length field specifies the length of the supported page list. If the allocation length is too small to transfer all of the page, the page length shall not be adjusted to reflect the truncation.

The supported page list field shall contain a list of all vital product data page codes implemented for the target or logical unit in ascending order beginning with page code 00h.

table 107) provides a product serial number for the target or logical unit.

#### 8.3.4.5 Unit serial number page

The page length field specifies the length of the product serial number. If the allocation length is too small to transfer all of the page, the page length shall not be adjusted to reflect the truncation.

The product serial number field contains ASCII data that is vendor- specific. The least significant ASCII character of the serial number shall appear as the last byte of a successful data transfer. If the product serial number is not available, the target shall return ASCII spaces (20h) in this field.

#### Table 103 - ASCII implemented operating definition

table 103) contains operating definition description data for all operating definitions implemented by the target. The contents of this data is not defined by this International Standard.
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+============================================|
| 0   | Peripheral qualifier     |           Peripheral device type           |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page code (82h)                             |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Page length (n-3)                           |
|-----+-----------------------------------------------------------------------|
| 4   |              ASCII operating definition description length (m-4)      |
|-----+-----------------------------------------------------------------------|
| 5   |                                                                       |
|- - -+---           ASCII operating definition description data           ---|
| m   |                                                                       |
|-----+-----------------------------------------------------------------------|
| m+1 |                                                                       |
|- - -+---           Vendor-specific description data                      ---|
| n   |                                                                       |
+=============================================================================+

The peripheral qualifier field and the peripheral device type field are as defined in
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+============================================|
| 0   | Peripheral qualifier     |           Peripheral device type           |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page code (01h - 7Fh)                       |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Page length (n-3)                           |
|-----+-----------------------------------------------------------------------|
| 4   |                           ASCII length (m-4)                          |
|-----+-----------------------------------------------------------------------|
| 5   |                                                                       |
|- - -+---                        ASCII information                        ---|
| m   |                                                                       |
|-----+-----------------------------------------------------------------------|
| m+1 |                                                                       |
|- - -+---                        Vendor-specific information              ---|
| n   |                                                                       |
+=============================================================================+

The peripheral qualifier field and the peripheral device type field are defined in
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+============================================|
| 0   | Peripheral qualifier     |           Peripheral device type           |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page code (81h)                             |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Page length (n-3)                           |
|-----+-----------------------------------------------------------------------|
| 4   |Reserved|         Current operating definition                         |
|-----+--------+--------------------------------------------------------------|
| 5   | SavImp |         Default operating definition                         |
|-----+--------+--------------------------------------------------------------|
| 6   | SavImp |                                                              |
|-----+---     +         Supported operating definition list               ---|
| n   | SavImp |                                                              |
+=============================================================================+

The peripheral qualifier field and the peripheral device type field are defined in
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+============================================|
| 0   | Peripheral qualifier     |           Peripheral device type           |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page code (00h)                             |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Page length (n-3)                           |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|-----+---                        Supported page list                      ---|
| n   |                                                                       |
+=============================================================================+

The peripheral qualifier field and the peripheral device type field are defined in
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+============================================|
| 0   | Peripheral qualifier     |           Peripheral device type           |
|-----+-----------------------------------------------------------------------|
| 1   |                           Page code (80h)                             |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           Page length (n-3)                           |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|- - -+---                        Product serial number                    ---|
| n   |                                                                       |
+=============================================================================+

The peripheral qualifier field and the peripheral device type field are defined in 6.6.7).
• 本文已收录于以下专栏：

举报原因： 您举报文章：SCSI-2 Spec - All device types 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)