2 .\" Copyright (c) 2000, Sun Microsystems, Inc. , All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SCSI_EXTENDED_SENSE 9S "Aug 30, 1995"
8 scsi_extended_sense \- SCSI extended sense structure
12 #include <sys/scsi/scsi.h>
18 Solaris DDI specific (Solaris DDI).
22 The \fBscsi_extended_sense\fR structure for error codes \fB0x70\fR (current
23 errors) and \fB0x71\fR (deferred errors) is returned on a successful \fBREQUEST
24 SENSE\fR command. \fBSCSI-2 \fRcompliant targets are required to return at
25 least the first 18 bytes of this structure. This structure is part of
26 \fBscsi_device\fR(9S) structure.
31 uchar_t es_valid :1; /* Sense data is valid */
32 uchar_t es_class :3; /* Error Class- fixed at 0x7 */
33 uchar_t es_code :4; /* Vendor Unique error code */
34 uchar_t es_segnum; /* Segment number: for COPY cmd only */
35 uchar_t es_filmk :1; /* File Mark Detected */
36 uchar_t es_eom :1; /* End of Media */
37 uchar_t es_ili :1; /* Incorrect Length Indicator */
38 uchar_t es_key :4; /* Sense key */
39 uchar_t es_info_1; /* Information byte 1 */
40 uchar_t es_info_2; /* Information byte 2 */
41 uchar_t es_info_3; /* Information byte 3 */
42 uchar_t es_info_4; /* Information byte 4 */
43 uchar_t es_add_len; /* Number of additional bytes */
44 uchar_t es_cmd_info[4]; /* Command specific information */
45 uchar_t es_add_code; /* Additional Sense Code */
46 uchar_t es_qual_code; /* Additional Sense Code Qualifier */
47 uchar_t es_fru_code; /* Field Replaceable Unit Code */
48 uchar_t es_skey_specific[3]; /* Sense Key Specific information */
54 \fBes_valid\fR, if set, indicates that the information field contains valid
58 \fBes_class\fR should be \fB0x7\fR.
61 \fBes_code\fR is either \fB0x0\fR or \fB0x1\fR.
64 \fBes_segnum\fR contains the number of the current segment descriptor if the
65 \fBREQUEST SENSE \fRcommand is in response to a \fBCOPY\fR, \fBCOMPARE\fR, and
66 \fBCOPY AND VERIFY\fR command.
69 \fBes_filmk\fR, if set, indicates that the current command had read a file mark
70 or set mark (sequential access devices only).
73 \fBes_eom\fR, if set, indicates that an end-of-medium condition exists
74 (sequential access and printer devices only).
77 \fBes_ili\fR, if set, indicates that the requested logical block length did not
78 match the logical block length of the data on the medium.
81 \fBes_key\fR indicates generic information describing an error or exception
82 condition. The following sense keys are defined:
86 \fB\fBKEY_NO_SENSE\fR \fR
90 Indicates that there is no specific sense key information to be reported.
96 \fB\fBKEY_RECOVERABLE_ERROR\fR \fR
100 Indicates that the last command completed successfully with some recovery
101 action performed by the target.
107 \fB\fBKEY_NOT_READY\fR \fR
111 Indicates that the logical unit addressed cannot be accessed.
117 \fB\fBKEY_MEDIUM_ERROR\fR \fR
121 Indicates that the command terminated with a non-recovered error condition that
122 was probably caused by a flaw on the medium or an error in the recorded data.
128 \fB\fBKEY_HARDWARE_ERROR\fR \fR
132 Indicates that the target detected a non-recoverable hardware failure while
133 performing the command or during a self test.
139 \fB\fBKEY_ILLEGAL_REQUEST\fR \fR
143 Indicates that there was an illegal parameter in the \fBCDB\fR or in the
144 additional parameters supplied as data for some commands.
150 \fB\fBKEY_UNIT_ATTENTION\fR \fR
154 Indicates that the removable medium might have been changed or the target has
161 \fB\fBKEY_WRITE_PROTECT/KEY_DATA_PROTECT\fR \fR
165 Indicates that a command that reads or writes the medium was attempted on a
166 block that is protected from this operation.
172 \fB\fBKEY_BLANK_CHECK\fR \fR
176 Indicates that a write-once device or a sequential access device encountered
177 blank medium or format-defined end-of-data indication while reading or a
178 write-once device encountered a non-blank medium while writing.
184 \fB\fBKEY_VENDOR_UNIQUE\fR \fR
188 This sense key is available for reporting vendor-specific conditions.
194 \fB\fBKEY_COPY_ABORTED\fR \fR
198 Indicates that a \fBCOPY\fR, \fBCOMPARE\fR, and \fBCOPY AND VERIFY\fR command
205 \fB\fBKEY_ABORTED_COMMAND\fR \fR
209 Indicates that the target aborted the command.
215 \fB\fBKEY_EQUAL\fR \fR
219 Indicates that a \fBSEARCH\fR \fBDATA\fR command has satisfied an equal
226 \fB\fBKEY_VOLUME_OVERFLOW\fR \fR
230 Indicates that a buffered peripheral device has reached the end-of-partition
231 and data might remain in the buffer that has not been written to the medium.
237 \fB\fBKEY_MISCOMPARE\fR \fR
241 Indicates that the source data did not match the data read from the medium.
247 \fB\fBKEY_RESERVE\fR \fR
251 Indicates that the target is currently reserved by a different initiator.
256 \fBes_info_{1,2,3,4}\fR is device-type or command specific.
259 \fBes_add_len\fR indicates the number of additional sense bytes to follow.
262 \fBes_cmd_info\fR contains information that depends on the command that was
266 \fBes_add_code\fR (\fBASC\fR) indicates further information related to the
267 error or exception condition reported in the sense key field.
270 \fBes_qual_code\fR (\fBASCQ)\fR indicates detailed information related to the
271 additional sense code.
274 \fBes_fru_code\fR (\fBFRU\fR) indicates a device-specific mechanism to unit
278 \fBes_skey_specific\fR is defined when the value of the sense-key specific
279 valid bit (bit 7) is \fB1\fR. This field is reserved for sense keys not defined
284 \fBscsi_device\fR(9S)
287 \fIANSI Small Computer System Interface-2 (SCSI-2)\fR
290 \fIWriting Device Drivers\fR