1
2
3
4
5
6
7
8
9
10
11
12 #ifndef _UAPI_LINUX_CDROM_H
13 #define _UAPI_LINUX_CDROM_H
14
15 #include <linux/types.h>
16 #include <asm/byteorder.h>
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 #define EDRIVE_CANT_DO_THIS EOPNOTSUPP
48
49
50
51
52
53
54 #define CDROMPAUSE 0x5301
55 #define CDROMRESUME 0x5302
56 #define CDROMPLAYMSF 0x5303
57 #define CDROMPLAYTRKIND 0x5304
58
59 #define CDROMREADTOCHDR 0x5305
60
61 #define CDROMREADTOCENTRY 0x5306
62
63 #define CDROMSTOP 0x5307
64 #define CDROMSTART 0x5308
65 #define CDROMEJECT 0x5309
66 #define CDROMVOLCTRL 0x530a
67
68 #define CDROMSUBCHNL 0x530b
69
70 #define CDROMREADMODE2 0x530c
71
72 #define CDROMREADMODE1 0x530d
73
74 #define CDROMREADAUDIO 0x530e
75 #define CDROMEJECT_SW 0x530f
76 #define CDROMMULTISESSION 0x5310
77
78
79 #define CDROM_GET_MCN 0x5311
80
81 #define CDROM_GET_UPC CDROM_GET_MCN
82
83 #define CDROMRESET 0x5312
84 #define CDROMVOLREAD 0x5313
85
86 #define CDROMREADRAW 0x5314
87
88
89
90
91 #define CDROMREADCOOKED 0x5315
92 #define CDROMSEEK 0x5316
93
94
95
96
97
98 #define CDROMPLAYBLK 0x5317
99
100
101
102
103 #define CDROMREADALL 0x5318
104
105
106
107
108
109
110
111
112 #define CDROMGETSPINDOWN 0x531d
113 #define CDROMSETSPINDOWN 0x531e
114
115
116
117
118
119
120 #define CDROMCLOSETRAY 0x5319
121 #define CDROM_SET_OPTIONS 0x5320
122 #define CDROM_CLEAR_OPTIONS 0x5321
123 #define CDROM_SELECT_SPEED 0x5322
124 #define CDROM_SELECT_DISC 0x5323
125 #define CDROM_MEDIA_CHANGED 0x5325
126 #define CDROM_DRIVE_STATUS 0x5326
127 #define CDROM_DISC_STATUS 0x5327
128 #define CDROM_CHANGER_NSLOTS 0x5328
129 #define CDROM_LOCKDOOR 0x5329
130 #define CDROM_DEBUG 0x5330
131 #define CDROM_GET_CAPABILITY 0x5331
132
133
134
135
136
137
138 #define CDROMAUDIOBUFSIZ 0x5382
139
140
141
142 #define DVD_READ_STRUCT 0x5390
143 #define DVD_WRITE_STRUCT 0x5391
144 #define DVD_AUTH 0x5392
145
146 #define CDROM_SEND_PACKET 0x5393
147 #define CDROM_NEXT_WRITABLE 0x5394
148 #define CDROM_LAST_WRITTEN 0x5395
149
150
151
152
153
154
155 struct cdrom_msf0
156 {
157 __u8 minute;
158 __u8 second;
159 __u8 frame;
160 };
161
162
163 union cdrom_addr
164 {
165 struct cdrom_msf0 msf;
166 int lba;
167 };
168
169
170 struct cdrom_msf
171 {
172 __u8 cdmsf_min0;
173 __u8 cdmsf_sec0;
174 __u8 cdmsf_frame0;
175 __u8 cdmsf_min1;
176 __u8 cdmsf_sec1;
177 __u8 cdmsf_frame1;
178 };
179
180
181 struct cdrom_ti
182 {
183 __u8 cdti_trk0;
184 __u8 cdti_ind0;
185 __u8 cdti_trk1;
186 __u8 cdti_ind1;
187 };
188
189
190 struct cdrom_tochdr
191 {
192 __u8 cdth_trk0;
193 __u8 cdth_trk1;
194 };
195
196
197 struct cdrom_volctrl
198 {
199 __u8 channel0;
200 __u8 channel1;
201 __u8 channel2;
202 __u8 channel3;
203 };
204
205
206 struct cdrom_subchnl
207 {
208 __u8 cdsc_format;
209 __u8 cdsc_audiostatus;
210 __u8 cdsc_adr: 4;
211 __u8 cdsc_ctrl: 4;
212 __u8 cdsc_trk;
213 __u8 cdsc_ind;
214 union cdrom_addr cdsc_absaddr;
215 union cdrom_addr cdsc_reladdr;
216 };
217
218
219
220 struct cdrom_tocentry
221 {
222 __u8 cdte_track;
223 __u8 cdte_adr :4;
224 __u8 cdte_ctrl :4;
225 __u8 cdte_format;
226 union cdrom_addr cdte_addr;
227 __u8 cdte_datamode;
228 };
229
230
231 struct cdrom_read
232 {
233 int cdread_lba;
234 char *cdread_bufaddr;
235 int cdread_buflen;
236 };
237
238
239 struct cdrom_read_audio
240 {
241 union cdrom_addr addr;
242 __u8 addr_format;
243 int nframes;
244 __u8 __user *buf;
245 };
246
247
248 struct cdrom_multisession
249 {
250 union cdrom_addr addr;
251
252
253 __u8 xa_flag;
254 __u8 addr_format;
255 };
256
257
258
259
260
261
262 struct cdrom_mcn
263 {
264 __u8 medium_catalog_number[14];
265 };
266
267
268 struct cdrom_blk
269 {
270 unsigned from;
271 unsigned short len;
272 };
273
274 #define CDROM_PACKET_SIZE 12
275
276 #define CGC_DATA_UNKNOWN 0
277 #define CGC_DATA_WRITE 1
278 #define CGC_DATA_READ 2
279 #define CGC_DATA_NONE 3
280
281
282 struct cdrom_generic_command
283 {
284 unsigned char cmd[CDROM_PACKET_SIZE];
285 unsigned char __user *buffer;
286 unsigned int buflen;
287 int stat;
288 struct request_sense __user *sense;
289 unsigned char data_direction;
290 int quiet;
291 int timeout;
292 void __user *reserved[1];
293 };
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330 #define CD_MINS 74
331 #define CD_SECS 60
332 #define CD_FRAMES 75
333 #define CD_SYNC_SIZE 12
334 #define CD_MSF_OFFSET 150
335 #define CD_CHUNK_SIZE 24
336 #define CD_NUM_OF_CHUNKS 98
337 #define CD_FRAMESIZE_SUB 96
338 #define CD_HEAD_SIZE 4
339 #define CD_SUBHEAD_SIZE 8
340 #define CD_EDC_SIZE 4
341 #define CD_ZERO_SIZE 8
342 #define CD_ECC_SIZE 276
343 #define CD_FRAMESIZE 2048
344 #define CD_FRAMESIZE_RAW 2352
345 #define CD_FRAMESIZE_RAWER 2646
346
347 #define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
348 #define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
349
350 #define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
351 #define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE)
352 #define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD)
353
354
355 #define CDROM_LBA 0x01
356 #define CDROM_MSF 0x02
357
358
359 #define CDROM_DATA_TRACK 0x04
360
361
362 #define CDROM_LEADOUT 0xAA
363
364
365 #define CDROM_AUDIO_INVALID 0x00
366 #define CDROM_AUDIO_PLAY 0x11
367 #define CDROM_AUDIO_PAUSED 0x12
368 #define CDROM_AUDIO_COMPLETED 0x13
369 #define CDROM_AUDIO_ERROR 0x14
370 #define CDROM_AUDIO_NO_STATUS 0x15
371
372
373 #define CDC_CLOSE_TRAY 0x1
374 #define CDC_OPEN_TRAY 0x2
375 #define CDC_LOCK 0x4
376 #define CDC_SELECT_SPEED 0x8
377 #define CDC_SELECT_DISC 0x10
378 #define CDC_MULTI_SESSION 0x20
379 #define CDC_MCN 0x40
380 #define CDC_MEDIA_CHANGED 0x80
381 #define CDC_PLAY_AUDIO 0x100
382 #define CDC_RESET 0x200
383 #define CDC_DRIVE_STATUS 0x800
384 #define CDC_GENERIC_PACKET 0x1000
385 #define CDC_CD_R 0x2000
386 #define CDC_CD_RW 0x4000
387 #define CDC_DVD 0x8000
388 #define CDC_DVD_R 0x10000
389 #define CDC_DVD_RAM 0x20000
390 #define CDC_MO_DRIVE 0x40000
391 #define CDC_MRW 0x80000
392 #define CDC_MRW_W 0x100000
393 #define CDC_RAM 0x200000
394
395
396 #define CDS_NO_INFO 0
397 #define CDS_NO_DISC 1
398 #define CDS_TRAY_OPEN 2
399 #define CDS_DRIVE_NOT_READY 3
400 #define CDS_DISC_OK 4
401
402
403
404 #define CDS_AUDIO 100
405 #define CDS_DATA_1 101
406 #define CDS_DATA_2 102
407 #define CDS_XA_2_1 103
408 #define CDS_XA_2_2 104
409 #define CDS_MIXED 105
410
411
412 #define CDO_AUTO_CLOSE 0x1
413 #define CDO_AUTO_EJECT 0x2
414 #define CDO_USE_FFLAGS 0x4
415 #define CDO_LOCK 0x8
416 #define CDO_CHECK_TYPE 0x10
417
418
419 #define CDSL_NONE (INT_MAX-1)
420 #define CDSL_CURRENT INT_MAX
421
422
423
424
425
426
427 #define CD_PART_MAX 64
428 #define CD_PART_MASK (CD_PART_MAX - 1)
429
430
431
432
433
434
435
436 #define GPCMD_BLANK 0xa1
437 #define GPCMD_CLOSE_TRACK 0x5b
438 #define GPCMD_FLUSH_CACHE 0x35
439 #define GPCMD_FORMAT_UNIT 0x04
440 #define GPCMD_GET_CONFIGURATION 0x46
441 #define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
442 #define GPCMD_GET_PERFORMANCE 0xac
443 #define GPCMD_INQUIRY 0x12
444 #define GPCMD_LOAD_UNLOAD 0xa6
445 #define GPCMD_MECHANISM_STATUS 0xbd
446 #define GPCMD_MODE_SELECT_10 0x55
447 #define GPCMD_MODE_SENSE_10 0x5a
448 #define GPCMD_PAUSE_RESUME 0x4b
449 #define GPCMD_PLAY_AUDIO_10 0x45
450 #define GPCMD_PLAY_AUDIO_MSF 0x47
451 #define GPCMD_PLAY_AUDIO_TI 0x48
452 #define GPCMD_PLAY_CD 0xbc
453 #define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
454 #define GPCMD_READ_10 0x28
455 #define GPCMD_READ_12 0xa8
456 #define GPCMD_READ_BUFFER 0x3c
457 #define GPCMD_READ_BUFFER_CAPACITY 0x5c
458 #define GPCMD_READ_CDVD_CAPACITY 0x25
459 #define GPCMD_READ_CD 0xbe
460 #define GPCMD_READ_CD_MSF 0xb9
461 #define GPCMD_READ_DISC_INFO 0x51
462 #define GPCMD_READ_DVD_STRUCTURE 0xad
463 #define GPCMD_READ_FORMAT_CAPACITIES 0x23
464 #define GPCMD_READ_HEADER 0x44
465 #define GPCMD_READ_TRACK_RZONE_INFO 0x52
466 #define GPCMD_READ_SUBCHANNEL 0x42
467 #define GPCMD_READ_TOC_PMA_ATIP 0x43
468 #define GPCMD_REPAIR_RZONE_TRACK 0x58
469 #define GPCMD_REPORT_KEY 0xa4
470 #define GPCMD_REQUEST_SENSE 0x03
471 #define GPCMD_RESERVE_RZONE_TRACK 0x53
472 #define GPCMD_SEND_CUE_SHEET 0x5d
473 #define GPCMD_SCAN 0xba
474 #define GPCMD_SEEK 0x2b
475 #define GPCMD_SEND_DVD_STRUCTURE 0xbf
476 #define GPCMD_SEND_EVENT 0xa2
477 #define GPCMD_SEND_KEY 0xa3
478 #define GPCMD_SEND_OPC 0x54
479 #define GPCMD_SET_READ_AHEAD 0xa7
480 #define GPCMD_SET_STREAMING 0xb6
481 #define GPCMD_START_STOP_UNIT 0x1b
482 #define GPCMD_STOP_PLAY_SCAN 0x4e
483 #define GPCMD_TEST_UNIT_READY 0x00
484 #define GPCMD_VERIFY_10 0x2f
485 #define GPCMD_WRITE_10 0x2a
486 #define GPCMD_WRITE_12 0xaa
487 #define GPCMD_WRITE_AND_VERIFY_10 0x2e
488 #define GPCMD_WRITE_BUFFER 0x3b
489
490
491
492
493 #define GPCMD_SET_SPEED 0xbb
494
495
496 #define GPCMD_PLAYAUDIO_TI 0x48
497
498
499
500
501 #define GPCMD_GET_MEDIA_STATUS 0xda
502
503
504 #define GPMODE_VENDOR_PAGE 0x00
505 #define GPMODE_R_W_ERROR_PAGE 0x01
506 #define GPMODE_WRITE_PARMS_PAGE 0x05
507 #define GPMODE_WCACHING_PAGE 0x08
508 #define GPMODE_AUDIO_CTL_PAGE 0x0e
509 #define GPMODE_POWER_PAGE 0x1a
510 #define GPMODE_FAULT_FAIL_PAGE 0x1c
511 #define GPMODE_TO_PROTECT_PAGE 0x1d
512 #define GPMODE_CAPABILITIES_PAGE 0x2a
513 #define GPMODE_ALL_PAGES 0x3f
514
515
516 #define GPMODE_CDROM_PAGE 0x0d
517
518
519
520
521 #define DVD_STRUCT_PHYSICAL 0x00
522 #define DVD_STRUCT_COPYRIGHT 0x01
523 #define DVD_STRUCT_DISCKEY 0x02
524 #define DVD_STRUCT_BCA 0x03
525 #define DVD_STRUCT_MANUFACT 0x04
526
527 struct dvd_layer {
528 __u8 book_version : 4;
529 __u8 book_type : 4;
530 __u8 min_rate : 4;
531 __u8 disc_size : 4;
532 __u8 layer_type : 4;
533 __u8 track_path : 1;
534 __u8 nlayers : 2;
535 __u8 track_density : 4;
536 __u8 linear_density : 4;
537 __u8 bca : 1;
538 __u32 start_sector;
539 __u32 end_sector;
540 __u32 end_sector_l0;
541 };
542
543 #define DVD_LAYERS 4
544
545 struct dvd_physical {
546 __u8 type;
547 __u8 layer_num;
548 struct dvd_layer layer[DVD_LAYERS];
549 };
550
551 struct dvd_copyright {
552 __u8 type;
553
554 __u8 layer_num;
555 __u8 cpst;
556 __u8 rmi;
557 };
558
559 struct dvd_disckey {
560 __u8 type;
561
562 unsigned agid : 2;
563 __u8 value[2048];
564 };
565
566 struct dvd_bca {
567 __u8 type;
568
569 int len;
570 __u8 value[188];
571 };
572
573 struct dvd_manufact {
574 __u8 type;
575
576 __u8 layer_num;
577 int len;
578 __u8 value[2048];
579 };
580
581 typedef union {
582 __u8 type;
583
584 struct dvd_physical physical;
585 struct dvd_copyright copyright;
586 struct dvd_disckey disckey;
587 struct dvd_bca bca;
588 struct dvd_manufact manufact;
589 } dvd_struct;
590
591
592
593
594
595
596 #define DVD_LU_SEND_AGID 0
597 #define DVD_HOST_SEND_CHALLENGE 1
598 #define DVD_LU_SEND_KEY1 2
599 #define DVD_LU_SEND_CHALLENGE 3
600 #define DVD_HOST_SEND_KEY2 4
601
602
603 #define DVD_AUTH_ESTABLISHED 5
604 #define DVD_AUTH_FAILURE 6
605
606
607 #define DVD_LU_SEND_TITLE_KEY 7
608 #define DVD_LU_SEND_ASF 8
609 #define DVD_INVALIDATE_AGID 9
610 #define DVD_LU_SEND_RPC_STATE 10
611 #define DVD_HOST_SEND_RPC_STATE 11
612
613
614 typedef __u8 dvd_key[5];
615 typedef __u8 dvd_challenge[10];
616
617 struct dvd_lu_send_agid {
618 __u8 type;
619 unsigned agid : 2;
620 };
621
622 struct dvd_host_send_challenge {
623 __u8 type;
624 unsigned agid : 2;
625
626 dvd_challenge chal;
627 };
628
629 struct dvd_send_key {
630 __u8 type;
631 unsigned agid : 2;
632
633 dvd_key key;
634 };
635
636 struct dvd_lu_send_challenge {
637 __u8 type;
638 unsigned agid : 2;
639
640 dvd_challenge chal;
641 };
642
643 #define DVD_CPM_NO_COPYRIGHT 0
644 #define DVD_CPM_COPYRIGHTED 1
645
646 #define DVD_CP_SEC_NONE 0
647 #define DVD_CP_SEC_EXIST 1
648
649 #define DVD_CGMS_UNRESTRICTED 0
650 #define DVD_CGMS_SINGLE 2
651 #define DVD_CGMS_RESTRICTED 3
652
653 struct dvd_lu_send_title_key {
654 __u8 type;
655 unsigned agid : 2;
656
657 dvd_key title_key;
658 int lba;
659 unsigned cpm : 1;
660 unsigned cp_sec : 1;
661 unsigned cgms : 2;
662 };
663
664 struct dvd_lu_send_asf {
665 __u8 type;
666 unsigned agid : 2;
667
668 unsigned asf : 1;
669 };
670
671 struct dvd_host_send_rpcstate {
672 __u8 type;
673 __u8 pdrc;
674 };
675
676 struct dvd_lu_send_rpcstate {
677 __u8 type : 2;
678 __u8 vra : 3;
679 __u8 ucca : 3;
680 __u8 region_mask;
681 __u8 rpc_scheme;
682 };
683
684 typedef union {
685 __u8 type;
686
687 struct dvd_lu_send_agid lsa;
688 struct dvd_host_send_challenge hsc;
689 struct dvd_send_key lsk;
690 struct dvd_lu_send_challenge lsc;
691 struct dvd_send_key hsk;
692 struct dvd_lu_send_title_key lstk;
693 struct dvd_lu_send_asf lsasf;
694 struct dvd_host_send_rpcstate hrpcs;
695 struct dvd_lu_send_rpcstate lrpcs;
696 } dvd_authinfo;
697
698 struct request_sense {
699 #if defined(__BIG_ENDIAN_BITFIELD)
700 __u8 valid : 1;
701 __u8 error_code : 7;
702 #elif defined(__LITTLE_ENDIAN_BITFIELD)
703 __u8 error_code : 7;
704 __u8 valid : 1;
705 #endif
706 __u8 segment_number;
707 #if defined(__BIG_ENDIAN_BITFIELD)
708 __u8 reserved1 : 2;
709 __u8 ili : 1;
710 __u8 reserved2 : 1;
711 __u8 sense_key : 4;
712 #elif defined(__LITTLE_ENDIAN_BITFIELD)
713 __u8 sense_key : 4;
714 __u8 reserved2 : 1;
715 __u8 ili : 1;
716 __u8 reserved1 : 2;
717 #endif
718 __u8 information[4];
719 __u8 add_sense_len;
720 __u8 command_info[4];
721 __u8 asc;
722 __u8 ascq;
723 __u8 fruc;
724 __u8 sks[3];
725 __u8 asb[46];
726 };
727
728
729
730
731 #define CDF_RWRT 0x0020
732 #define CDF_HWDM 0x0024
733 #define CDF_MRW 0x0028
734
735
736
737
738 #define CDM_MRW_NOTMRW 0
739 #define CDM_MRW_BGFORMAT_INACTIVE 1
740 #define CDM_MRW_BGFORMAT_ACTIVE 2
741 #define CDM_MRW_BGFORMAT_COMPLETE 3
742
743
744
745
746 #define MRW_LBA_DMA 0
747 #define MRW_LBA_GAA 1
748
749
750
751
752
753 #define MRW_MODE_PC_PRE1 0x2c
754 #define MRW_MODE_PC 0x03
755
756 struct mrw_feature_desc {
757 __be16 feature_code;
758 #if defined(__BIG_ENDIAN_BITFIELD)
759 __u8 reserved1 : 2;
760 __u8 feature_version : 4;
761 __u8 persistent : 1;
762 __u8 curr : 1;
763 #elif defined(__LITTLE_ENDIAN_BITFIELD)
764 __u8 curr : 1;
765 __u8 persistent : 1;
766 __u8 feature_version : 4;
767 __u8 reserved1 : 2;
768 #endif
769 __u8 add_len;
770 #if defined(__BIG_ENDIAN_BITFIELD)
771 __u8 reserved2 : 7;
772 __u8 write : 1;
773 #elif defined(__LITTLE_ENDIAN_BITFIELD)
774 __u8 write : 1;
775 __u8 reserved2 : 7;
776 #endif
777 __u8 reserved3;
778 __u8 reserved4;
779 __u8 reserved5;
780 };
781
782
783 struct rwrt_feature_desc {
784 __be16 feature_code;
785 #if defined(__BIG_ENDIAN_BITFIELD)
786 __u8 reserved1 : 2;
787 __u8 feature_version : 4;
788 __u8 persistent : 1;
789 __u8 curr : 1;
790 #elif defined(__LITTLE_ENDIAN_BITFIELD)
791 __u8 curr : 1;
792 __u8 persistent : 1;
793 __u8 feature_version : 4;
794 __u8 reserved1 : 2;
795 #endif
796 __u8 add_len;
797 __u32 last_lba;
798 __u32 block_size;
799 __u16 blocking;
800 #if defined(__BIG_ENDIAN_BITFIELD)
801 __u8 reserved2 : 7;
802 __u8 page_present : 1;
803 #elif defined(__LITTLE_ENDIAN_BITFIELD)
804 __u8 page_present : 1;
805 __u8 reserved2 : 7;
806 #endif
807 __u8 reserved3;
808 };
809
810 typedef struct {
811 __be16 disc_information_length;
812 #if defined(__BIG_ENDIAN_BITFIELD)
813 __u8 reserved1 : 3;
814 __u8 erasable : 1;
815 __u8 border_status : 2;
816 __u8 disc_status : 2;
817 #elif defined(__LITTLE_ENDIAN_BITFIELD)
818 __u8 disc_status : 2;
819 __u8 border_status : 2;
820 __u8 erasable : 1;
821 __u8 reserved1 : 3;
822 #else
823 #error "Please fix <asm/byteorder.h>"
824 #endif
825 __u8 n_first_track;
826 __u8 n_sessions_lsb;
827 __u8 first_track_lsb;
828 __u8 last_track_lsb;
829 #if defined(__BIG_ENDIAN_BITFIELD)
830 __u8 did_v : 1;
831 __u8 dbc_v : 1;
832 __u8 uru : 1;
833 __u8 reserved2 : 2;
834 __u8 dbit : 1;
835 __u8 mrw_status : 2;
836 #elif defined(__LITTLE_ENDIAN_BITFIELD)
837 __u8 mrw_status : 2;
838 __u8 dbit : 1;
839 __u8 reserved2 : 2;
840 __u8 uru : 1;
841 __u8 dbc_v : 1;
842 __u8 did_v : 1;
843 #endif
844 __u8 disc_type;
845 __u8 n_sessions_msb;
846 __u8 first_track_msb;
847 __u8 last_track_msb;
848 __u32 disc_id;
849 __u32 lead_in;
850 __u32 lead_out;
851 __u8 disc_bar_code[8];
852 __u8 reserved3;
853 __u8 n_opc;
854 } disc_information;
855
856 typedef struct {
857 __be16 track_information_length;
858 __u8 track_lsb;
859 __u8 session_lsb;
860 __u8 reserved1;
861 #if defined(__BIG_ENDIAN_BITFIELD)
862 __u8 reserved2 : 2;
863 __u8 damage : 1;
864 __u8 copy : 1;
865 __u8 track_mode : 4;
866 __u8 rt : 1;
867 __u8 blank : 1;
868 __u8 packet : 1;
869 __u8 fp : 1;
870 __u8 data_mode : 4;
871 __u8 reserved3 : 6;
872 __u8 lra_v : 1;
873 __u8 nwa_v : 1;
874 #elif defined(__LITTLE_ENDIAN_BITFIELD)
875 __u8 track_mode : 4;
876 __u8 copy : 1;
877 __u8 damage : 1;
878 __u8 reserved2 : 2;
879 __u8 data_mode : 4;
880 __u8 fp : 1;
881 __u8 packet : 1;
882 __u8 blank : 1;
883 __u8 rt : 1;
884 __u8 nwa_v : 1;
885 __u8 lra_v : 1;
886 __u8 reserved3 : 6;
887 #endif
888 __be32 track_start;
889 __be32 next_writable;
890 __be32 free_blocks;
891 __be32 fixed_packet_size;
892 __be32 track_size;
893 __be32 last_rec_address;
894 } track_information;
895
896 struct feature_header {
897 __u32 data_len;
898 __u8 reserved1;
899 __u8 reserved2;
900 __u16 curr_profile;
901 };
902
903 struct mode_page_header {
904 __be16 mode_data_length;
905 __u8 medium_type;
906 __u8 reserved1;
907 __u8 reserved2;
908 __u8 reserved3;
909 __be16 desc_length;
910 };
911
912
913 struct rm_feature_desc {
914 __be16 feature_code;
915 #if defined(__BIG_ENDIAN_BITFIELD)
916 __u8 reserved1:2;
917 __u8 feature_version:4;
918 __u8 persistent:1;
919 __u8 curr:1;
920 #elif defined(__LITTLE_ENDIAN_BITFIELD)
921 __u8 curr:1;
922 __u8 persistent:1;
923 __u8 feature_version:4;
924 __u8 reserved1:2;
925 #endif
926 __u8 add_len;
927 #if defined(__BIG_ENDIAN_BITFIELD)
928 __u8 mech_type:3;
929 __u8 load:1;
930 __u8 eject:1;
931 __u8 pvnt_jmpr:1;
932 __u8 dbml:1;
933 __u8 lock:1;
934 #elif defined(__LITTLE_ENDIAN_BITFIELD)
935 __u8 lock:1;
936 __u8 dbml:1;
937 __u8 pvnt_jmpr:1;
938 __u8 eject:1;
939 __u8 load:1;
940 __u8 mech_type:3;
941 #endif
942 __u8 reserved2;
943 __u8 reserved3;
944 __u8 reserved4;
945 };
946
947 #endif