1scsi_extended_sense(9S) Data Structures for Drivers scsi_extended_sense(9S)
2
3
4
6 scsi_extended_sense - SCSI extended sense structure
7
9 #include <sys/scsi/scsi.h>
10
11
13 Solaris DDI specific (Solaris DDI).
14
16 The scsi_extended_sense structure for error codes 0x70 (current errors)
17 and 0x71 (deferred errors) is returned on a successful REQUEST SENSE
18 command. SCSI-2 compliant targets are required to return at least the
19 first 18 bytes of this structure. This structure is part of
20 scsi_device(9S) structure.
21
23 uchar_t es_valid :1; /* Sense data is valid */
24 uchar_t es_class :3; /* Error Class- fixed at 0x7 */
25 uchar_t es_code :4; /* Vendor Unique error code */
26 uchar_t es_segnum; /* Segment number: for COPY cmd only */
27 uchar_t es_filmk :1; /* File Mark Detected */
28 uchar_t es_eom :1; /* End of Media */
29 uchar_t es_ili :1; /* Incorrect Length Indicator */
30 uchar_t es_key :4; /* Sense key */
31 uchar_t es_info_1; /* Information byte 1 */
32 uchar_t es_info_2; /* Information byte 2 */
33 uchar_t es_info_3; /* Information byte 3 */
34 uchar_t es_info_4; /* Information byte 4 */
35 uchar_t es_add_len; /* Number of additional bytes */
36 uchar_t es_cmd_info[4]; /* Command specific information */
37 uchar_t es_add_code; /* Additional Sense Code */
38 uchar_t es_qual_code; /* Additional Sense Code Qualifier */
39 uchar_t es_fru_code; /* Field Replaceable Unit Code */
40 uchar_t es_skey_specific[3]; /* Sense Key Specific information */
41
42
43
44 es_valid, if set, indicates that the information field contains valid
45 information.
46
47
48 es_class should be 0x7.
49
50
51 es_code is either 0x0 or 0x1.
52
53
54 es_segnum contains the number of the current segment descriptor if the
55 REQUEST SENSE command is in response to a COPY, COMPARE, and COPY AND
56 VERIFY command.
57
58
59 es_filmk, if set, indicates that the current command had read a file
60 mark or set mark (sequential access devices only).
61
62
63 es_eom, if set, indicates that an end-of-medium condition exists
64 (sequential access and printer devices only).
65
66
67 es_ili, if set, indicates that the requested logical block length did
68 not match the logical block length of the data on the medium.
69
70
71 es_key indicates generic information describing an error or exception
72 condition. The following sense keys are defined:
73
74 KEY_NO_SENSE
75
76 Indicates that there is no specific sense key information to be
77 reported.
78
79
80 KEY_RECOVERABLE_ERROR
81
82 Indicates that the last command completed successfully with some
83 recovery action performed by the target.
84
85
86 KEY_NOT_READY
87
88 Indicates that the logical unit addressed cannot be accessed.
89
90
91 KEY_MEDIUM_ERROR
92
93 Indicates that the command terminated with a non-recovered error
94 condition that was probably caused by a flaw on the medium or an
95 error in the recorded data.
96
97
98 KEY_HARDWARE_ERROR
99
100 Indicates that the target detected a non-recoverable hardware fail‐
101 ure while performing the command or during a self test.
102
103
104 KEY_ILLEGAL_REQUEST
105
106 Indicates that there was an illegal parameter in the CDB or in the
107 additional parameters supplied as data for some commands.
108
109
110 KEY_UNIT_ATTENTION
111
112 Indicates that the removable medium might have been changed or the
113 target has been reset.
114
115
116 KEY_WRITE_PROTECT/KEY_DATA_PROTECT
117
118 Indicates that a command that reads or writes the medium was
119 attempted on a block that is protected from this operation.
120
121
122 KEY_BLANK_CHECK
123
124 Indicates that a write-once device or a sequential access device
125 encountered blank medium or format-defined end-of-data indication
126 while reading or a write-once device encountered a non-blank medium
127 while writing.
128
129
130 KEY_VENDOR_UNIQUE
131
132 This sense key is available for reporting vendor-specific condi‐
133 tions.
134
135
136 KEY_COPY_ABORTED
137
138 Indicates that a COPY, COMPARE, and COPY AND VERIFY command was
139 aborted.
140
141
142 KEY_ABORTED_COMMAND
143
144 Indicates that the target aborted the command.
145
146
147 KEY_EQUAL
148
149 Indicates that a SEARCH DATA command has satisfied an equal com‐
150 parison.
151
152
153 KEY_VOLUME_OVERFLOW
154
155 Indicates that a buffered peripheral device has reached the end-of-
156 partition and data might remain in the buffer that has not been
157 written to the medium.
158
159
160 KEY_MISCOMPARE
161
162 Indicates that the source data did not match the data read from the
163 medium.
164
165
166 KEY_RESERVE
167
168 Indicates that the target is currently reserved by a different ini‐
169 tiator.
170
171
172
173 es_info_{1,2,3,4} is device-type or command specific.
174
175
176 es_add_len indicates the number of additional sense bytes to follow.
177
178
179 es_cmd_info contains information that depends on the command that was
180 executed.
181
182
183 es_add_code (ASC) indicates further information related to the error or
184 exception condition reported in the sense key field.
185
186
187 es_qual_code (ASCQ) indicates detailed information related to the addi‐
188 tional sense code.
189
190
191 es_fru_code (FRU) indicates a device-specific mechanism to unit that
192 has failed.
193
194
195 es_skey_specific is defined when the value of the sense-key specific
196 valid bit (bit 7) is 1. This field is reserved for sense keys not
197 defined above.
198
200 scsi_device(9S)
201
202
203 ANSI Small Computer System Interface-2 (SCSI-2)
204
205
206 Writing Device Drivers
207
208
209
210SunOS 5.11 30 Aug 1995 scsi_extended_sense(9S)