ide-cd: kill CDROM_STATE_FLAGS() macro
[deliverable/linux.git] / drivers / ide / ide-cd.h
1 /*
2 * linux/drivers/ide/ide_cd.h
3 *
4 * Copyright (C) 1996-98 Erik Andersen
5 * Copyright (C) 1998-2000 Jens Axboe
6 */
7 #ifndef _IDE_CD_H
8 #define _IDE_CD_H
9
10 #include <linux/cdrom.h>
11 #include <asm/byteorder.h>
12
13 /* Turn this on to have the driver print out the meanings of the
14 ATAPI error codes. This will use up additional kernel-space
15 memory, though. */
16
17 #ifndef VERBOSE_IDE_CD_ERRORS
18 #define VERBOSE_IDE_CD_ERRORS 1
19 #endif
20
21
22 /* Turning this on will remove code to work around various nonstandard
23 ATAPI implementations. If you know your drive follows the standard,
24 this will give you a slightly smaller kernel. */
25
26 #ifndef STANDARD_ATAPI
27 #define STANDARD_ATAPI 0
28 #endif
29
30
31 /* Turning this on will disable the door-locking functionality.
32 This is apparently needed for supermount. */
33
34 #ifndef NO_DOOR_LOCKING
35 #define NO_DOOR_LOCKING 0
36 #endif
37
38 /*
39 * typical timeout for packet command
40 */
41 #define ATAPI_WAIT_PC (60 * HZ)
42 #define ATAPI_WAIT_WRITE_BUSY (10 * HZ)
43
44 /************************************************************************/
45
46 #define SECTOR_BITS 9
47 #ifndef SECTOR_SIZE
48 #define SECTOR_SIZE (1 << SECTOR_BITS)
49 #endif
50 #define SECTORS_PER_FRAME (CD_FRAMESIZE >> SECTOR_BITS)
51 #define SECTOR_BUFFER_SIZE (CD_FRAMESIZE * 32)
52
53 /* Configuration flags. These describe the capabilities of the drive.
54 They generally do not change after initialization, unless we learn
55 more about the drive from stuff failing. */
56 struct ide_cd_config_flags {
57 __u8 drq_interrupt : 1; /* Device sends an interrupt when ready
58 for a packet command. */
59 __u8 no_doorlock : 1; /* Drive cannot lock the door. */
60 __u8 no_eject : 1; /* Drive cannot eject the disc. */
61 __u8 nec260 : 1; /* Drive is a pre-1.2 NEC 260 drive. */
62 __u8 tocaddr_as_bcd : 1; /* TOC addresses are in BCD. */
63 __u8 toctracks_as_bcd : 1; /* TOC track numbers are in BCD. */
64 __u8 limit_nframes : 1; /* Drive does not provide data in
65 multiples of SECTOR_SIZE when more
66 than one interrupt is needed. */
67 __u8 seeking : 1; /* Seeking in progress */
68 __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */
69 byte max_speed; /* Max speed of the drive */
70 };
71
72 /* State flags. These give information about the current state of the
73 drive, and will change during normal operation. */
74 struct ide_cd_state_flags {
75 __u8 media_changed : 1; /* Driver has noticed a media change. */
76 __u8 toc_valid : 1; /* Saved TOC information is current. */
77 __u8 door_locked : 1; /* We think that the drive door is locked. */
78 __u8 writing : 1; /* the drive is currently writing */
79 __u8 reserved : 4;
80 byte current_speed; /* Current speed of the drive */
81 };
82
83 /* Structure of a MSF cdrom address. */
84 struct atapi_msf {
85 byte reserved;
86 byte minute;
87 byte second;
88 byte frame;
89 };
90
91 /* Space to hold the disk TOC. */
92 #define MAX_TRACKS 99
93 struct atapi_toc_header {
94 unsigned short toc_length;
95 byte first_track;
96 byte last_track;
97 };
98
99 struct atapi_toc_entry {
100 byte reserved1;
101 #if defined(__BIG_ENDIAN_BITFIELD)
102 __u8 adr : 4;
103 __u8 control : 4;
104 #elif defined(__LITTLE_ENDIAN_BITFIELD)
105 __u8 control : 4;
106 __u8 adr : 4;
107 #else
108 #error "Please fix <asm/byteorder.h>"
109 #endif
110 byte track;
111 byte reserved2;
112 union {
113 unsigned lba;
114 struct atapi_msf msf;
115 } addr;
116 };
117
118 struct atapi_toc {
119 int last_session_lba;
120 int xa_flag;
121 unsigned long capacity;
122 struct atapi_toc_header hdr;
123 struct atapi_toc_entry ent[MAX_TRACKS+1];
124 /* One extra for the leadout. */
125 };
126
127 /* This should probably go into cdrom.h along with the other
128 * generic stuff now in the Mt. Fuji spec.
129 */
130 struct atapi_capabilities_page {
131 struct mode_page_header header;
132 #if defined(__BIG_ENDIAN_BITFIELD)
133 __u8 parameters_saveable : 1;
134 __u8 reserved1 : 1;
135 __u8 page_code : 6;
136 #elif defined(__LITTLE_ENDIAN_BITFIELD)
137 __u8 page_code : 6;
138 __u8 reserved1 : 1;
139 __u8 parameters_saveable : 1;
140 #else
141 #error "Please fix <asm/byteorder.h>"
142 #endif
143
144 byte page_length;
145
146 #if defined(__BIG_ENDIAN_BITFIELD)
147 __u8 reserved2 : 2;
148 /* Drive supports reading of DVD-RAM discs */
149 __u8 dvd_ram_read : 1;
150 /* Drive supports reading of DVD-R discs */
151 __u8 dvd_r_read : 1;
152 /* Drive supports reading of DVD-ROM discs */
153 __u8 dvd_rom : 1;
154 /* Drive supports reading CD-R discs with addressing method 2 */
155 __u8 method2 : 1; /* reserved in 1.2 */
156 /* Drive can read from CD-R/W (CD-E) discs (orange book, part III) */
157 __u8 cd_rw_read : 1; /* reserved in 1.2 */
158 /* Drive supports read from CD-R discs (orange book, part II) */
159 __u8 cd_r_read : 1; /* reserved in 1.2 */
160 #elif defined(__LITTLE_ENDIAN_BITFIELD)
161 /* Drive supports read from CD-R discs (orange book, part II) */
162 __u8 cd_r_read : 1; /* reserved in 1.2 */
163 /* Drive can read from CD-R/W (CD-E) discs (orange book, part III) */
164 __u8 cd_rw_read : 1; /* reserved in 1.2 */
165 /* Drive supports reading CD-R discs with addressing method 2 */
166 __u8 method2 : 1;
167 /* Drive supports reading of DVD-ROM discs */
168 __u8 dvd_rom : 1;
169 /* Drive supports reading of DVD-R discs */
170 __u8 dvd_r_read : 1;
171 /* Drive supports reading of DVD-RAM discs */
172 __u8 dvd_ram_read : 1;
173 __u8 reserved2 : 2;
174 #else
175 #error "Please fix <asm/byteorder.h>"
176 #endif
177
178 #if defined(__BIG_ENDIAN_BITFIELD)
179 __u8 reserved3 : 2;
180 /* Drive can write DVD-RAM discs */
181 __u8 dvd_ram_write : 1;
182 /* Drive can write DVD-R discs */
183 __u8 dvd_r_write : 1;
184 __u8 reserved3a : 1;
185 /* Drive can fake writes */
186 __u8 test_write : 1;
187 /* Drive can write to CD-R/W (CD-E) discs (orange book, part III) */
188 __u8 cd_rw_write : 1; /* reserved in 1.2 */
189 /* Drive supports write to CD-R discs (orange book, part II) */
190 __u8 cd_r_write : 1; /* reserved in 1.2 */
191 #elif defined(__LITTLE_ENDIAN_BITFIELD)
192 /* Drive can write to CD-R discs (orange book, part II) */
193 __u8 cd_r_write : 1; /* reserved in 1.2 */
194 /* Drive can write to CD-R/W (CD-E) discs (orange book, part III) */
195 __u8 cd_rw_write : 1; /* reserved in 1.2 */
196 /* Drive can fake writes */
197 __u8 test_write : 1;
198 __u8 reserved3a : 1;
199 /* Drive can write DVD-R discs */
200 __u8 dvd_r_write : 1;
201 /* Drive can write DVD-RAM discs */
202 __u8 dvd_ram_write : 1;
203 __u8 reserved3 : 2;
204 #else
205 #error "Please fix <asm/byteorder.h>"
206 #endif
207
208 #if defined(__BIG_ENDIAN_BITFIELD)
209 __u8 reserved4 : 1;
210 /* Drive can read multisession discs. */
211 __u8 multisession : 1;
212 /* Drive can read mode 2, form 2 data. */
213 __u8 mode2_form2 : 1;
214 /* Drive can read mode 2, form 1 (XA) data. */
215 __u8 mode2_form1 : 1;
216 /* Drive supports digital output on port 2. */
217 __u8 digport2 : 1;
218 /* Drive supports digital output on port 1. */
219 __u8 digport1 : 1;
220 /* Drive can deliver a composite audio/video data stream. */
221 __u8 composite : 1;
222 /* Drive supports audio play operations. */
223 __u8 audio_play : 1;
224 #elif defined(__LITTLE_ENDIAN_BITFIELD)
225 /* Drive supports audio play operations. */
226 __u8 audio_play : 1;
227 /* Drive can deliver a composite audio/video data stream. */
228 __u8 composite : 1;
229 /* Drive supports digital output on port 1. */
230 __u8 digport1 : 1;
231 /* Drive supports digital output on port 2. */
232 __u8 digport2 : 1;
233 /* Drive can read mode 2, form 1 (XA) data. */
234 __u8 mode2_form1 : 1;
235 /* Drive can read mode 2, form 2 data. */
236 __u8 mode2_form2 : 1;
237 /* Drive can read multisession discs. */
238 __u8 multisession : 1;
239 __u8 reserved4 : 1;
240 #else
241 #error "Please fix <asm/byteorder.h>"
242 #endif
243
244 #if defined(__BIG_ENDIAN_BITFIELD)
245 __u8 reserved5 : 1;
246 /* Drive can return Media Catalog Number (UPC) info. */
247 __u8 upc : 1;
248 /* Drive can return International Standard Recording Code info. */
249 __u8 isrc : 1;
250 /* Drive supports C2 error pointers. */
251 __u8 c2_pointers : 1;
252 /* R-W data will be returned deinterleaved and error corrected. */
253 __u8 rw_corr : 1;
254 /* Subchannel reads can return combined R-W information. */
255 __u8 rw_supported : 1;
256 /* Drive can continue a read cdda operation from a loss of streaming.*/
257 __u8 cdda_accurate : 1;
258 /* Drive can read Red Book audio data. */
259 __u8 cdda : 1;
260 #elif defined(__LITTLE_ENDIAN_BITFIELD)
261 /* Drive can read Red Book audio data. */
262 __u8 cdda : 1;
263 /* Drive can continue a read cdda operation from a loss of streaming.*/
264 __u8 cdda_accurate : 1;
265 /* Subchannel reads can return combined R-W information. */
266 __u8 rw_supported : 1;
267 /* R-W data will be returned deinterleaved and error corrected. */
268 __u8 rw_corr : 1;
269 /* Drive supports C2 error pointers. */
270 __u8 c2_pointers : 1;
271 /* Drive can return International Standard Recording Code info. */
272 __u8 isrc : 1;
273 /* Drive can return Media Catalog Number (UPC) info. */
274 __u8 upc : 1;
275 __u8 reserved5 : 1;
276 #else
277 #error "Please fix <asm/byteorder.h>"
278 #endif
279
280 #if defined(__BIG_ENDIAN_BITFIELD)
281 /* Drive mechanism types. */
282 mechtype_t mechtype : 3;
283 __u8 reserved6 : 1;
284 /* Drive can eject a disc or changer cartridge. */
285 __u8 eject : 1;
286 /* State of prevent/allow jumper. */
287 __u8 prevent_jumper : 1;
288 /* Present state of door lock. */
289 __u8 lock_state : 1;
290 /* Drive can lock the door. */
291 __u8 lock : 1;
292 #elif defined(__LITTLE_ENDIAN_BITFIELD)
293
294 /* Drive can lock the door. */
295 __u8 lock : 1;
296 /* Present state of door lock. */
297 __u8 lock_state : 1;
298 /* State of prevent/allow jumper. */
299 __u8 prevent_jumper : 1;
300 /* Drive can eject a disc or changer cartridge. */
301 __u8 eject : 1;
302 __u8 reserved6 : 1;
303 /* Drive mechanism types. */
304 mechtype_t mechtype : 3;
305 #else
306 #error "Please fix <asm/byteorder.h>"
307 #endif
308
309 #if defined(__BIG_ENDIAN_BITFIELD)
310 __u8 reserved7 : 4;
311 /* Drive supports software slot selection. */
312 __u8 sss : 1; /* reserved in 1.2 */
313 /* Changer can report exact contents of slots. */
314 __u8 disc_present : 1; /* reserved in 1.2 */
315 /* Audio for each channel can be muted independently. */
316 __u8 separate_mute : 1;
317 /* Audio level for each channel can be controlled independently. */
318 __u8 separate_volume : 1;
319 #elif defined(__LITTLE_ENDIAN_BITFIELD)
320
321 /* Audio level for each channel can be controlled independently. */
322 __u8 separate_volume : 1;
323 /* Audio for each channel can be muted independently. */
324 __u8 separate_mute : 1;
325 /* Changer can report exact contents of slots. */
326 __u8 disc_present : 1; /* reserved in 1.2 */
327 /* Drive supports software slot selection. */
328 __u8 sss : 1; /* reserved in 1.2 */
329 __u8 reserved7 : 4;
330 #else
331 #error "Please fix <asm/byteorder.h>"
332 #endif
333
334 /* Note: the following four fields are returned in big-endian form. */
335 /* Maximum speed (in kB/s). */
336 unsigned short maxspeed;
337 /* Number of discrete volume levels. */
338 unsigned short n_vol_levels;
339 /* Size of cache in drive, in kB. */
340 unsigned short buffer_size;
341 /* Current speed (in kB/s). */
342 unsigned short curspeed;
343 char pad[4];
344 };
345
346 /* Extra per-device info for cdrom drives. */
347 struct cdrom_info {
348 ide_drive_t *drive;
349 ide_driver_t *driver;
350 struct gendisk *disk;
351 struct kref kref;
352
353 /* Buffer for table of contents. NULL if we haven't allocated
354 a TOC buffer for this device yet. */
355
356 struct atapi_toc *toc;
357
358 unsigned long sector_buffered;
359 unsigned long nsectors_buffered;
360 unsigned char *buffer;
361
362 /* The result of the last successful request sense command
363 on this device. */
364 struct request_sense sense_data;
365
366 struct request request_sense_request;
367 int dma;
368 unsigned long last_block;
369 unsigned long start_seek;
370
371 struct ide_cd_config_flags config_flags;
372 struct ide_cd_state_flags state_flags;
373
374 /* Per-device info needed by cdrom.c generic driver. */
375 struct cdrom_device_info devinfo;
376
377 unsigned long write_timeout;
378 };
379
380 /****************************************************************************
381 * Descriptions of ATAPI error codes.
382 */
383
384 /* This stuff should be in cdrom.h, since it is now generic... */
385
386 /* ATAPI sense keys (from table 140 of ATAPI 2.6) */
387 #define NO_SENSE 0x00
388 #define RECOVERED_ERROR 0x01
389 #define NOT_READY 0x02
390 #define MEDIUM_ERROR 0x03
391 #define HARDWARE_ERROR 0x04
392 #define ILLEGAL_REQUEST 0x05
393 #define UNIT_ATTENTION 0x06
394 #define DATA_PROTECT 0x07
395 #define BLANK_CHECK 0x08
396 #define ABORTED_COMMAND 0x0b
397 #define MISCOMPARE 0x0e
398
399
400
401 /* This stuff should be in cdrom.h, since it is now generic... */
402 #if VERBOSE_IDE_CD_ERRORS
403
404 /* The generic packet command opcodes for CD/DVD Logical Units,
405 * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
406 static const struct {
407 unsigned short packet_command;
408 const char * const text;
409 } packet_command_texts[] = {
410 { GPCMD_TEST_UNIT_READY, "Test Unit Ready" },
411 { GPCMD_REQUEST_SENSE, "Request Sense" },
412 { GPCMD_FORMAT_UNIT, "Format Unit" },
413 { GPCMD_INQUIRY, "Inquiry" },
414 { GPCMD_START_STOP_UNIT, "Start/Stop Unit" },
415 { GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL, "Prevent/Allow Medium Removal" },
416 { GPCMD_READ_FORMAT_CAPACITIES, "Read Format Capacities" },
417 { GPCMD_READ_CDVD_CAPACITY, "Read Cd/Dvd Capacity" },
418 { GPCMD_READ_10, "Read 10" },
419 { GPCMD_WRITE_10, "Write 10" },
420 { GPCMD_SEEK, "Seek" },
421 { GPCMD_WRITE_AND_VERIFY_10, "Write and Verify 10" },
422 { GPCMD_VERIFY_10, "Verify 10" },
423 { GPCMD_FLUSH_CACHE, "Flush Cache" },
424 { GPCMD_READ_SUBCHANNEL, "Read Subchannel" },
425 { GPCMD_READ_TOC_PMA_ATIP, "Read Table of Contents" },
426 { GPCMD_READ_HEADER, "Read Header" },
427 { GPCMD_PLAY_AUDIO_10, "Play Audio 10" },
428 { GPCMD_GET_CONFIGURATION, "Get Configuration" },
429 { GPCMD_PLAY_AUDIO_MSF, "Play Audio MSF" },
430 { GPCMD_PLAYAUDIO_TI, "Play Audio TrackIndex" },
431 { GPCMD_GET_EVENT_STATUS_NOTIFICATION, "Get Event Status Notification" },
432 { GPCMD_PAUSE_RESUME, "Pause/Resume" },
433 { GPCMD_STOP_PLAY_SCAN, "Stop Play/Scan" },
434 { GPCMD_READ_DISC_INFO, "Read Disc Info" },
435 { GPCMD_READ_TRACK_RZONE_INFO, "Read Track Rzone Info" },
436 { GPCMD_RESERVE_RZONE_TRACK, "Reserve Rzone Track" },
437 { GPCMD_SEND_OPC, "Send OPC" },
438 { GPCMD_MODE_SELECT_10, "Mode Select 10" },
439 { GPCMD_REPAIR_RZONE_TRACK, "Repair Rzone Track" },
440 { GPCMD_MODE_SENSE_10, "Mode Sense 10" },
441 { GPCMD_CLOSE_TRACK, "Close Track" },
442 { GPCMD_BLANK, "Blank" },
443 { GPCMD_SEND_EVENT, "Send Event" },
444 { GPCMD_SEND_KEY, "Send Key" },
445 { GPCMD_REPORT_KEY, "Report Key" },
446 { GPCMD_LOAD_UNLOAD, "Load/Unload" },
447 { GPCMD_SET_READ_AHEAD, "Set Read-ahead" },
448 { GPCMD_READ_12, "Read 12" },
449 { GPCMD_GET_PERFORMANCE, "Get Performance" },
450 { GPCMD_SEND_DVD_STRUCTURE, "Send DVD Structure" },
451 { GPCMD_READ_DVD_STRUCTURE, "Read DVD Structure" },
452 { GPCMD_SET_STREAMING, "Set Streaming" },
453 { GPCMD_READ_CD_MSF, "Read CD MSF" },
454 { GPCMD_SCAN, "Scan" },
455 { GPCMD_SET_SPEED, "Set Speed" },
456 { GPCMD_PLAY_CD, "Play CD" },
457 { GPCMD_MECHANISM_STATUS, "Mechanism Status" },
458 { GPCMD_READ_CD, "Read CD" },
459 };
460
461
462
463 /* From Table 303 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
464 static const char * const sense_key_texts[16] = {
465 "No sense data",
466 "Recovered error",
467 "Not ready",
468 "Medium error",
469 "Hardware error",
470 "Illegal request",
471 "Unit attention",
472 "Data protect",
473 "Blank check",
474 "(reserved)",
475 "(reserved)",
476 "Aborted command",
477 "(reserved)",
478 "(reserved)",
479 "Miscompare",
480 "(reserved)",
481 };
482
483 /* From Table 304 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
484 static const struct {
485 unsigned long asc_ascq;
486 const char * const text;
487 } sense_data_texts[] = {
488 { 0x000000, "No additional sense information" },
489 { 0x000011, "Play operation in progress" },
490 { 0x000012, "Play operation paused" },
491 { 0x000013, "Play operation successfully completed" },
492 { 0x000014, "Play operation stopped due to error" },
493 { 0x000015, "No current audio status to return" },
494 { 0x010c0a, "Write error - padding blocks added" },
495 { 0x011700, "Recovered data with no error correction applied" },
496 { 0x011701, "Recovered data with retries" },
497 { 0x011702, "Recovered data with positive head offset" },
498 { 0x011703, "Recovered data with negative head offset" },
499 { 0x011704, "Recovered data with retries and/or CIRC applied" },
500 { 0x011705, "Recovered data using previous sector ID" },
501 { 0x011800, "Recovered data with error correction applied" },
502 { 0x011801, "Recovered data with error correction and retries applied"},
503 { 0x011802, "Recovered data - the data was auto-reallocated" },
504 { 0x011803, "Recovered data with CIRC" },
505 { 0x011804, "Recovered data with L-EC" },
506 { 0x015d00,
507 "Failure prediction threshold exceeded - Predicted logical unit failure" },
508 { 0x015d01,
509 "Failure prediction threshold exceeded - Predicted media failure" },
510 { 0x015dff, "Failure prediction threshold exceeded - False" },
511 { 0x017301, "Power calibration area almost full" },
512 { 0x020400, "Logical unit not ready - cause not reportable" },
513 /* Following is misspelled in ATAPI 2.6, _and_ in Mt. Fuji */
514 { 0x020401,
515 "Logical unit not ready - in progress [sic] of becoming ready" },
516 { 0x020402, "Logical unit not ready - initializing command required" },
517 { 0x020403, "Logical unit not ready - manual intervention required" },
518 { 0x020404, "Logical unit not ready - format in progress" },
519 { 0x020407, "Logical unit not ready - operation in progress" },
520 { 0x020408, "Logical unit not ready - long write in progress" },
521 { 0x020600, "No reference position found (media may be upside down)" },
522 { 0x023000, "Incompatible medium installed" },
523 { 0x023a00, "Medium not present" },
524 { 0x025300, "Media load or eject failed" },
525 { 0x025700, "Unable to recover table of contents" },
526 { 0x030300, "Peripheral device write fault" },
527 { 0x030301, "No write current" },
528 { 0x030302, "Excessive write errors" },
529 { 0x030c00, "Write error" },
530 { 0x030c01, "Write error - Recovered with auto reallocation" },
531 { 0x030c02, "Write error - auto reallocation failed" },
532 { 0x030c03, "Write error - recommend reassignment" },
533 { 0x030c04, "Compression check miscompare error" },
534 { 0x030c05, "Data expansion occurred during compress" },
535 { 0x030c06, "Block not compressible" },
536 { 0x030c07, "Write error - recovery needed" },
537 { 0x030c08, "Write error - recovery failed" },
538 { 0x030c09, "Write error - loss of streaming" },
539 { 0x031100, "Unrecovered read error" },
540 { 0x031106, "CIRC unrecovered error" },
541 { 0x033101, "Format command failed" },
542 { 0x033200, "No defect spare location available" },
543 { 0x033201, "Defect list update failure" },
544 { 0x035100, "Erase failure" },
545 { 0x037200, "Session fixation error" },
546 { 0x037201, "Session fixation error writin lead-in" },
547 { 0x037202, "Session fixation error writin lead-out" },
548 { 0x037300, "CD control error" },
549 { 0x037302, "Power calibration area is full" },
550 { 0x037303, "Power calibration area error" },
551 { 0x037304, "Program memory area / RMA update failure" },
552 { 0x037305, "Program memory area / RMA is full" },
553 { 0x037306, "Program memory area / RMA is (almost) full" },
554
555 { 0x040200, "No seek complete" },
556 { 0x040300, "Write fault" },
557 { 0x040900, "Track following error" },
558 { 0x040901, "Tracking servo failure" },
559 { 0x040902, "Focus servo failure" },
560 { 0x040903, "Spindle servo failure" },
561 { 0x041500, "Random positioning error" },
562 { 0x041501, "Mechanical positioning or changer error" },
563 { 0x041502, "Positioning error detected by read of medium" },
564 { 0x043c00, "Mechanical positioning or changer error" },
565 { 0x044000, "Diagnostic failure on component (ASCQ)" },
566 { 0x044400, "Internal CD/DVD logical unit failure" },
567 { 0x04b600, "Media load mechanism failed" },
568 { 0x051a00, "Parameter list length error" },
569 { 0x052000, "Invalid command operation code" },
570 { 0x052100, "Logical block address out of range" },
571 { 0x052102, "Invalid address for write" },
572 { 0x052400, "Invalid field in command packet" },
573 { 0x052600, "Invalid field in parameter list" },
574 { 0x052601, "Parameter not supported" },
575 { 0x052602, "Parameter value invalid" },
576 { 0x052700, "Write protected media" },
577 { 0x052c00, "Command sequence error" },
578 { 0x052c03, "Current program area is not empty" },
579 { 0x052c04, "Current program area is empty" },
580 { 0x053001, "Cannot read medium - unknown format" },
581 { 0x053002, "Cannot read medium - incompatible format" },
582 { 0x053900, "Saving parameters not supported" },
583 { 0x054e00, "Overlapped commands attempted" },
584 { 0x055302, "Medium removal prevented" },
585 { 0x055500, "System resource failure" },
586 { 0x056300, "End of user area encountered on this track" },
587 { 0x056400, "Illegal mode for this track or incompatible medium" },
588 { 0x056f00, "Copy protection key exchange failure - Authentication failure" },
589 { 0x056f01, "Copy protection key exchange failure - Key not present" },
590 { 0x056f02, "Copy protection key exchange failure - Key not established" },
591 { 0x056f03, "Read of scrambled sector without authentication" },
592 { 0x056f04, "Media region code is mismatched to logical unit" },
593 { 0x056f05, "Drive region must be permanent / region reset count error" },
594 { 0x057203, "Session fixation error - incomplete track in session" },
595 { 0x057204, "Empty or partially written reserved track" },
596 { 0x057205, "No more RZONE reservations are allowed" },
597 { 0x05bf00, "Loss of streaming" },
598 { 0x062800, "Not ready to ready transition, medium may have changed" },
599 { 0x062900, "Power on, reset or hardware reset occurred" },
600 { 0x062a00, "Parameters changed" },
601 { 0x062a01, "Mode parameters changed" },
602 { 0x062e00, "Insufficient time for operation" },
603 { 0x063f00, "Logical unit operating conditions have changed" },
604 { 0x063f01, "Microcode has been changed" },
605 { 0x065a00, "Operator request or state change input (unspecified)" },
606 { 0x065a01, "Operator medium removal request" },
607 { 0x0bb900, "Play operation aborted" },
608
609 /* Here we use 0xff for the key (not a valid key) to signify
610 * that these can have _any_ key value associated with them... */
611 { 0xff0401, "Logical unit is in process of becoming ready" },
612 { 0xff0400, "Logical unit not ready, cause not reportable" },
613 { 0xff0402, "Logical unit not ready, initializing command required" },
614 { 0xff0403, "Logical unit not ready, manual intervention required" },
615 { 0xff0500, "Logical unit does not respond to selection" },
616 { 0xff0800, "Logical unit communication failure" },
617 { 0xff0802, "Logical unit communication parity error" },
618 { 0xff0801, "Logical unit communication time-out" },
619 { 0xff2500, "Logical unit not supported" },
620 { 0xff4c00, "Logical unit failed self-configuration" },
621 { 0xff3e00, "Logical unit has not self-configured yet" },
622 };
623 #endif
624
625
626 #endif /* _IDE_CD_H */
This page took 0.054103 seconds and 6 git commands to generate.