SCSI Request Sense Command

The SCSI Request Sense command is used to obtain sense data (error information) from a target device.

The CDB structure is:

bit→
↓byte

7

6

5

4

3

2

1

0

0

Operation code = 03h

1

LUN

Reserved

2

Reserved

3

Reserved

4

Allocation length

5

Control

The response is a set of SCSI sense data which is structured like this:

bit→
↓byte

7

6

5

4

3

2

1

0

0

Valid

Error code

1

Segment number

2

Filemark

EOM

ILI

Reserved

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

16

Sense-key specific

17

Sense-key specific

18

Additional sense bytes (variable number of bytes)

The special control fields in the sense data have the following meaning:

  • Valid -
    • 0 - sense data are not SCSI compliant
    • 1 - sense data are SCSI compliant
  • Error code -
    • 70h - current errors
    • 71h - deferred errors
    • all other values are reserved
  • Segment number - valid only if the current command is COPY, COMPARE, or COPY AND VERIFY
  • Filemark - 1 = the current command has reached a filemark or setmark (sequential-access devices only)
  • EOM - 1 = end-of-medium (sequential-access devices) OR out-of-paper (printers)
  • ILI - incorrect length indicator - 1 = 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 fields are usually considered in aggregate to be a 20 bit field called the KCQ. A composite value of 00000h indicates no error, all other values describe specific error conditions. See the main KCQ article for a complete list.
  • SKSV - Sense Key Specific Valid -
    • 0 - sense key specific data are not SCSI compliant
    • 1 - sense key specific data are SCSI compliant
  • Additional sense bytes - can contain vendor-specific data
    • Bytes 20-21 can be used for a Unit Error Code (UEC)