SPC-4 Changes
SPC-4 Changes
1
Page 1 of 10
From: Gerry Houlder, Seagate Technology <[email protected]>
Subj: SPC-4 Remove restrictions on sense data valid bits
Date: Sept. 25, 2008
__________________________________________________
Overview
There is wording in the sense data descriptor format that requires certain validity bits to always
be set to 1. This assumes that, whenever the associated descriptors are not needed, they are
never returned. However this implementation requires more firmware effort than an
implementation that simply returns all the descriptors (whether needed or not) and fills in the valid
bits appropriately. This implementation is also easiest to translate to fixed descriptor format when
required.
My goal is to remove the restrictive wording on the validity bit descriptions so that they are not
required to always be set to 1.
SPC-4 changes:
4.5.2 Descriptor format sense data
4.5.2.1 Descriptor format sense data overview
The descriptor format sense data for response codes 72h (current errors) and 73h (deferred
errors) is defined in table 25.
Table 25 Descriptor format sense data
Bit
Byte
7 6 5 4 3 2 1 0
0 Resvd RESPONSE CODE (72h or 73h)
1 Reserved SENSE KEY
2 ADDITIONAL SENSE CODE
3 ADDITIONAL SENSE CODE QUALIFIER
4 (MSB)
6 (LSB)
7 ADDITIONAL SENSE LENGTH (n - 7)
Sense data descriptor(s)
8 Sense data descriptor 0 (see table 26)
:
:
Sense data descriptor x (see table 26)
n
The contents of the RESPONSE CODE field indicate the error type and format of the sense data (see
4.5.1). For descriptor format sense data, the RESPONSE CODE field shall be set to 72h or 73h.
The SENSE KEY, ADDITIONAL SENSE CODE and ADDITIONAL SENSE CODE QUALIFIER fields provide a
hierarchy of information. The hierarchy provides a top-down approach for an application client to
determine information relating to the error and exception conditions.
document T10/08-321 rev. 1
Page 2 of 10
The SENSE KEY field indicates generic information describing an error or exception condition. The
sense keys are defined in 4.5.6.
The ADDITIONAL SENSE CODE (ASC) field indicates further information related to the error or
exception condition reported in the SENSE KEY field. Support of the additional sense codes not
required by this standard is optional. A list of additional sense codes is in 4.5.6. If the device
server does not have further information related to the error or exception condition, the additional
sense code shall be set to zero.
The ADDITIONAL SENSE CODE QUALIFIER (ASCQ) field indicates detailed information related to the
additional sense code. If the error or exception condition is reported by the device server, the
value returned shall be as specified in 4.5.6. If the device server does not have detailed
information related to the error or exception condition, the additional sense code qualifier shall be
set to zero.
The ADDITIONAL SENSE LENGTH field indicates the number of additional sense bytes that follow. The
additional sense length shall be less than or equal to 244 (i.e., limiting the total length of the
sense data to 252 bytes). If the sense data is being returned as parameter data by a REQUEST
SENSE command, then the relationship between the ADDITIONAL SENSE LENGTH field and the CDB
ALLOCATION LENGTH field is defined in 4.3.5.6.
Sense data descriptors (see table 26) provide specific sense information. A given type of sense
data descriptor shall be included in the sense data only may be excluded from the sense data
when the information it contains is invalid.
Table 26 Sense data descriptor format
Bit
Byte
7 6 5 4 3 2 1 0
0 DESCRIPTOR TYPE
1 ADDITIONAL LENGTH (n-1)
2 Sense data descriptor specific
n
The DESCRIPTOR TYPE field (see table 27) identifies the type of sense data descriptor. No more
than one sense data descriptor of each type shall be included in the descriptor format sense
data.
Table 27 DESCRIPTOR TYPE field
Code Description Reference
00h Information 4.5.2.2
01h Command specific information 4.5.2.3
02h Sense key specific 4.5.2.4
03h Field replaceable unit 4.5.2.5
04h Stream commands SSC-3
05h Block commands SBC-3
06h OSD object identification OSD
07h OSD response integrity check value OSD
08h OSD attribute identification OSD
09h ATA status return SAT
0Ah to 7Fh Reserved
80h to FFh Vendor specific 4.5.2.6
document T10/08-321 rev. 1
Page 3 of 10
The ADDITIONAL LENGTH field indicates the number of sense data descriptor specific bytes that
follow in the sense data descriptor.
4.5.2.2 Information sense data descriptor
The information sense data descriptor (see table 28) provides information that is device-type or
command specific and is defined in a command standard (see 3.1.27).
Table 28 Information sense data descriptor format
Bit
Byte
7 6 5 4 3 2 1 0
0 DESCRIPTOR TYPE (00h)
1 ADDITIONAL LENGTH (0Ah)
2 VALID(1b) Reserved
3 Reserved
4 (MSB) INFORMATION
11 (LSB)
The DESCRIPTOR TYPE and ADDITIONAL LENGTH fields are described in 4.5.2.1. For the information
sense data descriptor, the DESCRIPTOR TYPE field shall be set to 00h and the ADDITIONAL LENGTH
field shall be set to 0Ah.
The VALID bit shall be set to one.
NOTE 2 - In previous versions of this standard and in the fixed format sense data, the VALID bit indicates
whether the contents of the INFORMATION field is valid as defined by a command standard. Since the contents
of the INFORMATION field are valid whenever an information sense data descriptor is included in the sense
data, the only legal value for the VALID bit is set to one.
A VALID bit set to zero indicates that the INFORMATION field is not defined in this standard or any
other command standard (see 3.1.27). A VALID bit set to one indicates the INFORMATION field
contains valid information as defined in this standard or a command standard.
The contents of the INFORMATION field are device-type or command specific and are defined in a
command standard (see 3.1.27). When a four byte quantity is stored in the INFORMATION field, the
first four bytes shall be zero.
4.5.2.3 Command-specific information sense data descriptor
The command-specific information sense data descriptor (see table 29) provides information that
depends on the command on which the exception condition occurred.
Table 29 Command-specific Information sense data descriptor format
Bit
Byte
7 6 5 4 3 2 1 0
0 DESCRIPTOR TYPE (01h)
1 ADDITIONAL LENGTH (0Ah)
2 Reserved
3 Reserved
4 COMMAND-SPECIFIC INFORMATION
11
The DESCRIPTOR TYPE and ADDITIONAL LENGTH fields are described in 4.5.2.1. For the command-
specific information sense data descriptor, the DESCRIPTOR TYPE field shall be set to 01h and the
ADDITIONAL LENGTH field shall be set to 0Ah.
document T10/08-321 rev. 1
Page 4 of 10
The COMMAND-SPECIFIC INFORMATION field contains information that depends on the command on
which the exception condition occurred. When a four byte quantity is stored in the COMMAND-
SPECIFIC INFORMATION field, the first four bytes shall be zero.
Further meaning for the COMMAND-SPECIFIC INFORMATION field is defined within the command
description in the appropriate command standard (e.g., see SBC-3 for the REASSIGN BLOCKS
commands, or see 6.3 for the EXTENDED COPY command).
4.5.2.4 Sense key specific sense data descriptor
4.5.2.4.1 Sense key specific sense data descriptor introduction
The sense key specific sense data descriptor (see table 30) provides additional information about
the exception condition. The format and content of the sense-key specific data depends on the
value in the SENSE KEY field (see 4.5.2.1).
Table 30 Sense key specific sense data descriptor format
Bit
Byte
7 6 5 4 3 2 1 0
0 DESCRIPTOR TYPE (02h)
1 ADDITIONAL LENGTH (06h)
2 Reserved
3 Reserved
4 SKSV(1b)
5 SENSE KEY SPECIFIC
6
Reserved
The DESCRIPTOR TYPE and ADDITIONAL LENGTH fields are described in 4.5.2.1. For the sense-key
specific sense data descriptor, the DESCRIPTOR TYPE field shall be set to 01h and the ADDITIONAL
LENGTH field shall be set to 06h.
The sense-key specific valid (SKSV) bit shall be set to one.
NOTE 3 - In previous versions of this standard and in the fixed format sense data, the SKSV bit indicates
whether the contents of the SENSE KEY SPECIFIC field are valid as defined by a command standard. Since the
contents of the SENSE KEY SPECIFIC field are valid whenever a sense key specific sense data descriptor is
included in the sense data, the only legal value for the SKSV bit is set to one.
A sense-key specific valid (SKSV) bit set to one indicates the SENSE KEY SPECIFIC field contains
valid information as defined in this standard. An SKSV bit set to zero indicates that the SENSE KEY
SPECIFIC field is not as defined by this standard.
document T10/08-321 rev. 1
Page 5 of 10
The definition of the SENSE KEY SPECIFIC field (see table 31) is determined by the value of the
SENSE KEY field (see 4.5.2.1).
Table 31 Sense key specific sense data descriptor definitions
Sense Key Sense key specific field definition Reference
ILLEGAL REQUEST Field pointer 4.5.2.4.2
HARDWARE ERROR,
MEDIUM ERROR, or
RECOVERED ERROR
Actual retry count 4.5.2.4.3
NO SENSE or
NOT READY
Progress indication 4.5.2.4.4
COPY ABORTED Segment pointer 4.5.2.4.5
UNIT ATTENTION Unit attention condition queue overflow 4.5.2.4.6
All other sense keys The sense key specific sense data
descriptor shall not appear in the
descriptor format sense data and the
SKSV bit (see 4.5.3) shall be set to
zero in the fixed format sense data
Reserved bytes
4.5.2.4.7
4.5.2.4.2 Field pointer sense key specific data
If the sense key is ILLEGAL REQUEST, then the SENSE KEY SPECIFIC field shall be as shown in
table 32.
Table 32 Field pointer sense key specific data
Bit
Byte
7 6 5 4 3 2 1 0
0 SKSV(1b) C/D Reserved BPV BIT POINTER
1 FIELD POINTER
2
The SKSV bit is described in 4.5.2.4.1 for descriptor format sense data and in 4.5.3 for fixed format
sense data.
A command data (C/D) bit set to one indicates that the illegal parameter is in the CDB. A C/D bit
set to zero indicates that the illegal parameter is in the data parameters sent by the application
client in the Data-Out Buffer.
A bit pointer valid (BPV) bit set to zero indicates that the value in the BIT POINTER field is not valid.
A BPV bit set to 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 first bit (i.e., the left-most bit) of the field.
The FIELD POINTER field indicates which byte of the CDB 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 field pointer shall point to the first byte (i.e.,
the left-most byte) of the field. If several consecutive bytes are reserved, each shall be treated as
a single-byte field.
NOTE 4 - The bytes identified as being in error are not necessarily the bytes that need to be changed to
correct the problem.
4.5.2.4.3 Actual retry count sense key specific data
document T10/08-321 rev. 1
Page 6 of 10
If the sense key is HARDWARE ERROR, MEDIUM ERROR, or RECOVERED ERROR, then the
SENSE KEY SPECIFIC field shall be as shown in table 33.
Table 33 Actual retry count sense key specific data
Bit
Byte
7 6 5 4 3 2 1 0
0 SKSV(1b) Reserved
1 ACTUAL RETRY COUNT
2
The SKSV bit is described in 4.5.2.4.1 for descriptor format sense data and in 4.5.3 for fixed format
sense data.
The ACTUAL RETRY COUNT field returns vendor specific information on the number of retries of the
recovery algorithm used in attempting to recover an error or exception condition.
NOTE 5 - This field should be computed in the same way as the retry count fields within the Read-Write
Error Recovery mode page (see SBC-2, SSC-3, and MMC-4).
4.5.2.4.4 Progress indication sense key specific data
If the sense key is NO SENSE or NOT READY, the SENSE KEY SPECIFIC field shall be as shown in
table 34.
Table 34 Progress Indication sense key specific data
Bit
Byte
7 6 5 4 3 2 1 0
0 SKSV(1b) Reserved
1 PROGRESS INDICATION
2
The SKSV bit is described in 4.5.2.4.1 for descriptor format sense data and in 4.5.3 for fixed format
sense data.
The PROGRESS INDICATION field is a percent complete indication in which the returned value is a
numerator that has 65 536 (10000h) as its denominator. The progress indication shall be based
upon the total operation.
NOTE 6 - The progress indication should be time related, however this is not an absolute requirement. (E.g.,
since format time varies with the number of defects encountered, etc., it is reasonable for the device server
to assign values to various steps within the process. The granularity of these steps should be small enough
to provide reasonable assurances to the application client that progress is being made.)
4.5.2.4.5 Segment pointer sense key specific data
If the sense key is COPY ABORTED, the SENSE KEY SPECIFIC field shall be as shown in table 35.
Table 35 Segment pointer sense key specific data
Bit
Byte
7 6 5 4 3 2 1 0
0 SKSV(1b) Resvd SD Resvd BPV BIT POINTER
1 FIELD POINTER
2
document T10/08-321 rev. 1
Page 7 of 10
The SKSV bit is described in 4.5.2.4.1 for descriptor format sense data and in 4.5.3 for fixed format
sense data.
The segment descriptor (SD) bit indicates whether the field pointer is relative to the start of the
parameter list or to the start of a segment descriptor. An SD bit set to zero indicates that the field
pointer is relative to the start of the parameter list. An SD bit set to one indicates that the field
pointer is relative to the start of the segment descriptor indicated by the third and fourth bytes of
the COMMAND-SPECIFIC INFORMATION field (see 6.3.3).
A bit pointer valid (BPV) bit set to zero indicates that the value in the BIT POINTER field is not valid.
A BPV bit set to 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 (i.e., left-most) bit of the field.
The FIELD POINTER field indicates which byte of the parameter list or segment descriptor was in
error.
If the parameter list is in excess of 65 528 bytes in length and SD is set to zero, the FIELD POINTER
value may not fit in two bytes provided by the sense key specific sense data descriptor.
4.5.2.4.6 Unit attention condition queue overflow sense key specific data
If the sense key is UNIT ATTENTION, the SENSE KEY SPECIFIC field shall be as shown in table 36.
Table 36 Unit attention queue overflow sense key specific data
Bit
Byte
7 6 5 4 3 2 1 0
0 SKSV(1b) Reserved OVERFLOW
1 Reserved
2
The SKSV bit is described in 4.5.2.4.1 for descriptor format sense data and in 4.5.3 for fixed format
sense data.
An OVERFLOW bit set to one indicates that the unit attention condition queue has overflowed. An
OVERFLOW bit set to zero indicates that the unit attention condition queue has not overflowed.
4.5.2.4.7 Other sense key specific data
If the sense key is not one of the defined values in the Sense Key column of table 31, the SENSE
KEY SPECIFIC field shall be as shown in table new1.
Table new1 Other sense key specific data
Bit
Byte
7 6 5 4 3 2 1 0
0 SKSV Reserved
1 Reserved
2
The SKSV bit is described in 4.5.2.4.1.
All other fields are reserved.
document T10/08-321 rev. 1
Page 8 of 10
4.5.2.5 Field replaceable unit sense data descriptor
The field replaceable unit sense data descriptor (see table 37) provides information about a
component that has failed.
Table 37 Field replaceable unit sense data descriptor format
Bit
Byte
7 6 5 4 3 2 1 0
0 DESCRIPTOR TYPE (03h)
1 ADDITIONAL LENGTH (02h)
2 Reserved
3 FIELD REPLACEABLE UNIT CODE
The DESCRIPTOR TYPE and ADDITIONAL LENGTH fields are described in 4.5.2.1. For the field
replaceable unit sense data descriptor, the DESCRIPTOR TYPE field shall be set to 03h and the
ADDITIONAL LENGTH field shall be set to 02h.
Non-zero values in the FIELD REPLACEABLE UNIT CODE field are used to identify a component that
has failed. A value of zero in this field indicates that no specific component has been identified to
have failed or that the data is not available. 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 VPD page (see 7.7.2), if supported by the device server.
4.5.2.6 Vendor specific sense data descriptors
Vendor specific sense data descriptors (see table 38) contain vendor specific data that further
defines the nature of the exception condition.
Table 38 Vendor specific sense data descriptor format
Bit
Byte
7 6 5 4 3 2 1 0
0 DESCRIPTOR TYPE (80h to FFh)
1 ADDITIONAL LENGTH (n-1)
2
n Vendor specific
The DESCRIPTOR TYPE and ADDITIONAL LENGTH fields are described in 4.5.2.1. For the vendor
specific sense data descriptor, the DESCRIPTOR TYPE field shall be set to a value between 80h and
FFh, inclusive.
document T10/08-321 rev. 1
Page 9 of 10
4.5.3 Fixed format sense data
The fixed format sense data for response codes 70h (current errors) and 71h (deferred errors) is
defined in table 39.
Table 39 Fixed format sense data
Bit
Byte
7 6 5 4 3 2 1 0
0 VALID RESPONSE CODE (70h or 71h)
1 Obsolete
2 FILEMARK EOM ILI Resvd SENSE KEY
3
6 INFORMATION
7 ADDITIONAL SENSE LENGTH (n-7)
8
11 COMMAND-SPECIFIC INFORMATION
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 set to zero indicates that the INFORMATION field is not defined in this standard or any
other command standard (see 3.1.27). A VALID bit set to one indicates the INFORMATION field
contains valid information as defined in this standard or a command standard.
The contents of the RESPONSE CODE field indicate the error type and format of the sense data (see
4.5.1). For fixed format sense data, the RESPONSE CODE field shall be set to 70h or 71h.
The meaning of the FILEMARK bit is device-type or command specific (e.g., see the SSC-3 READ
command and SPACE command for examples of FILEMARK bit usage) and the bit is defined in a
command standard (see 3.1.27).
The meaning of the end-of-medium (EOM) bit is device-type or command specific (e.g., see the
SSC-3 READ command, SPACE command, and WRITE command for examples of EOM bit
usage) and the bit is defined in a command standard (see 3.1.27).
The meaning of the incorrect length indicator (ILI) bit is device-type or command specific (e.g.,
see the SBC-3 READ LONG command, SBC-3 WRITE LONG command, and SSC-3 READ
command for examples of ILI bit usage) and the bit is defined in a command standard (see
3.1.27).
The SENSE KEY, ADDITIONAL SENSE CODE, and ADDITIONAL SENSE CODE QUALIFIER fields are
described in 4.5.2.1.
The contents of the INFORMATION field are device-type or command specific and are defined in a
command standard (see 3.1.27).
The ADDITIONAL SENSE LENGTH field indicates the number of additional sense bytes that follow. The
additional sense length shall be less than or equal to 244 (i.e., limiting the total length of the
sense data to 252 bytes). If the sense data is being returned as parameter data by a REQUEST
document T10/08-321 rev. 1
Page 10 of 10
SENSE command, then the relationship between the ADDITIONAL SENSE LENGTH field and the CDB
ALLOCATION LENGTH field is defined in 4.3.5.6.
The COMMAND-SPECIFIC INFORMATION field contains information that depends on the command on
which the exception condition occurred is described in 4.5.2.3.
The FIELD REPLACEABLE UNIT CODE field is described in 4.5.2.5.
A The sense-key specific valid (SKSV) bit set to one indicates the SENSE KEY SPECIFIC field
contains valid information as defined in this standard. An SKSV bit set to zero indicates that the
SENSE KEY SPECIFIC field is not as defined by this standard.
and the SENSE KEY SPECIFIC field is are described in 4.5.2.4.
The additional sense bytes may contain vendor specific data that further defines the nature of the
exception condition.
4.5.4 Current errors
[Remainder of this clause is unchanged.]