1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
'\" te
.\" Copyright (c) 2000, Sun Microsystems, Inc. , All Rights Reserved
.\" 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.
.\" 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.
.\" 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]
.TH SCSI_EXTENDED_SENSE 9S "Aug 30, 1995"
.SH NAME
scsi_extended_sense \- SCSI extended sense structure
.SH SYNOPSIS
.nf
#include <sys/scsi/scsi.h>
.fi
.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI).
.SH DESCRIPTION
The \fBscsi_extended_sense\fR structure for error codes \fB0x70\fR (current
errors) and \fB0x71\fR (deferred errors) is returned on a successful \fBREQUEST
SENSE\fR command. \fBSCSI-2 \fRcompliant targets are required to return at
least the first 18 bytes of this structure. This structure is part of
\fBscsi_device\fR(9S) structure.
.SH STRUCTURE MEMBERS
.in +2
.nf
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 */
.fi
.in -2
.sp
.LP
\fBes_valid\fR, if set, indicates that the information field contains valid
information.
.sp
.LP
\fBes_class\fR should be \fB0x7\fR.
.sp
.LP
\fBes_code\fR is either \fB0x0\fR or \fB0x1\fR.
.sp
.LP
\fBes_segnum\fR contains the number of the current segment descriptor if the
\fBREQUEST SENSE \fRcommand is in response to a \fBCOPY\fR, \fBCOMPARE\fR, and
\fBCOPY AND VERIFY\fR command.
.sp
.LP
\fBes_filmk\fR, if set, indicates that the current command had read a file mark
or set mark (sequential access devices only).
.sp
.LP
\fBes_eom\fR, if set, indicates that an end-of-medium condition exists
(sequential access and printer devices only).
.sp
.LP
\fBes_ili\fR, if set, indicates that the requested logical block length did not
match the logical block length of the data on the medium.
.sp
.LP
\fBes_key\fR indicates generic information describing an error or exception
condition. The following sense keys are defined:
.sp
.ne 2
.na
\fB\fBKEY_NO_SENSE\fR \fR
.ad
.sp .6
.RS 4n
Indicates that there is no specific sense key information to be reported.
.RE
.sp
.ne 2
.na
\fB\fBKEY_RECOVERABLE_ERROR\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the last command completed successfully with some recovery
action performed by the target.
.RE
.sp
.ne 2
.na
\fB\fBKEY_NOT_READY\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the logical unit addressed cannot be accessed.
.RE
.sp
.ne 2
.na
\fB\fBKEY_MEDIUM_ERROR\fR \fR
.ad
.sp .6
.RS 4n
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.
.RE
.sp
.ne 2
.na
\fB\fBKEY_HARDWARE_ERROR\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the target detected a non-recoverable hardware failure while
performing the command or during a self test.
.RE
.sp
.ne 2
.na
\fB\fBKEY_ILLEGAL_REQUEST\fR \fR
.ad
.sp .6
.RS 4n
Indicates that there was an illegal parameter in the \fBCDB\fR or in the
additional parameters supplied as data for some commands.
.RE
.sp
.ne 2
.na
\fB\fBKEY_UNIT_ATTENTION\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the removable medium might have been changed or the target has
been reset.
.RE
.sp
.ne 2
.na
\fB\fBKEY_WRITE_PROTECT/KEY_DATA_PROTECT\fR \fR
.ad
.sp .6
.RS 4n
Indicates that a command that reads or writes the medium was attempted on a
block that is protected from this operation.
.RE
.sp
.ne 2
.na
\fB\fBKEY_BLANK_CHECK\fR \fR
.ad
.sp .6
.RS 4n
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.
.RE
.sp
.ne 2
.na
\fB\fBKEY_VENDOR_UNIQUE\fR \fR
.ad
.sp .6
.RS 4n
This sense key is available for reporting vendor-specific conditions.
.RE
.sp
.ne 2
.na
\fB\fBKEY_COPY_ABORTED\fR \fR
.ad
.sp .6
.RS 4n
Indicates that a \fBCOPY\fR, \fBCOMPARE\fR, and \fBCOPY AND VERIFY\fR command
was aborted.
.RE
.sp
.ne 2
.na
\fB\fBKEY_ABORTED_COMMAND\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the target aborted the command.
.RE
.sp
.ne 2
.na
\fB\fBKEY_EQUAL\fR \fR
.ad
.sp .6
.RS 4n
Indicates that a \fBSEARCH\fR \fBDATA\fR command has satisfied an equal
comparison.
.RE
.sp
.ne 2
.na
\fB\fBKEY_VOLUME_OVERFLOW\fR \fR
.ad
.sp .6
.RS 4n
Indicates that a buffered peripheral device has reached the end-of-partition
and data might remain in the buffer that has not been written to the medium.
.RE
.sp
.ne 2
.na
\fB\fBKEY_MISCOMPARE\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the source data did not match the data read from the medium.
.RE
.sp
.ne 2
.na
\fB\fBKEY_RESERVE\fR \fR
.ad
.sp .6
.RS 4n
Indicates that the target is currently reserved by a different initiator.
.RE
.sp
.LP
\fBes_info_{1,2,3,4}\fR is device-type or command specific.
.sp
.LP
\fBes_add_len\fR indicates the number of additional sense bytes to follow.
.sp
.LP
\fBes_cmd_info\fR contains information that depends on the command that was
executed.
.sp
.LP
\fBes_add_code\fR (\fBASC\fR) indicates further information related to the
error or exception condition reported in the sense key field.
.sp
.LP
\fBes_qual_code\fR (\fBASCQ)\fR indicates detailed information related to the
additional sense code.
.sp
.LP
\fBes_fru_code\fR (\fBFRU\fR) indicates a device-specific mechanism to unit
that has failed.
.sp
.LP
\fBes_skey_specific\fR is defined when the value of the sense-key specific
valid bit (bit 7) is \fB1\fR. This field is reserved for sense keys not defined
above.
.SH SEE ALSO
.BR scsi_device (9S)
.sp
.LP
\fIANSI Small Computer System Interface-2 (SCSI-2)\fR
.sp
.LP
\fIWriting Device Drivers\fR
|