1 | /* $Id: Debug.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox storage devices: debug helpers
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | #include <iprt/assert.h>
|
---|
20 | #include <iprt/types.h>
|
---|
21 | #include <VBox/scsi.h>
|
---|
22 | #include "ide.h"
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * ATA command codes
|
---|
26 | */
|
---|
27 | static const char * const g_apszATACmdNames[256] =
|
---|
28 | {
|
---|
29 | "NOP", /* 0x00 */
|
---|
30 | "", /* 0x01 */
|
---|
31 | "", /* 0x02 */
|
---|
32 | "CFA REQUEST EXTENDED ERROR CODE", /* 0x03 */
|
---|
33 | "", /* 0x04 */
|
---|
34 | "", /* 0x05 */
|
---|
35 | "", /* 0x06 */
|
---|
36 | "", /* 0x07 */
|
---|
37 | "DEVICE RESET", /* 0x08 */
|
---|
38 | "", /* 0x09 */
|
---|
39 | "", /* 0x0a */
|
---|
40 | "", /* 0x0b */
|
---|
41 | "", /* 0x0c */
|
---|
42 | "", /* 0x0d */
|
---|
43 | "", /* 0x0e */
|
---|
44 | "", /* 0x0f */
|
---|
45 | "RECALIBRATE", /* 0x10 */
|
---|
46 | "", /* 0x11 */
|
---|
47 | "", /* 0x12 */
|
---|
48 | "", /* 0x13 */
|
---|
49 | "", /* 0x14 */
|
---|
50 | "", /* 0x15 */
|
---|
51 | "", /* 0x16 */
|
---|
52 | "", /* 0x17 */
|
---|
53 | "", /* 0x18 */
|
---|
54 | "", /* 0x19 */
|
---|
55 | "", /* 0x1a */
|
---|
56 | "", /* 0x1b */
|
---|
57 | "", /* 0x1c */
|
---|
58 | "", /* 0x1d */
|
---|
59 | "", /* 0x1e */
|
---|
60 | "", /* 0x1f */
|
---|
61 | "READ SECTORS", /* 0x20 */
|
---|
62 | "READ SECTORS WITHOUT RETRIES", /* 0x21 */
|
---|
63 | "READ LONG", /* 0x22 */
|
---|
64 | "READ LONG WITHOUT RETRIES", /* 0x23 */
|
---|
65 | "READ SECTORS EXT", /* 0x24 */
|
---|
66 | "READ DMA EXT", /* 0x25 */
|
---|
67 | "READ DMA QUEUED EXT", /* 0x26 */
|
---|
68 | "READ NATIVE MAX ADDRESS EXT", /* 0x27 */
|
---|
69 | "", /* 0x28 */
|
---|
70 | "READ MULTIPLE EXT", /* 0x29 */
|
---|
71 | "READ STREAM DMA EXT", /* 0x2a */
|
---|
72 | "READ STREAM EXT", /* 0x2b */
|
---|
73 | "", /* 0x2c */
|
---|
74 | "", /* 0x2d */
|
---|
75 | "", /* 0x2e */
|
---|
76 | "READ LOG EXT", /* 0x2f */
|
---|
77 | "WRITE SECTORS", /* 0x30 */
|
---|
78 | "WRITE SECTORS WITHOUT RETRIES", /* 0x31 */
|
---|
79 | "WRITE LONG", /* 0x32 */
|
---|
80 | "WRITE LONG WITHOUT RETRIES", /* 0x33 */
|
---|
81 | "WRITE SECTORS EXT", /* 0x34 */
|
---|
82 | "WRITE DMA EXT", /* 0x35 */
|
---|
83 | "WRITE DMA QUEUED EXT", /* 0x36 */
|
---|
84 | "SET MAX ADDRESS EXT", /* 0x37 */
|
---|
85 | "CFA WRITE SECTORS WITHOUT ERASE", /* 0x38 */
|
---|
86 | "WRITE MULTIPLE EXT", /* 0x39 */
|
---|
87 | "WRITE STREAM DMA EXT", /* 0x3a */
|
---|
88 | "WRITE STREAM EXT", /* 0x3b */
|
---|
89 | "WRITE VERIFY", /* 0x3c */
|
---|
90 | "WRITE DMA FUA EXT", /* 0x3d */
|
---|
91 | "WRITE DMA QUEUED FUA EXT", /* 0x3e */
|
---|
92 | "WRITE LOG EXT", /* 0x3f */
|
---|
93 | "READ VERIFY SECTORS", /* 0x40 */
|
---|
94 | "READ VERIFY SECTORS WITHOUT RETRIES", /* 0x41 */
|
---|
95 | "READ VERIFY SECTORS EXT", /* 0x42 */
|
---|
96 | "", /* 0x43 */
|
---|
97 | "", /* 0x44 */
|
---|
98 | "WRITE UNCORRECTABLE EXT", /* 0x45 */
|
---|
99 | "", /* 0x46 */
|
---|
100 | "READ LOG DMA EXT", /* 0x47 */
|
---|
101 | "", /* 0x48 */
|
---|
102 | "", /* 0x49 */
|
---|
103 | "", /* 0x4a */
|
---|
104 | "", /* 0x4b */
|
---|
105 | "", /* 0x4c */
|
---|
106 | "", /* 0x4d */
|
---|
107 | "", /* 0x4e */
|
---|
108 | "", /* 0x4f */
|
---|
109 | "FORMAT TRACK", /* 0x50 */
|
---|
110 | "CONFIGURE STREAM", /* 0x51 */
|
---|
111 | "", /* 0x52 */
|
---|
112 | "", /* 0x53 */
|
---|
113 | "", /* 0x54 */
|
---|
114 | "", /* 0x55 */
|
---|
115 | "", /* 0x56 */
|
---|
116 | "WRITE LOG DMA EXT", /* 0x57 */
|
---|
117 | "", /* 0x58 */
|
---|
118 | "", /* 0x59 */
|
---|
119 | "", /* 0x5a */
|
---|
120 | "", /* 0x5b */
|
---|
121 | "TRUSTED RECEIVE", /* 0x5c */
|
---|
122 | "TRUSTED RECEIVE DMA", /* 0x5d */
|
---|
123 | "TRUSTED SEND", /* 0x5e */
|
---|
124 | "TRUSTED SEND DMA", /* 0x5f */
|
---|
125 | "READ FPDMA QUEUED", /* 0x60 */
|
---|
126 | "WRITE FPDMA QUEUED", /* 0x61 */
|
---|
127 | "", /* 0x62 */
|
---|
128 | "", /* 0x63 */
|
---|
129 | "", /* 0x64 */
|
---|
130 | "", /* 0x65 */
|
---|
131 | "", /* 0x66 */
|
---|
132 | "", /* 0x67 */
|
---|
133 | "", /* 0x68 */
|
---|
134 | "", /* 0x69 */
|
---|
135 | "", /* 0x6a */
|
---|
136 | "", /* 0x6b */
|
---|
137 | "", /* 0x6c */
|
---|
138 | "", /* 0x6d */
|
---|
139 | "", /* 0x6e */
|
---|
140 | "", /* 0x6f */
|
---|
141 | "SEEK", /* 0x70 */
|
---|
142 | "", /* 0x71 */
|
---|
143 | "", /* 0x72 */
|
---|
144 | "", /* 0x73 */
|
---|
145 | "", /* 0x74 */
|
---|
146 | "", /* 0x75 */
|
---|
147 | "", /* 0x76 */
|
---|
148 | "", /* 0x77 */
|
---|
149 | "", /* 0x78 */
|
---|
150 | "", /* 0x79 */
|
---|
151 | "", /* 0x7a */
|
---|
152 | "", /* 0x7b */
|
---|
153 | "", /* 0x7c */
|
---|
154 | "", /* 0x7d */
|
---|
155 | "", /* 0x7e */
|
---|
156 | "", /* 0x7f */
|
---|
157 | "", /* 0x80 */
|
---|
158 | "", /* 0x81 */
|
---|
159 | "", /* 0x82 */
|
---|
160 | "", /* 0x83 */
|
---|
161 | "", /* 0x84 */
|
---|
162 | "", /* 0x85 */
|
---|
163 | "", /* 0x86 */
|
---|
164 | "CFA TRANSLATE SECTOR", /* 0x87 */
|
---|
165 | "", /* 0x88 */
|
---|
166 | "", /* 0x89 */
|
---|
167 | "", /* 0x8a */
|
---|
168 | "", /* 0x8b */
|
---|
169 | "", /* 0x8c */
|
---|
170 | "", /* 0x8d */
|
---|
171 | "", /* 0x8e */
|
---|
172 | "", /* 0x8f */
|
---|
173 | "EXECUTE DEVICE DIAGNOSTIC", /* 0x90 */
|
---|
174 | "INITIALIZE DEVICE PARAMETERS", /* 0x91 */
|
---|
175 | "DOWNLOAD MICROCODE", /* 0x92 */
|
---|
176 | "", /* 0x93 */
|
---|
177 | "STANDBY IMMEDIATE ALT", /* 0x94 */
|
---|
178 | "IDLE IMMEDIATE ALT", /* 0x95 */
|
---|
179 | "STANDBY ALT", /* 0x96 */
|
---|
180 | "IDLE ALT", /* 0x97 */
|
---|
181 | "CHECK POWER MODE ALT", /* 0x98 */
|
---|
182 | "SLEEP ALT", /* 0x99 */
|
---|
183 | "", /* 0x9a */
|
---|
184 | "", /* 0x9b */
|
---|
185 | "", /* 0x9c */
|
---|
186 | "", /* 0x9d */
|
---|
187 | "", /* 0x9e */
|
---|
188 | "", /* 0x9f */
|
---|
189 | "PACKET", /* 0xa0 */
|
---|
190 | "IDENTIFY PACKET DEVICE", /* 0xa1 */
|
---|
191 | "SERVICE", /* 0xa2 */
|
---|
192 | "", /* 0xa3 */
|
---|
193 | "", /* 0xa4 */
|
---|
194 | "", /* 0xa5 */
|
---|
195 | "", /* 0xa6 */
|
---|
196 | "", /* 0xa7 */
|
---|
197 | "", /* 0xa8 */
|
---|
198 | "", /* 0xa9 */
|
---|
199 | "", /* 0xaa */
|
---|
200 | "", /* 0xab */
|
---|
201 | "", /* 0xac */
|
---|
202 | "", /* 0xad */
|
---|
203 | "", /* 0xae */
|
---|
204 | "", /* 0xaf */
|
---|
205 | "SMART", /* 0xb0 */
|
---|
206 | "DEVICE CONFIGURATION OVERLAY", /* 0xb1 */
|
---|
207 | "", /* 0xb2 */
|
---|
208 | "", /* 0xb3 */
|
---|
209 | "", /* 0xb4 */
|
---|
210 | "", /* 0xb5 */
|
---|
211 | "NV CACHE", /* 0xb6 */
|
---|
212 | "", /* 0xb7 */
|
---|
213 | "", /* 0xb8 */
|
---|
214 | "", /* 0xb9 */
|
---|
215 | "", /* 0xba */
|
---|
216 | "", /* 0xbb */
|
---|
217 | "", /* 0xbc */
|
---|
218 | "", /* 0xbd */
|
---|
219 | "", /* 0xbe */
|
---|
220 | "", /* 0xbf */
|
---|
221 | "CFA ERASE SECTORS", /* 0xc0 */
|
---|
222 | "", /* 0xc1 */
|
---|
223 | "", /* 0xc2 */
|
---|
224 | "", /* 0xc3 */
|
---|
225 | "READ MULTIPLE", /* 0xc4 */
|
---|
226 | "WRITE MULTIPLE", /* 0xc5 */
|
---|
227 | "SET MULTIPLE MODE", /* 0xc6 */
|
---|
228 | "READ DMA QUEUED", /* 0xc7 */
|
---|
229 | "READ DMA", /* 0xc8 */
|
---|
230 | "READ DMA WITHOUT RETRIES", /* 0xc9 */
|
---|
231 | "WRITE DMA", /* 0xca */
|
---|
232 | "WRITE DMA WITHOUT RETRIES", /* 0xcb */
|
---|
233 | "WRITE DMA QUEUED", /* 0xcc */
|
---|
234 | "CFA WRITE MULTIPLE WITHOUT ERASE", /* 0xcd */
|
---|
235 | "WRITE MULTIPLE FUA EXT", /* 0xce */
|
---|
236 | "", /* 0xcf */
|
---|
237 | "", /* 0xd0 */
|
---|
238 | "CHECK MEDIA CARD TYPE", /* 0xd1 */
|
---|
239 | "", /* 0xd2 */
|
---|
240 | "", /* 0xd3 */
|
---|
241 | "", /* 0xd4 */
|
---|
242 | "", /* 0xd5 */
|
---|
243 | "", /* 0xd6 */
|
---|
244 | "", /* 0xd7 */
|
---|
245 | "", /* 0xd8 */
|
---|
246 | "", /* 0xd9 */
|
---|
247 | "GET MEDIA STATUS", /* 0xda */
|
---|
248 | "ACKNOWLEDGE MEDIA CHANGE", /* 0xdb */
|
---|
249 | "BOOT POST BOOT", /* 0xdc */
|
---|
250 | "BOOT PRE BOOT", /* 0xdd */
|
---|
251 | "MEDIA LOCK", /* 0xde */
|
---|
252 | "MEDIA UNLOCK", /* 0xdf */
|
---|
253 | "STANDBY IMMEDIATE", /* 0xe0 */
|
---|
254 | "IDLE IMMEDIATE", /* 0xe1 */
|
---|
255 | "STANDBY", /* 0xe2 */
|
---|
256 | "IDLE", /* 0xe3 */
|
---|
257 | "READ BUFFER", /* 0xe4 */
|
---|
258 | "CHECK POWER MODE", /* 0xe5 */
|
---|
259 | "SLEEP", /* 0xe6 */
|
---|
260 | "FLUSH CACHE", /* 0xe7 */
|
---|
261 | "WRITE BUFFER", /* 0xe8 */
|
---|
262 | "WRITE SAME", /* 0xe9 */
|
---|
263 | "FLUSH CACHE EXT", /* 0xea */
|
---|
264 | "", /* 0xeb */
|
---|
265 | "IDENTIFY DEVICE", /* 0xec */
|
---|
266 | "MEDIA EJECT", /* 0xed */
|
---|
267 | "IDENTIFY DMA", /* 0xee */
|
---|
268 | "SET FEATURES", /* 0xef */
|
---|
269 | "", /* 0xf0 */
|
---|
270 | "SECURITY SET PASSWORD", /* 0xf1 */
|
---|
271 | "SECURITY UNLOCK", /* 0xf2 */
|
---|
272 | "SECURITY ERASE PREPARE", /* 0xf3 */
|
---|
273 | "SECURITY ERASE UNIT", /* 0xf4 */
|
---|
274 | "SECURITY FREEZE LOCK", /* 0xf5 */
|
---|
275 | "SECURITY DISABLE PASSWORD", /* 0xf6 */
|
---|
276 | "", /* 0xf7 */
|
---|
277 | "READ NATIVE MAX ADDRESS", /* 0xf8 */
|
---|
278 | "SET MAX", /* 0xf9 */
|
---|
279 | "", /* 0xfa */
|
---|
280 | "", /* 0xfb */
|
---|
281 | "", /* 0xfc */
|
---|
282 | "", /* 0xfd */
|
---|
283 | "", /* 0xfe */
|
---|
284 | "" /* 0xff */
|
---|
285 | };
|
---|
286 |
|
---|
287 | /**
|
---|
288 | * SCSI command codes.
|
---|
289 | */
|
---|
290 | static const char * const g_apszSCSICmdNames[256] =
|
---|
291 | {
|
---|
292 | "TEST UNIT READY", /* 0x00 */
|
---|
293 | "REZERO UNIT", /* 0x01 */
|
---|
294 | "", /* 0x02 */
|
---|
295 | "REQUEST SENSE", /* 0x03 */
|
---|
296 | "FORMAT UNIT", /* 0x04 */
|
---|
297 | "READ BLOCK LIMITS", /* 0x05 */
|
---|
298 | "", /* 0x06 */
|
---|
299 | "REASSIGN BLOCKS", /* 0x07 */
|
---|
300 | "READ (6)", /* 0x08 */
|
---|
301 | "", /* 0x09 */
|
---|
302 | "WRITE (6)", /* 0x0a */
|
---|
303 | "SEEK (6)", /* 0x0b */
|
---|
304 | "", /* 0x0c */
|
---|
305 | "", /* 0x0d */
|
---|
306 | "", /* 0x0e */
|
---|
307 | "READ REVERSE (6)", /* 0x0f */
|
---|
308 | "READ FILEMARKS (6)", /* 0x10 */
|
---|
309 | "SPACE (6)", /* 0x11 */
|
---|
310 | "INQUIRY", /* 0x12 */
|
---|
311 | "VERIFY (6)", /* 0x13 */
|
---|
312 | "RECOVER BUFFERED DATA", /* 0x14 */
|
---|
313 | "MODE SELECT (6)", /* 0x15 */
|
---|
314 | "RESERVE (6)", /* 0x16 */
|
---|
315 | "RELEASE (6)", /* 0x17 */
|
---|
316 | "COPY", /* 0x18 */
|
---|
317 | "ERASE (6)", /* 0x19 */
|
---|
318 | "MODE SENSE (6)", /* 0x1a */
|
---|
319 | "START STOP UNIT", /* 0x1b */
|
---|
320 | "RECEIVE DIAGNOSTIC RESULTS", /* 0x1c */
|
---|
321 | "SEND DIAGNOSTIC", /* 0x1d */
|
---|
322 | "PREVENT ALLOW MEDIUM REMOVAL", /* 0x1e */
|
---|
323 | "", /* 0x1f */
|
---|
324 | "", /* 0x20 */
|
---|
325 | "", /* 0x21 */
|
---|
326 | "", /* 0x22 */
|
---|
327 | "READ FORMAT CAPACITIES", /* 0x23 */
|
---|
328 | "SET WINDOW", /* 0x24 */
|
---|
329 | "READ CAPACITY", /* 0x25 */
|
---|
330 | "", /* 0x26 */
|
---|
331 | "", /* 0x27 */
|
---|
332 | "READ (10)", /* 0x28 */
|
---|
333 | "READ GENERATION", /* 0x29 */
|
---|
334 | "WRITE (10)", /* 0x2a */
|
---|
335 | "SEEK (10)", /* 0x2b */
|
---|
336 | "ERASE (10)", /* 0x2c */
|
---|
337 | "READ UPDATED BLOCK", /* 0x2d */
|
---|
338 | "WRITE AND VERIFY (10)", /* 0x2e */
|
---|
339 | "VERIFY (10)", /* 0x2f */
|
---|
340 | "SEARCH DATA HIGH (10)", /* 0x30 */
|
---|
341 | "SEARCH DATA EQUAL (10)", /* 0x31 */
|
---|
342 | "SEARCH DATA LOW (10)", /* 0x32 */
|
---|
343 | "SET LIMITS (10)", /* 0x33 */
|
---|
344 | "PRE-FETCH (10)", /* 0x34 */
|
---|
345 | "SYNCHRONIZE CACHE (10)", /* 0x35 */
|
---|
346 | "LOCK UNLOCK CACHE (10)", /* 0x36 */
|
---|
347 | "READ DEFECT DATA (10)", /* 0x37 */
|
---|
348 | "MEDIUM SCAN", /* 0x38 */
|
---|
349 | "COMPARE", /* 0x39 */
|
---|
350 | "COPY AND VERIFY", /* 0x3a */
|
---|
351 | "WRITE BUFFER", /* 0x3b */
|
---|
352 | "READ BUFFER", /* 0x3c */
|
---|
353 | "UPDATE BLOCK", /* 0x3d */
|
---|
354 | "READ LONG (10)", /* 0x3e */
|
---|
355 | "WRITE LONG (10)", /* 0x3f */
|
---|
356 | "CHANGE DEFINITION", /* 0x40 */
|
---|
357 | "WRITE SAME (10)", /* 0x41 */
|
---|
358 | "READ SUBCHANNEL", /* 0x42 */
|
---|
359 | "READ TOC/PMA/ATIP", /* 0x43 */
|
---|
360 | "REPORT DENSITY SUPPORT", /* 0x44 */
|
---|
361 | "PLAY AUDIO (10)", /* 0x45 */
|
---|
362 | "GET CONFIGURATION", /* 0x46 */
|
---|
363 | "PLAY AUDIO MSF", /* 0x47 */
|
---|
364 | "", /* 0x48 */
|
---|
365 | "", /* 0x49 */
|
---|
366 | "GET EVENT STATUS NOTIFICATION", /* 0x4a */
|
---|
367 | "PAUSE/RESUME", /* 0x4b */
|
---|
368 | "LOG SELECT", /* 0x4c */
|
---|
369 | "LOG SENSE", /* 0x4d */
|
---|
370 | "STOP PLAY/SCAN", /* 0x4e */
|
---|
371 | "", /* 0x4f */
|
---|
372 | "XDWRITE (10)", /* 0x50 */
|
---|
373 | "READ DISC INFORMATION", /* 0x51 */
|
---|
374 | "READ TRACK INFORMATION", /* 0x52 */
|
---|
375 | "RESERVE TRACK", /* 0x53 */
|
---|
376 | "SEND OPC INFORMATION", /* 0x54 */
|
---|
377 | "MODE SELECT (10)", /* 0x55 */
|
---|
378 | "RESERVE (10)", /* 0x56 */
|
---|
379 | "RELEASE (10)", /* 0x57 */
|
---|
380 | "REPAIR TRACK", /* 0x58 */
|
---|
381 | "", /* 0x59 */
|
---|
382 | "MODE SENSE (10)", /* 0x5a */
|
---|
383 | "CLOSE TRACK/SESSION", /* 0x5b */
|
---|
384 | "READ BUFFER CAPACITY", /* 0x5c */
|
---|
385 | "SEND CUE SHEET", /* 0x5d */
|
---|
386 | "PERSISTENT RESERVE IN", /* 0x5e */
|
---|
387 | "PERSISTENT RESERVE OUT", /* 0x5f */
|
---|
388 | "", /* 0x60 */
|
---|
389 | "", /* 0x61 */
|
---|
390 | "", /* 0x62 */
|
---|
391 | "", /* 0x63 */
|
---|
392 | "", /* 0x64 */
|
---|
393 | "", /* 0x65 */
|
---|
394 | "", /* 0x66 */
|
---|
395 | "", /* 0x67 */
|
---|
396 | "", /* 0x68 */
|
---|
397 | "", /* 0x69 */
|
---|
398 | "", /* 0x6a */
|
---|
399 | "", /* 0x6b */
|
---|
400 | "", /* 0x6c */
|
---|
401 | "", /* 0x6d */
|
---|
402 | "", /* 0x6e */
|
---|
403 | "", /* 0x6f */
|
---|
404 | "", /* 0x70 */
|
---|
405 | "", /* 0x71 */
|
---|
406 | "", /* 0x72 */
|
---|
407 | "", /* 0x73 */
|
---|
408 | "", /* 0x74 */
|
---|
409 | "", /* 0x75 */
|
---|
410 | "", /* 0x76 */
|
---|
411 | "", /* 0x77 */
|
---|
412 | "", /* 0x78 */
|
---|
413 | "", /* 0x79 */
|
---|
414 | "", /* 0x7a */
|
---|
415 | "", /* 0x7b */
|
---|
416 | "", /* 0x7c */
|
---|
417 | "", /* 0x7d */
|
---|
418 | "", /* 0x7e */
|
---|
419 | "", /* 0x7f */
|
---|
420 | "WRITE FILEMARKS (16)", /* 0x80 */
|
---|
421 | "READ REVERSE (16)", /* 0x81 */
|
---|
422 | "REGENERATE (16)", /* 0x82 */
|
---|
423 | "EXTENDED COPY", /* 0x83 */
|
---|
424 | "RECEIVE COPY RESULTS", /* 0x84 */
|
---|
425 | "ATA COMMAND PASS THROUGH (16)", /* 0x85 */
|
---|
426 | "ACCESS CONTROL IN", /* 0x86 */
|
---|
427 | "ACCESS CONTROL OUT", /* 0x87 */
|
---|
428 | "READ (16)", /* 0x88 */
|
---|
429 | "", /* 0x89 */
|
---|
430 | "WRITE(16)", /* 0x8a */
|
---|
431 | "", /* 0x8b */
|
---|
432 | "READ ATTRIBUTE", /* 0x8c */
|
---|
433 | "WRITE ATTRIBUTE", /* 0x8d */
|
---|
434 | "WRITE AND VERIFY (16)", /* 0x8e */
|
---|
435 | "VERIFY (16)", /* 0x8f */
|
---|
436 | "PRE-FETCH (16)", /* 0x90 */
|
---|
437 | "SYNCHRONIZE CACHE (16)", /* 0x91 */
|
---|
438 | "LOCK UNLOCK CACHE (16)", /* 0x92 */
|
---|
439 | "WRITE SAME (16)", /* 0x93 */
|
---|
440 | "", /* 0x94 */
|
---|
441 | "", /* 0x95 */
|
---|
442 | "", /* 0x96 */
|
---|
443 | "", /* 0x97 */
|
---|
444 | "", /* 0x98 */
|
---|
445 | "", /* 0x99 */
|
---|
446 | "", /* 0x9a */
|
---|
447 | "", /* 0x9b */
|
---|
448 | "", /* 0x9c */
|
---|
449 | "", /* 0x9d */
|
---|
450 | "SERVICE ACTION IN (16)", /* 0x9e */
|
---|
451 | "SERVICE ACTION OUT (16)", /* 0x9f */
|
---|
452 | "REPORT LUNS", /* 0xa0 */
|
---|
453 | "BLANK", /* 0xa1 */
|
---|
454 | "SEND EVENT", /* 0xa2 */
|
---|
455 | "SEND KEY", /* 0xa3 */
|
---|
456 | "REPORT KEY", /* 0xa4 */
|
---|
457 | "PLAY AUDIO (12)", /* 0xa5 */
|
---|
458 | "LOAD/UNLOAD MEDIUM", /* 0xa6 */
|
---|
459 | "SET READ AHEAD", /* 0xa7 */
|
---|
460 | "READ (12)", /* 0xa8 */
|
---|
461 | "SERVICE ACTION OUT (12)", /* 0xa9 */
|
---|
462 | "WRITE (12)", /* 0xaa */
|
---|
463 | "SERVICE ACTION IN (12)", /* 0xab */
|
---|
464 | "GET PERFORMANCE", /* 0xac */
|
---|
465 | "READ DVD STRUCTURE", /* 0xad */
|
---|
466 | "WRITE AND VERIFY (12)", /* 0xae */
|
---|
467 | "VERIFY (12)", /* 0xaf */
|
---|
468 | "SEARCH DATA HIGH (12)", /* 0xb0 */
|
---|
469 | "SEARCH DATA EQUAL (12)", /* 0xb1 */
|
---|
470 | "SEARCH DATA LOW (12)", /* 0xb2 */
|
---|
471 | "SET LIMITS (12)", /* 0xb3 */
|
---|
472 | "READ ELEMENT STATUS ATTACHED", /* 0xb4 */
|
---|
473 | "REQUEST VOLUME ELEMENT ADDRESS", /* 0xb5 */
|
---|
474 | "SET STREAMING", /* 0xb6 */
|
---|
475 | "READ DEFECT DATA (12)", /* 0xb7 */
|
---|
476 | "READ ELEMENT STATUS", /* 0xb8 */
|
---|
477 | "READ CD MSF", /* 0xb9 */
|
---|
478 | "SCAN", /* 0xba */
|
---|
479 | "SET CD SPEED", /* 0xbb */
|
---|
480 | "SPARE (IN)", /* 0xbc */
|
---|
481 | "MECHANISM STATUS", /* 0xbd */
|
---|
482 | "READ CD", /* 0xbe */
|
---|
483 | "SEND DVD STRUCTURE", /* 0xbf */
|
---|
484 | "", /* 0xc0 */
|
---|
485 | "", /* 0xc1 */
|
---|
486 | "", /* 0xc2 */
|
---|
487 | "", /* 0xc3 */
|
---|
488 | "", /* 0xc4 */
|
---|
489 | "", /* 0xc5 */
|
---|
490 | "", /* 0xc6 */
|
---|
491 | "", /* 0xc7 */
|
---|
492 | "", /* 0xc8 */
|
---|
493 | "", /* 0xc9 */
|
---|
494 | "", /* 0xca */
|
---|
495 | "", /* 0xcb */
|
---|
496 | "", /* 0xcc */
|
---|
497 | "", /* 0xcd */
|
---|
498 | "", /* 0xce */
|
---|
499 | "", /* 0xcf */
|
---|
500 | "", /* 0xd0 */
|
---|
501 | "", /* 0xd1 */
|
---|
502 | "", /* 0xd2 */
|
---|
503 | "", /* 0xd3 */
|
---|
504 | "", /* 0xd4 */
|
---|
505 | "", /* 0xd5 */
|
---|
506 | "", /* 0xd6 */
|
---|
507 | "", /* 0xd7 */
|
---|
508 | "", /* 0xd8 */
|
---|
509 | "", /* 0xd9 */
|
---|
510 | "", /* 0xda */
|
---|
511 | "", /* 0xdb */
|
---|
512 | "", /* 0xdc */
|
---|
513 | "", /* 0xdd */
|
---|
514 | "", /* 0xde */
|
---|
515 | "", /* 0xdf */
|
---|
516 | "", /* 0xe0 */
|
---|
517 | "", /* 0xe1 */
|
---|
518 | "", /* 0xe2 */
|
---|
519 | "", /* 0xe3 */
|
---|
520 | "", /* 0xe4 */
|
---|
521 | "", /* 0xe5 */
|
---|
522 | "", /* 0xe6 */
|
---|
523 | "", /* 0xe7 */
|
---|
524 | "", /* 0xe8 */
|
---|
525 | "", /* 0xe9 */
|
---|
526 | "", /* 0xea */
|
---|
527 | "", /* 0xeb */
|
---|
528 | "", /* 0xec */
|
---|
529 | "", /* 0xed */
|
---|
530 | "", /* 0xee */
|
---|
531 | "", /* 0xef */
|
---|
532 | "", /* 0xf0 */
|
---|
533 | "", /* 0xf1 */
|
---|
534 | "", /* 0xf2 */
|
---|
535 | "", /* 0xf3 */
|
---|
536 | "", /* 0xf4 */
|
---|
537 | "", /* 0xf5 */
|
---|
538 | "", /* 0xf6 */
|
---|
539 | "", /* 0xf7 */
|
---|
540 | "", /* 0xf8 */
|
---|
541 | "", /* 0xf9 */
|
---|
542 | "", /* 0xfa */
|
---|
543 | "", /* 0xfb */
|
---|
544 | "", /* 0xfc */
|
---|
545 | "", /* 0xfd */
|
---|
546 | "", /* 0xfe */
|
---|
547 | "" /* 0xff */
|
---|
548 | };
|
---|
549 |
|
---|
550 | static const char * const g_apszSCSISenseNames[] =
|
---|
551 | {
|
---|
552 | "NO SENSE",
|
---|
553 | "RECOVERED ERROR",
|
---|
554 | "NOT READY",
|
---|
555 | "MEDIUM ERROR",
|
---|
556 | "HARDWARE ERROR",
|
---|
557 | "ILLEGAL REQUEST",
|
---|
558 | "UNIT ATTENTION",
|
---|
559 | "DATA PROTECT",
|
---|
560 | "BLANK CHECK",
|
---|
561 | "VENDOR-SPECIFIC",
|
---|
562 | "COPY ABORTED",
|
---|
563 | "ABORTED COMMAND",
|
---|
564 | "(obsolete)",
|
---|
565 | "VOLUME OVERFLOW",
|
---|
566 | "MISCOMPARE",
|
---|
567 | "(reserved)"
|
---|
568 | };
|
---|
569 |
|
---|
570 | /**
|
---|
571 | * SCSI Sense text
|
---|
572 | */
|
---|
573 | static struct
|
---|
574 | {
|
---|
575 | uint8_t uASC;
|
---|
576 | uint8_t uASCQ;
|
---|
577 | const char * const pszSenseText;
|
---|
578 | } g_aSCSISenseText[]
|
---|
579 | =
|
---|
580 | {
|
---|
581 | { 0x67, 0x02, "A ADD LOGICAL UNIT FAILED" },
|
---|
582 | { 0x13, 0x00, "ADDRESS MARK NOT FOUND FOR DATA FIELD" },
|
---|
583 | { 0x12, 0x00, "ADDRESS MARK NOT FOUND FOR ID FIELD" },
|
---|
584 | { 0x27, 0x03, "ASSOCIATED WRITE PROTECT" },
|
---|
585 | { 0x67, 0x06, "ATTACHMENT OF LOGICAL UNIT FAILED" },
|
---|
586 | { 0x00, 0x11, "AUDIO PLAY OPERATION IN PROGRESS" },
|
---|
587 | { 0x00, 0x12, "AUDIO PLAY OPERATION PAUSED" },
|
---|
588 | { 0x00, 0x14, "AUDIO PLAY OPERATION STOPPED DUE TO ERROR" },
|
---|
589 | { 0x00, 0x13, "AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED" },
|
---|
590 | { 0x66, 0x00, "AUTOMATIC DOCUMENT FEEDER COVER UP" },
|
---|
591 | { 0x66, 0x01, "AUTOMATIC DOCUMENT FEEDER LIFT UP" },
|
---|
592 | { 0x00, 0x04, "BEGINNING-OF-PARTITION/MEDIUM DETECTED" },
|
---|
593 | { 0x0C, 0x06, "BLOCK NOT COMPRESSIBLE" },
|
---|
594 | { 0x14, 0x04, "BLOCK SEQUENCE ERROR" },
|
---|
595 | { 0x29, 0x03, "BUS DEVICE RESET FUNCTION OCCURRED" },
|
---|
596 | { 0x11, 0x0E, "CANNOT DECOMPRESS USING DECLARED ALGORITHM" },
|
---|
597 | { 0x30, 0x06, "CANNOT FORMAT MEDIUM - INCOMPATIBLE MEDIUM" },
|
---|
598 | { 0x30, 0x02, "CANNOT READ MEDIUM - INCOMPATIBLE FORMAT" },
|
---|
599 | { 0x30, 0x01, "CANNOT READ MEDIUM - UNKNOWN FORMAT" },
|
---|
600 | { 0x30, 0x08, "CANNOT WRITE - APPLICATION CODE MISMATCH" },
|
---|
601 | { 0x30, 0x05, "CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT" },
|
---|
602 | { 0x30, 0x04, "CANNOT WRITE MEDIUM - UNKNOWN FORMAT" },
|
---|
603 | { 0x52, 0x00, "CARTRIDGE FAULT" },
|
---|
604 | { 0x73, 0x00, "CD CONTROL ERROR" },
|
---|
605 | { 0x3F, 0x02, "CHANGED OPERATING DEFINITION" },
|
---|
606 | { 0x11, 0x06, "CIRC UNRECOVERED ERROR" },
|
---|
607 | { 0x30, 0x03, "CLEANING CARTRIDGE INSTALLED" },
|
---|
608 | { 0x30, 0x07, "CLEANING FAILURE" },
|
---|
609 | { 0x00, 0x17, "CLEANING REQUESTED" },
|
---|
610 | { 0x4A, 0x00, "COMMAND PHASE ERROR" },
|
---|
611 | { 0x2C, 0x00, "COMMAND SEQUENCE ERROR" },
|
---|
612 | { 0x6E, 0x00, "COMMAND TO LOGICAL UNIT FAILED" },
|
---|
613 | { 0x2F, 0x00, "COMMANDS CLEARED BY ANOTHER INITIATOR" },
|
---|
614 | { 0x0C, 0x04, "COMPRESSION CHECK MISCOMPARE ERROR" },
|
---|
615 | { 0x67, 0x00, "CONFIGURATION FAILURE" },
|
---|
616 | { 0x67, 0x01, "CONFIGURATION OF INCAPABLE LOGICAL UNITS FAILED" },
|
---|
617 | { 0x2B, 0x00, "COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT" },
|
---|
618 | { 0x67, 0x07, "CREATION OF LOGICAL UNIT FAILED" },
|
---|
619 | { 0x2C, 0x04, "CURRENT PROGRAM AREA IS EMPTY" },
|
---|
620 | { 0x2C, 0x03, "CURRENT PROGRAM AREA IS NOT EMPTY" },
|
---|
621 | { 0x30, 0x09, "CURRENT SESSION NOT FIXATED FOR APPEND" },
|
---|
622 | { 0x0C, 0x05, "DATA EXPANSION OCCURRED DURING COMPRESSION" },
|
---|
623 | { 0x69, 0x00, "DATA LOSS ON LOGICAL UNIT" },
|
---|
624 | { 0x41, 0x00, "DATA PATH FAILURE (SHOULD USE 40 NN)" },
|
---|
625 | { 0x4B, 0x00, "DATA PHASE ERROR" },
|
---|
626 | { 0x11, 0x07, "DATA RE-SYNCHRONIZATION ERROR" },
|
---|
627 | { 0x16, 0x03, "DATA SYNC ERROR - DATA AUTO-REALLOCATED" },
|
---|
628 | { 0x16, 0x01, "DATA SYNC ERROR - DATA REWRITTEN" },
|
---|
629 | { 0x16, 0x04, "DATA SYNC ERROR - RECOMMEND REASSIGNMENT" },
|
---|
630 | { 0x16, 0x02, "DATA SYNC ERROR - RECOMMEND REWRITE" },
|
---|
631 | { 0x16, 0x00, "DATA SYNCHRONIZATION MARK ERROR" },
|
---|
632 | { 0x11, 0x0D, "DE-COMPRESSION CRC ERROR" },
|
---|
633 | { 0x71, 0x00, "DECOMPRESSION EXCEPTION LONG ALGORITHM ID" },
|
---|
634 | { 0x70, 0xFF, "DECOMPRESSION EXCEPTION SHORT ALGORITHM ID OF NN" },
|
---|
635 | { 0x19, 0x00, "DEFECT LIST ERROR" },
|
---|
636 | { 0x19, 0x03, "DEFECT LIST ERROR IN GROWN LIST" },
|
---|
637 | { 0x19, 0x02, "DEFECT LIST ERROR IN PRIMARY LIST" },
|
---|
638 | { 0x19, 0x01, "DEFECT LIST NOT AVAILABLE" },
|
---|
639 | { 0x1C, 0x00, "DEFECT LIST NOT FOUND" },
|
---|
640 | { 0x32, 0x01, "DEFECT LIST UPDATE FAILURE" },
|
---|
641 | { 0x29, 0x04, "DEVICE INTERNAL RESET" },
|
---|
642 | { 0x40, 0xFF, "DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)" },
|
---|
643 | { 0x66, 0x02, "DOCUMENT JAM IN AUTOMATIC DOCUMENT FEEDER" },
|
---|
644 | { 0x66, 0x03, "DOCUMENT MISS FEED AUTOMATIC IN DOCUMENT FEEDER" },
|
---|
645 | { 0x72, 0x04, "EMPTY OR PARTIALLY WRITTEN RESERVED TRACK" },
|
---|
646 | { 0x34, 0x00, "ENCLOSURE FAILURE" },
|
---|
647 | { 0x35, 0x00, "ENCLOSURE SERVICES FAILURE" },
|
---|
648 | { 0x35, 0x03, "ENCLOSURE SERVICES TRANSFER FAILURE" },
|
---|
649 | { 0x35, 0x04, "ENCLOSURE SERVICES TRANSFER REFUSED" },
|
---|
650 | { 0x35, 0x02, "ENCLOSURE SERVICES UNAVAILABLE" },
|
---|
651 | { 0x3B, 0x0F, "END OF MEDIUM REACHED" },
|
---|
652 | { 0x63, 0x00, "END OF USER AREA ENCOUNTERED ON THIS TRACK" },
|
---|
653 | { 0x00, 0x05, "END-OF-DATA DETECTED" },
|
---|
654 | { 0x14, 0x03, "END-OF-DATA NOT FOUND" },
|
---|
655 | { 0x00, 0x02, "END-OF-PARTITION/MEDIUM DETECTED" },
|
---|
656 | { 0x51, 0x00, "ERASE FAILURE" },
|
---|
657 | { 0x0A, 0x00, "ERROR LOG OVERFLOW" },
|
---|
658 | { 0x11, 0x10, "ERROR READING ISRC NUMBER" },
|
---|
659 | { 0x11, 0x0F, "ERROR READING UPC/EAN NUMBER" },
|
---|
660 | { 0x11, 0x02, "ERROR TOO LONG TO CORRECT" },
|
---|
661 | { 0x03, 0x02, "EXCESSIVE WRITE ERRORS" },
|
---|
662 | { 0x67, 0x04, "EXCHANGE OF LOGICAL UNIT FAILED" },
|
---|
663 | { 0x3B, 0x07, "FAILED TO SENSE BOTTOM-OF-FORM" },
|
---|
664 | { 0x3B, 0x06, "FAILED TO SENSE TOP-OF-FORM" },
|
---|
665 | { 0x5D, 0x00, "FAILURE PREDICTION THRESHOLD EXCEEDED" },
|
---|
666 | { 0x5D, 0xFF, "FAILURE PREDICTION THRESHOLD EXCEEDED (FALSE)" },
|
---|
667 | { 0x00, 0x01, "FILEMARK DETECTED" },
|
---|
668 | { 0x14, 0x02, "FILEMARK OR SETMARK NOT FOUND" },
|
---|
669 | { 0x09, 0x02, "FOCUS SERVO FAILURE" },
|
---|
670 | { 0x31, 0x01, "FORMAT COMMAND FAILED" },
|
---|
671 | { 0x58, 0x00, "GENERATION DOES NOT EXIST" },
|
---|
672 | { 0x1C, 0x02, "GROWN DEFECT LIST NOT FOUND" },
|
---|
673 | { 0x27, 0x01, "HARDWARE WRITE PROTECTED" },
|
---|
674 | { 0x09, 0x04, "HEAD SELECT FAULT" },
|
---|
675 | { 0x00, 0x06, "I/O PROCESS TERMINATED" },
|
---|
676 | { 0x10, 0x00, "ID CRC OR ECC ERROR" },
|
---|
677 | { 0x5E, 0x03, "IDLE CONDITION ACTIVATED BY COMMAND" },
|
---|
678 | { 0x5E, 0x01, "IDLE CONDITION ACTIVATED BY TIMER" },
|
---|
679 | { 0x22, 0x00, "ILLEGAL FUNCTION (USE 20 00, 24 00, OR 26 00)" },
|
---|
680 | { 0x64, 0x00, "ILLEGAL MODE FOR THIS TRACK" },
|
---|
681 | { 0x28, 0x01, "IMPORT OR EXPORT ELEMENT ACCESSED" },
|
---|
682 | { 0x30, 0x00, "INCOMPATIBLE MEDIUM INSTALLED" },
|
---|
683 | { 0x11, 0x08, "INCOMPLETE BLOCK READ" },
|
---|
684 | { 0x6A, 0x00, "INFORMATIONAL, REFER TO LOG" },
|
---|
685 | { 0x48, 0x00, "INITIATOR DETECTED ERROR MESSAGE RECEIVED" },
|
---|
686 | { 0x3F, 0x03, "INQUIRY DATA HAS CHANGED" },
|
---|
687 | { 0x44, 0x00, "INTERNAL TARGET FAILURE" },
|
---|
688 | { 0x3D, 0x00, "INVALID BITS IN IDENTIFY MESSAGE" },
|
---|
689 | { 0x2C, 0x02, "INVALID COMBINATION OF WINDOWS SPECIFIED" },
|
---|
690 | { 0x20, 0x00, "INVALID COMMAND OPERATION CODE" },
|
---|
691 | { 0x21, 0x01, "INVALID ELEMENT ADDRESS" },
|
---|
692 | { 0x24, 0x00, "INVALID FIELD IN CDB" },
|
---|
693 | { 0x26, 0x00, "INVALID FIELD IN PARAMETER LIST" },
|
---|
694 | { 0x49, 0x00, "INVALID MESSAGE ERROR" },
|
---|
695 | { 0x64, 0x01, "INVALID PACKET SIZE" },
|
---|
696 | { 0x26, 0x04, "INVALID RELEASE OF ACTIVE PERSISTENT RESERVATION" },
|
---|
697 | { 0x11, 0x05, "L-EC UNCORRECTABLE ERROR" },
|
---|
698 | { 0x60, 0x00, "LAMP FAILURE" },
|
---|
699 | { 0x5B, 0x02, "LOG COUNTER AT MAXIMUM" },
|
---|
700 | { 0x5B, 0x00, "LOG EXCEPTION" },
|
---|
701 | { 0x5B, 0x03, "LOG LIST CODES EXHAUSTED" },
|
---|
702 | { 0x2A, 0x02, "LOG PARAMETERS CHANGED" },
|
---|
703 | { 0x21, 0x00, "LOGICAL BLOCK ADDRESS OUT OF RANGE" },
|
---|
704 | { 0x08, 0x03, "LOGICAL UNIT COMMUNICATION CRC ERROR (ULTRA-DMA/32)" },
|
---|
705 | { 0x08, 0x00, "LOGICAL UNIT COMMUNICATION FAILURE" },
|
---|
706 | { 0x08, 0x02, "LOGICAL UNIT COMMUNICATION PARITY ERROR" },
|
---|
707 | { 0x08, 0x01, "LOGICAL UNIT COMMUNICATION TIME-OUT" },
|
---|
708 | { 0x05, 0x00, "LOGICAL UNIT DOES NOT RESPOND TO SELECTION" },
|
---|
709 | { 0x4C, 0x00, "LOGICAL UNIT FAILED SELF-CONFIGURATION" },
|
---|
710 | { 0x3E, 0x01, "LOGICAL UNIT FAILURE" },
|
---|
711 | { 0x3E, 0x00, "LOGICAL UNIT HAS NOT SELF-CONFIGURED YET" },
|
---|
712 | { 0x04, 0x01, "LOGICAL UNIT IS IN PROCESS OF BECOMING READY" },
|
---|
713 | { 0x68, 0x00, "LOGICAL UNIT NOT CONFIGURED" },
|
---|
714 | { 0x04, 0x00, "LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE" },
|
---|
715 | { 0x04, 0x04, "LOGICAL UNIT NOT READY, FORMAT IN PROGRESS" },
|
---|
716 | { 0x04, 0x02, "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED" },
|
---|
717 | { 0x04, 0x08, "LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS" },
|
---|
718 | { 0x04, 0x03, "LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED" },
|
---|
719 | { 0x04, 0x07, "LOGICAL UNIT NOT READY, OPERATION IN PROGRESS" },
|
---|
720 | { 0x04, 0x05, "LOGICAL UNIT NOT READY, REBUILD IN PROGRESS" },
|
---|
721 | { 0x04, 0x06, "LOGICAL UNIT NOT READY, RECALCULATION IN PROGRESS" },
|
---|
722 | { 0x25, 0x00, "LOGICAL UNIT NOT SUPPORTED" },
|
---|
723 | { 0x27, 0x02, "LOGICAL UNIT SOFTWARE WRITE PROTECTED" },
|
---|
724 | { 0x5E, 0x00, "LOW POWER CONDITION ON" },
|
---|
725 | { 0x15, 0x01, "MECHANICAL POSITIONING ERROR" },
|
---|
726 | { 0x53, 0x00, "MEDIA LOAD OR EJECT FAILED" },
|
---|
727 | { 0x3B, 0x0D, "MEDIUM DESTINATION ELEMENT FULL" },
|
---|
728 | { 0x31, 0x00, "MEDIUM FORMAT CORRUPTED" },
|
---|
729 | { 0x3B, 0x13, "MEDIUM MAGAZINE INSERTED" },
|
---|
730 | { 0x3B, 0x14, "MEDIUM MAGAZINE LOCKED" },
|
---|
731 | { 0x3B, 0x11, "MEDIUM MAGAZINE NOT ACCESSIBLE" },
|
---|
732 | { 0x3B, 0x12, "MEDIUM MAGAZINE REMOVED" },
|
---|
733 | { 0x3B, 0x15, "MEDIUM MAGAZINE UNLOCKED" },
|
---|
734 | { 0x3A, 0x00, "MEDIUM NOT PRESENT" },
|
---|
735 | { 0x3A, 0x01, "MEDIUM NOT PRESENT - TRAY CLOSED" },
|
---|
736 | { 0x3A, 0x02, "MEDIUM NOT PRESENT - TRAY OPEN" },
|
---|
737 | { 0x53, 0x02, "MEDIUM REMOVAL PREVENTED" },
|
---|
738 | { 0x3B, 0x0E, "MEDIUM SOURCE ELEMENT EMPTY" },
|
---|
739 | { 0x43, 0x00, "MESSAGE ERROR" },
|
---|
740 | { 0x3F, 0x01, "MICROCODE HAS BEEN CHANGED" },
|
---|
741 | { 0x1D, 0x00, "MISCOMPARE DURING VERIFY OPERATION" },
|
---|
742 | { 0x11, 0x0A, "MISCORRECTED ERROR" },
|
---|
743 | { 0x2A, 0x01, "MODE PARAMETERS CHANGED" },
|
---|
744 | { 0x67, 0x03, "MODIFICATION OF LOGICAL UNIT FAILED" },
|
---|
745 | { 0x69, 0x01, "MULTIPLE LOGICAL UNIT FAILURES" },
|
---|
746 | { 0x07, 0x00, "MULTIPLE PERIPHERAL DEVICES SELECTED" },
|
---|
747 | { 0x11, 0x03, "MULTIPLE READ ERRORS" },
|
---|
748 | { 0x00, 0x00, "NO ADDITIONAL SENSE INFORMATION" },
|
---|
749 | { 0x00, 0x15, "NO CURRENT AUDIO STATUS TO RETURN" },
|
---|
750 | { 0x32, 0x00, "NO DEFECT SPARE LOCATION AVAILABLE" },
|
---|
751 | { 0x11, 0x09, "NO GAP FOUND" },
|
---|
752 | { 0x01, 0x00, "NO INDEX/SECTOR SIGNAL" },
|
---|
753 | { 0x06, 0x00, "NO REFERENCE POSITION FOUND" },
|
---|
754 | { 0x02, 0x00, "NO SEEK COMPLETE" },
|
---|
755 | { 0x03, 0x01, "NO WRITE CURRENT" },
|
---|
756 | { 0x28, 0x00, "NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED" },
|
---|
757 | { 0x00, 0x16, "OPERATION IN PROGRESS" },
|
---|
758 | { 0x5A, 0x01, "OPERATOR MEDIUM REMOVAL REQUEST" },
|
---|
759 | { 0x5A, 0x00, "OPERATOR REQUEST OR STATE CHANGE INPUT" },
|
---|
760 | { 0x5A, 0x03, "OPERATOR SELECTED WRITE PERMIT" },
|
---|
761 | { 0x5A, 0x02, "OPERATOR SELECTED WRITE PROTECT" },
|
---|
762 | { 0x61, 0x02, "OUT OF FOCUS" },
|
---|
763 | { 0x4E, 0x00, "OVERLAPPED COMMANDS ATTEMPTED" },
|
---|
764 | { 0x2D, 0x00, "OVERWRITE ERROR ON UPDATE IN PLACE" },
|
---|
765 | { 0x63, 0x01, "PACKET DOES NOT FIT IN AVAILABLE SPACE" },
|
---|
766 | { 0x3B, 0x05, "PAPER JAM" },
|
---|
767 | { 0x1A, 0x00, "PARAMETER LIST LENGTH ERROR" },
|
---|
768 | { 0x26, 0x01, "PARAMETER NOT SUPPORTED" },
|
---|
769 | { 0x26, 0x02, "PARAMETER VALUE INVALID" },
|
---|
770 | { 0x2A, 0x00, "PARAMETERS CHANGED" },
|
---|
771 | { 0x69, 0x02, "PARITY/DATA MISMATCH" },
|
---|
772 | { 0x1F, 0x00, "PARTIAL DEFECT LIST TRANSFER" },
|
---|
773 | { 0x03, 0x00, "PERIPHERAL DEVICE WRITE FAULT" },
|
---|
774 | { 0x27, 0x05, "PERMANENT WRITE PROTECT" },
|
---|
775 | { 0x27, 0x04, "PERSISTENT WRITE PROTECT" },
|
---|
776 | { 0x50, 0x02, "POSITION ERROR RELATED TO TIMING" },
|
---|
777 | { 0x3B, 0x0C, "POSITION PAST BEGINNING OF MEDIUM" },
|
---|
778 | { 0x3B, 0x0B, "POSITION PAST END OF MEDIUM" },
|
---|
779 | { 0x15, 0x02, "POSITIONING ERROR DETECTED BY READ OF MEDIUM" },
|
---|
780 | { 0x73, 0x01, "POWER CALIBRATION AREA ALMOST FULL" },
|
---|
781 | { 0x73, 0x03, "POWER CALIBRATION AREA ERROR" },
|
---|
782 | { 0x73, 0x02, "POWER CALIBRATION AREA IS FULL" },
|
---|
783 | { 0x29, 0x01, "POWER ON OCCURRED" },
|
---|
784 | { 0x29, 0x00, "POWER ON, RESET, OR BUS DEVICE RESET OCCURRED" },
|
---|
785 | { 0x42, 0x00, "POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN)" },
|
---|
786 | { 0x1C, 0x01, "PRIMARY DEFECT LIST NOT FOUND" },
|
---|
787 | { 0x73, 0x05, "PROGRAM MEMORY AREA IS FULL" },
|
---|
788 | { 0x73, 0x04, "PROGRAM MEMORY AREA UPDATE FAILURE" },
|
---|
789 | { 0x40, 0x00, "RAM FAILURE (SHOULD USE 40 NN)" },
|
---|
790 | { 0x15, 0x00, "RANDOM POSITIONING ERROR" },
|
---|
791 | { 0x11, 0x11, "READ ERROR - LOSS OF STREAMING" },
|
---|
792 | { 0x3B, 0x0A, "READ PAST BEGINNING OF MEDIUM" },
|
---|
793 | { 0x3B, 0x09, "READ PAST END OF MEDIUM" },
|
---|
794 | { 0x11, 0x01, "READ RETRIES EXHAUSTED" },
|
---|
795 | { 0x6C, 0x00, "REBUILD FAILURE OCCURRED" },
|
---|
796 | { 0x6D, 0x00, "RECALCULATE FAILURE OCCURRED" },
|
---|
797 | { 0x14, 0x01, "RECORD NOT FOUND" },
|
---|
798 | { 0x14, 0x06, "RECORD NOT FOUND - DATA AUTO-REALLOCATED" },
|
---|
799 | { 0x14, 0x05, "RECORD NOT FOUND - RECOMMEND REASSIGNMENT" },
|
---|
800 | { 0x14, 0x00, "RECORDED ENTITY NOT FOUND" },
|
---|
801 | { 0x18, 0x02, "RECOVERED DATA - DATA AUTO-REALLOCATED" },
|
---|
802 | { 0x18, 0x05, "RECOVERED DATA - RECOMMEND REASSIGNMENT" },
|
---|
803 | { 0x18, 0x06, "RECOVERED DATA - RECOMMEND REWRITE" },
|
---|
804 | { 0x17, 0x05, "RECOVERED DATA USING PREVIOUS SECTOR ID" },
|
---|
805 | { 0x18, 0x03, "RECOVERED DATA WITH CIRC" },
|
---|
806 | { 0x18, 0x07, "RECOVERED DATA WITH ECC - DATA REWRITTEN" },
|
---|
807 | { 0x18, 0x01, "RECOVERED DATA WITH ERROR CORR. & RETRIES APPLIED" },
|
---|
808 | { 0x18, 0x00, "RECOVERED DATA WITH ERROR CORRECTION APPLIED" },
|
---|
809 | { 0x18, 0x04, "RECOVERED DATA WITH L-EC" },
|
---|
810 | { 0x17, 0x03, "RECOVERED DATA WITH NEGATIVE HEAD OFFSET" },
|
---|
811 | { 0x17, 0x00, "RECOVERED DATA WITH NO ERROR CORRECTION APPLIED" },
|
---|
812 | { 0x17, 0x02, "RECOVERED DATA WITH POSITIVE HEAD OFFSET" },
|
---|
813 | { 0x17, 0x01, "RECOVERED DATA WITH RETRIES" },
|
---|
814 | { 0x17, 0x04, "RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED" },
|
---|
815 | { 0x17, 0x06, "RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED" },
|
---|
816 | { 0x17, 0x09, "RECOVERED DATA WITHOUT ECC - DATA REWRITTEN" },
|
---|
817 | { 0x17, 0x07, "RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT" },
|
---|
818 | { 0x17, 0x08, "RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE" },
|
---|
819 | { 0x1E, 0x00, "RECOVERED ID WITH ECC CORRECTION" },
|
---|
820 | { 0x6B, 0x01, "REDUNDANCY LEVEL GOT BETTER" },
|
---|
821 | { 0x6B, 0x02, "REDUNDANCY LEVEL GOT WORSE" },
|
---|
822 | { 0x67, 0x05, "REMOVE OF LOGICAL UNIT FAILED" },
|
---|
823 | { 0x3B, 0x08, "REPOSITION ERROR" },
|
---|
824 | { 0x2A, 0x03, "RESERVATIONS PREEMPTED" },
|
---|
825 | { 0x36, 0x00, "RIBBON, INK, OR TONER FAILURE" },
|
---|
826 | { 0x37, 0x00, "ROUNDED PARAMETER" },
|
---|
827 | { 0x5C, 0x00, "RPL STATUS CHANGE" },
|
---|
828 | { 0x39, 0x00, "SAVING PARAMETERS NOT SUPPORTED" },
|
---|
829 | { 0x62, 0x00, "SCAN HEAD POSITIONING ERROR" },
|
---|
830 | { 0x29, 0x02, "SCSI BUS RESET OCCURRED" },
|
---|
831 | { 0x47, 0x00, "SCSI PARITY ERROR" },
|
---|
832 | { 0x54, 0x00, "SCSI TO HOST SYSTEM INTERFACE FAILURE" },
|
---|
833 | { 0x45, 0x00, "SELECT OR RESELECT FAILURE" },
|
---|
834 | { 0x3B, 0x00, "SEQUENTIAL POSITIONING ERROR" },
|
---|
835 | { 0x72, 0x00, "SESSION FIXATION ERROR" },
|
---|
836 | { 0x72, 0x03, "SESSION FIXATION ERROR - INCOMPLETE TRACK IN SESSION" },
|
---|
837 | { 0x72, 0x01, "SESSION FIXATION ERROR WRITING LEAD-IN" },
|
---|
838 | { 0x72, 0x02, "SESSION FIXATION ERROR WRITING LEAD-OUT" },
|
---|
839 | { 0x00, 0x03, "SETMARK DETECTED" },
|
---|
840 | { 0x3B, 0x04, "SLEW FAILURE" },
|
---|
841 | { 0x09, 0x03, "SPINDLE SERVO FAILURE" },
|
---|
842 | { 0x5C, 0x02, "SPINDLES NOT SYNCHRONIZED" },
|
---|
843 | { 0x5C, 0x01, "SPINDLES SYNCHRONIZED" },
|
---|
844 | { 0x5E, 0x04, "STANDBY CONDITION ACTIVATED BY COMMAND" },
|
---|
845 | { 0x5E, 0x02, "STANDBY CONDITION ACTIVATED BY TIMER" },
|
---|
846 | { 0x6B, 0x00, "STATE CHANGE HAS OCCURRED" },
|
---|
847 | { 0x1B, 0x00, "SYNCHRONOUS DATA TRANSFER ERROR" },
|
---|
848 | { 0x55, 0x01, "SYSTEM BUFFER FULL" },
|
---|
849 | { 0x55, 0x00, "SYSTEM RESOURCE FAILURE" },
|
---|
850 | { 0x4D, 0xFF, "TAGGED OVERLAPPED COMMANDS (NN = QUEUE TAG)" },
|
---|
851 | { 0x33, 0x00, "TAPE LENGTH ERROR" },
|
---|
852 | { 0x3B, 0x03, "TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY" },
|
---|
853 | { 0x3B, 0x01, "TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM" },
|
---|
854 | { 0x3B, 0x02, "TAPE POSITION ERROR AT END-OF-MEDIUM" },
|
---|
855 | { 0x3F, 0x00, "TARGET OPERATING CONDITIONS HAVE CHANGED" },
|
---|
856 | { 0x5B, 0x01, "THRESHOLD CONDITION MET" },
|
---|
857 | { 0x26, 0x03, "THRESHOLD PARAMETERS NOT SUPPORTED" },
|
---|
858 | { 0x3E, 0x02, "TIMEOUT ON LOGICAL UNIT" },
|
---|
859 | { 0x2C, 0x01, "TOO MANY WINDOWS SPECIFIED" },
|
---|
860 | { 0x09, 0x00, "TRACK FOLLOWING ERROR" },
|
---|
861 | { 0x09, 0x01, "TRACKING SERVO FAILURE" },
|
---|
862 | { 0x61, 0x01, "UNABLE TO ACQUIRE VIDEO" },
|
---|
863 | { 0x57, 0x00, "UNABLE TO RECOVER TABLE-OF-CONTENTS" },
|
---|
864 | { 0x53, 0x01, "UNLOAD TAPE FAILURE" },
|
---|
865 | { 0x11, 0x00, "UNRECOVERED READ ERROR" },
|
---|
866 | { 0x11, 0x04, "UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED" },
|
---|
867 | { 0x11, 0x0B, "UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT" },
|
---|
868 | { 0x11, 0x0C, "UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA" },
|
---|
869 | { 0x46, 0x00, "UNSUCCESSFUL SOFT RESET" },
|
---|
870 | { 0x35, 0x01, "UNSUPPORTED ENCLOSURE FUNCTION" },
|
---|
871 | { 0x59, 0x00, "UPDATED BLOCK READ" },
|
---|
872 | { 0x61, 0x00, "VIDEO ACQUISITION ERROR" },
|
---|
873 | { 0x65, 0x00, "VOLTAGE FAULT" },
|
---|
874 | { 0x0B, 0x00, "WARNING" },
|
---|
875 | { 0x0B, 0x02, "WARNING - ENCLOSURE DEGRADED" },
|
---|
876 | { 0x0B, 0x01, "WARNING - SPECIFIED TEMPERATURE EXCEEDED" },
|
---|
877 | { 0x50, 0x00, "WRITE APPEND ERROR" },
|
---|
878 | { 0x50, 0x01, "WRITE APPEND POSITION ERROR" },
|
---|
879 | { 0x0C, 0x00, "WRITE ERROR" },
|
---|
880 | { 0x0C, 0x02, "WRITE ERROR - AUTO REALLOCATION FAILED" },
|
---|
881 | { 0x0C, 0x09, "WRITE ERROR - LOSS OF STREAMING" },
|
---|
882 | { 0x0C, 0x0A, "WRITE ERROR - PADDING BLOCKS ADDED" },
|
---|
883 | { 0x0C, 0x03, "WRITE ERROR - RECOMMEND REASSIGNMENT" },
|
---|
884 | { 0x0C, 0x01, "WRITE ERROR - RECOVERED WITH AUTO REALLOCATION" },
|
---|
885 | { 0x0C, 0x08, "WRITE ERROR - RECOVERY FAILED" },
|
---|
886 | { 0x0C, 0x07, "WRITE ERROR - RECOVERY NEEDED" },
|
---|
887 | { 0x27, 0x00, "WRITE PROTECTED" },
|
---|
888 | };
|
---|
889 |
|
---|
890 | /**
|
---|
891 | * Return the plain text of an ATA command for debugging purposes.
|
---|
892 | * Don't allocate the string as we use this function in Log() statements.
|
---|
893 | */
|
---|
894 | const char * ATACmdText(uint8_t uCmd)
|
---|
895 | {
|
---|
896 | AssertCompile(RT_ELEMENTS(g_apszATACmdNames) == (1 << (8*sizeof(uCmd))));
|
---|
897 | return g_apszATACmdNames[uCmd];
|
---|
898 | }
|
---|
899 |
|
---|
900 | /**
|
---|
901 | * Return the plain text of a SCSI command for debugging purposes.
|
---|
902 | * Don't allocate the string as we use this function in Log() statements.
|
---|
903 | */
|
---|
904 | const char * SCSICmdText(uint8_t uCmd)
|
---|
905 | {
|
---|
906 | AssertCompile(RT_ELEMENTS(g_apszSCSICmdNames) == (1 << (8*sizeof(uCmd))));
|
---|
907 | return g_apszSCSICmdNames[uCmd];
|
---|
908 | }
|
---|
909 |
|
---|
910 | /**
|
---|
911 | * Return the plain text of a SCSI sense code.
|
---|
912 | * Don't allocate the string as we use this function in Log() statements.
|
---|
913 | */
|
---|
914 | const char * SCSISenseText(uint8_t uSense)
|
---|
915 | {
|
---|
916 | if (uSense < RT_ELEMENTS(g_apszSCSISenseNames))
|
---|
917 | return g_apszSCSISenseNames[uSense];
|
---|
918 |
|
---|
919 | return "(SCSI sense out of range)";
|
---|
920 | }
|
---|
921 |
|
---|
922 | /**
|
---|
923 | * Return the plain text of an extended SCSI sense key.
|
---|
924 | * Don't allocate the string as we use this function in Log() statements.
|
---|
925 | */
|
---|
926 | const char * SCSISenseExtText(uint8_t uASC, uint8_t uASCQ)
|
---|
927 | {
|
---|
928 | unsigned iIdx;
|
---|
929 |
|
---|
930 | /* Linear search. Doesn't hurt as we don't call this function very frequently */
|
---|
931 | for (iIdx = 0; iIdx < RT_ELEMENTS(g_aSCSISenseText); iIdx++)
|
---|
932 | {
|
---|
933 | if ( g_aSCSISenseText[iIdx].uASC == uASC
|
---|
934 | && ( g_aSCSISenseText[iIdx].uASCQ == uASCQ
|
---|
935 | || g_aSCSISenseText[iIdx].uASCQ == 0xff))
|
---|
936 | return g_aSCSISenseText[iIdx].pszSenseText;
|
---|
937 | }
|
---|
938 | return "(Unknown extended sense code)";
|
---|
939 | }
|
---|