SCSI_EXTENDED_SENSE(9S) | Data Structures for Drivers | SCSI_EXTENDED_SENSE(9S) |
scsi_extended_sense - SCSI extended sense structure
#include <sys/scsi/scsi.h>
illumos DDI specific (illumos DDI).
The scsi_extended_sense structure for error codes 0x70 (current errors) and 0x71 (deferred errors) is returned on a successful REQUEST SENSE command. SCSI-2 compliant targets are required to return at least the first 18 bytes of this structure. This structure is part of scsi_device(9S) structure.
uchar_t es_valid :1; /* Sense data is valid */ uchar_t es_class :3; /* Error Class- fixed at 0x7 */ uchar_t es_code :4; /* Vendor Unique error code */ uchar_t es_segnum; /* Segment number: for COPY cmd only */ uchar_t es_filmk :1; /* File Mark Detected */ uchar_t es_eom :1; /* End of Media */ uchar_t es_ili :1; /* Incorrect Length Indicator */ uchar_t es_key :4; /* Sense key */ uchar_t es_info_1; /* Information byte 1 */ uchar_t es_info_2; /* Information byte 2 */ uchar_t es_info_3; /* Information byte 3 */ uchar_t es_info_4; /* Information byte 4 */ uchar_t es_add_len; /* Number of additional bytes */ uchar_t es_cmd_info[4]; /* Command specific information */ uchar_t es_add_code; /* Additional Sense Code */ uchar_t es_qual_code; /* Additional Sense Code Qualifier */ uchar_t es_fru_code; /* Field Replaceable Unit Code */ uchar_t es_skey_specific[3]; /* Sense Key Specific information */
es_valid, if set, indicates that the information field contains valid information.
es_class should be 0x7.
es_code is either 0x0 or 0x1.
es_segnum contains the number of the current segment descriptor if the REQUEST SENSE command is in response to a COPY, COMPARE, and COPY AND VERIFY command.
es_filmk, if set, indicates that the current command had read a file mark or set mark (sequential access devices only).
es_eom, if set, indicates that an end-of-medium condition exists (sequential access and printer devices only).
es_ili, if set, indicates that the requested logical block length did not match the logical block length of the data on the medium.
es_key indicates generic information describing an error or exception condition. The following sense keys are defined:
KEY_NO_SENSE
KEY_RECOVERABLE_ERROR
KEY_NOT_READY
KEY_MEDIUM_ERROR
KEY_HARDWARE_ERROR
KEY_ILLEGAL_REQUEST
KEY_UNIT_ATTENTION
KEY_WRITE_PROTECT/KEY_DATA_PROTECT
KEY_BLANK_CHECK
KEY_VENDOR_UNIQUE
KEY_COPY_ABORTED
KEY_ABORTED_COMMAND
KEY_EQUAL
KEY_VOLUME_OVERFLOW
KEY_MISCOMPARE
KEY_RESERVE
es_info_{1,2,3,4} is device-type or command specific.
es_add_len indicates the number of additional sense bytes to follow.
es_cmd_info contains information that depends on the command that was executed.
es_add_code (ASC) indicates further information related to the error or exception condition reported in the sense key field.
es_qual_code (ASCQ) indicates detailed information related to the additional sense code.
es_fru_code (FRU) indicates a device-specific mechanism to unit that has failed.
es_skey_specific is defined when the value of the sense-key specific valid bit (bit 7) is 1. This field is reserved for sense keys not defined above.
ANSI Small Computer System Interface-2 (SCSI-2)
Writing Device Drivers
August 30, 1995 | OmniOS |