Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

scsi_device(9S)

scsi_extended_sense(9S)

NAME

scsi_extended_sense − SCSI extended sense structure

SYNOPSIS

#include <sys/scsi/scsi.h>

INTERFACE LEVEL

Solaris DDI specific (Solaris DDI). 

DESCRIPTION

The scsi_extended_sense structure for error codes 0x70  (current errors)  and 0x71 (deferred errors) is returned on a successful REQUEST SENSE commands. SCSI-2 compliant targets are required to at least return the first 18 bytes of this structure.  This structure is part of scsi_device(9S) structure. 

STRUCTURE ELEMENTS

u_char es_valid :1, /∗ sense data is valid ∗/
es_class :3, /∗ Error Class- fixed at 0x7 ∗/
es_code :4; /∗ Vendor Unique error code ∗/
u_char es_segnum; /∗ segment number: for COPY cmd only ∗/
u_char es_filmk :1, /∗ File Mark Detected ∗/
es_eom :1, /∗ End of Media ∗/
es_ili :1, /∗ Incorrect Length Indicator ∗/
:1, /∗ reserved ∗/
es_key :4; /∗ Sense key ∗/
u_char es_info_1; /∗ information byte 1 ∗/
u_char es_info_2; /∗ information byte 2 ∗/
u_char es_info_3; /∗ information byte 3 ∗/
u_char es_info_4; /∗ information byte 4 ∗/
u_char es_add_len; /∗ number of additional bytes ∗/
u_char es_cmd_info[4]; /∗ command specific information ∗/
u_char es_add_code; /∗ Additional Sense Code ∗/
u_char es_qual_code; /∗ Additional Sense Code Qualifier ∗/
u_char es_fru_code; /∗ Field Replaceable Unit Code ∗/
u_char 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, COPY AND VERIFY command. 

es_filmk, if set, indicates that the current command had read a filemark or setmark (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 Indicates that there is no specific sense key information to be reported. 

KEY_RECOVERABLE_ERROR
Indicates that the last command completed successfully with some recovery action performed by the target.

KEY_NOT_READY
Indicates that the logical unit addressed cannot be accessed.

KEY_MEDIUM_ERROR
Indicates that the command terminated with a non-recovered error condition that was probably caused by a flaw on the medium or an error in the recorded data.

KEY_HARDWARE_ERROR
Indicates that the target detected a non-recoverable hardware failure while performing the command or during a self test.

KEY_ILLEGAL_REQUEST
Indicates that there was an illegal parameter in the CDB or in the additional parameters suppiled as data for some commands.

KEY_UNIT_ATTENTION
Indicates that the removable medium may have been changed or the target has been reset.

KEY_WRITE_PROTECT/KEY_DATA_PROTECT
Indicates that a command that reads or writes the medium was attempted on a block  tat is protected from this operation.

KEY_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.

KEY_VENDOR_UNIQUE
This sense key is available for reporting vendor-specific conditions.

KEY_COPY_ABORTED
Indicates a COPY, COMPARE, COPY AND VERIFY command was aborted. 

KEY_ABORTED_COMMAND
Indicates that the target aborted the command.

KEY_EQUAL Indicates a SEARCH DATA command has satisfied an equal comparison. 

KEY_VOLUME_OVERFLOW
Indicates that a buffered peripheral device has reach the end-of-partition and data may remain in the  buffer that has not been written to the medium.

KEY_MISCOMPARE
Indicates that the source data did not match the data read from the medium.

KEY_RESERVE Indicates that the target is currently reserved by a different initiator. 

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 which 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 one. This field is reserved for sense keys not defined above. 

SEE ALSO

scsi_device(9S)

ANSI Small Computer System Interface-2 (SCSI-2)

Writing Device Drivers

SunOS 5.4  —  Last change: 4 Mar 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026