1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_CDROM_H
8 #define _UAPI_LINUX_CDROM_H
9 #include <linux/types.h>
10 #include <asm/byteorder.h>
11 #define EDRIVE_CANT_DO_THIS EOPNOTSUPP
12 #define CDROMPAUSE 0x5301
13 #define CDROMRESUME 0x5302
14 #define CDROMPLAYMSF 0x5303
15 #define CDROMPLAYTRKIND 0x5304
16 #define CDROMREADTOCHDR 0x5305
17 #define CDROMREADTOCENTRY 0x5306
18 #define CDROMSTOP 0x5307
19 #define CDROMSTART 0x5308
20 #define CDROMEJECT 0x5309
21 #define CDROMVOLCTRL 0x530a
22 #define CDROMSUBCHNL 0x530b
23 #define CDROMREADMODE2 0x530c
24 #define CDROMREADMODE1 0x530d
25 #define CDROMREADAUDIO 0x530e
26 #define CDROMEJECT_SW 0x530f
27 #define CDROMMULTISESSION 0x5310
28 #define CDROM_GET_MCN 0x5311
29 #define CDROM_GET_UPC CDROM_GET_MCN
30 #define CDROMRESET 0x5312
31 #define CDROMVOLREAD 0x5313
32 #define CDROMREADRAW 0x5314
33 #define CDROMREADCOOKED 0x5315
34 #define CDROMSEEK 0x5316
35 #define CDROMPLAYBLK 0x5317
36 #define CDROMREADALL 0x5318
37 #define CDROMGETSPINDOWN 0x531d
38 #define CDROMSETSPINDOWN 0x531e
39 #define CDROMCLOSETRAY 0x5319
40 #define CDROM_SET_OPTIONS 0x5320
41 #define CDROM_CLEAR_OPTIONS 0x5321
42 #define CDROM_SELECT_SPEED 0x5322
43 #define CDROM_SELECT_DISC 0x5323
44 #define CDROM_MEDIA_CHANGED 0x5325
45 #define CDROM_DRIVE_STATUS 0x5326
46 #define CDROM_DISC_STATUS 0x5327
47 #define CDROM_CHANGER_NSLOTS 0x5328
48 #define CDROM_LOCKDOOR 0x5329
49 #define CDROM_DEBUG 0x5330
50 #define CDROM_GET_CAPABILITY 0x5331
51 #define CDROMAUDIOBUFSIZ 0x5382
52 #define DVD_READ_STRUCT 0x5390
53 #define DVD_WRITE_STRUCT 0x5391
54 #define DVD_AUTH 0x5392
55 #define CDROM_SEND_PACKET 0x5393
56 #define CDROM_NEXT_WRITABLE 0x5394
57 #define CDROM_LAST_WRITTEN 0x5395
58 #define CDROM_TIMED_MEDIA_CHANGE 0x5396
59 struct cdrom_msf0 {
60   __u8 minute;
61   __u8 second;
62   __u8 frame;
63 };
64 union cdrom_addr {
65   struct cdrom_msf0 msf;
66   int lba;
67 };
68 struct cdrom_msf {
69   __u8 cdmsf_min0;
70   __u8 cdmsf_sec0;
71   __u8 cdmsf_frame0;
72   __u8 cdmsf_min1;
73   __u8 cdmsf_sec1;
74   __u8 cdmsf_frame1;
75 };
76 struct cdrom_ti {
77   __u8 cdti_trk0;
78   __u8 cdti_ind0;
79   __u8 cdti_trk1;
80   __u8 cdti_ind1;
81 };
82 struct cdrom_tochdr {
83   __u8 cdth_trk0;
84   __u8 cdth_trk1;
85 };
86 struct cdrom_volctrl {
87   __u8 channel0;
88   __u8 channel1;
89   __u8 channel2;
90   __u8 channel3;
91 };
92 struct cdrom_subchnl {
93   __u8 cdsc_format;
94   __u8 cdsc_audiostatus;
95   __u8 cdsc_adr : 4;
96   __u8 cdsc_ctrl : 4;
97   __u8 cdsc_trk;
98   __u8 cdsc_ind;
99   union cdrom_addr cdsc_absaddr;
100   union cdrom_addr cdsc_reladdr;
101 };
102 struct cdrom_tocentry {
103   __u8 cdte_track;
104   __u8 cdte_adr : 4;
105   __u8 cdte_ctrl : 4;
106   __u8 cdte_format;
107   union cdrom_addr cdte_addr;
108   __u8 cdte_datamode;
109 };
110 struct cdrom_read {
111   int cdread_lba;
112   char * cdread_bufaddr;
113   int cdread_buflen;
114 };
115 struct cdrom_read_audio {
116   union cdrom_addr addr;
117   __u8 addr_format;
118   int nframes;
119   __u8  * buf;
120 };
121 struct cdrom_multisession {
122   union cdrom_addr addr;
123   __u8 xa_flag;
124   __u8 addr_format;
125 };
126 struct cdrom_mcn {
127   __u8 medium_catalog_number[14];
128 };
129 struct cdrom_blk {
130   unsigned from;
131   unsigned short len;
132 };
133 #define CDROM_PACKET_SIZE 12
134 #define CGC_DATA_UNKNOWN 0
135 #define CGC_DATA_WRITE 1
136 #define CGC_DATA_READ 2
137 #define CGC_DATA_NONE 3
138 struct cdrom_generic_command {
139   unsigned char cmd[CDROM_PACKET_SIZE];
140   unsigned char  * buffer;
141   unsigned int buflen;
142   int stat;
143   struct request_sense  * sense;
144   unsigned char data_direction;
145   int quiet;
146   int timeout;
147   union {
148     void  * reserved[1];
149     void  * unused;
150   };
151 };
152 struct cdrom_timed_media_change_info {
153   __s64 last_media_change;
154   __u64 media_flags;
155 };
156 #define MEDIA_CHANGED_FLAG 0x1
157 #define CD_MINS 74
158 #define CD_SECS 60
159 #define CD_FRAMES 75
160 #define CD_SYNC_SIZE 12
161 #define CD_MSF_OFFSET 150
162 #define CD_CHUNK_SIZE 24
163 #define CD_NUM_OF_CHUNKS 98
164 #define CD_FRAMESIZE_SUB 96
165 #define CD_HEAD_SIZE 4
166 #define CD_SUBHEAD_SIZE 8
167 #define CD_EDC_SIZE 4
168 #define CD_ZERO_SIZE 8
169 #define CD_ECC_SIZE 276
170 #define CD_FRAMESIZE 2048
171 #define CD_FRAMESIZE_RAW 2352
172 #define CD_FRAMESIZE_RAWER 2646
173 #define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW - CD_SYNC_SIZE)
174 #define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW - CD_SYNC_SIZE - CD_HEAD_SIZE)
175 #define CD_XA_HEAD (CD_HEAD_SIZE + CD_SUBHEAD_SIZE)
176 #define CD_XA_TAIL (CD_EDC_SIZE + CD_ECC_SIZE)
177 #define CD_XA_SYNC_HEAD (CD_SYNC_SIZE + CD_XA_HEAD)
178 #define CDROM_LBA 0x01
179 #define CDROM_MSF 0x02
180 #define CDROM_DATA_TRACK 0x04
181 #define CDROM_LEADOUT 0xAA
182 #define CDROM_AUDIO_INVALID 0x00
183 #define CDROM_AUDIO_PLAY 0x11
184 #define CDROM_AUDIO_PAUSED 0x12
185 #define CDROM_AUDIO_COMPLETED 0x13
186 #define CDROM_AUDIO_ERROR 0x14
187 #define CDROM_AUDIO_NO_STATUS 0x15
188 #define CDC_CLOSE_TRAY 0x1
189 #define CDC_OPEN_TRAY 0x2
190 #define CDC_LOCK 0x4
191 #define CDC_SELECT_SPEED 0x8
192 #define CDC_SELECT_DISC 0x10
193 #define CDC_MULTI_SESSION 0x20
194 #define CDC_MCN 0x40
195 #define CDC_MEDIA_CHANGED 0x80
196 #define CDC_PLAY_AUDIO 0x100
197 #define CDC_RESET 0x200
198 #define CDC_DRIVE_STATUS 0x800
199 #define CDC_GENERIC_PACKET 0x1000
200 #define CDC_CD_R 0x2000
201 #define CDC_CD_RW 0x4000
202 #define CDC_DVD 0x8000
203 #define CDC_DVD_R 0x10000
204 #define CDC_DVD_RAM 0x20000
205 #define CDC_MO_DRIVE 0x40000
206 #define CDC_MRW 0x80000
207 #define CDC_MRW_W 0x100000
208 #define CDC_RAM 0x200000
209 #define CDS_NO_INFO 0
210 #define CDS_NO_DISC 1
211 #define CDS_TRAY_OPEN 2
212 #define CDS_DRIVE_NOT_READY 3
213 #define CDS_DISC_OK 4
214 #define CDS_AUDIO 100
215 #define CDS_DATA_1 101
216 #define CDS_DATA_2 102
217 #define CDS_XA_2_1 103
218 #define CDS_XA_2_2 104
219 #define CDS_MIXED 105
220 #define CDO_AUTO_CLOSE 0x1
221 #define CDO_AUTO_EJECT 0x2
222 #define CDO_USE_FFLAGS 0x4
223 #define CDO_LOCK 0x8
224 #define CDO_CHECK_TYPE 0x10
225 #define CDSL_NONE (INT_MAX - 1)
226 #define CDSL_CURRENT INT_MAX
227 #define CD_PART_MAX 64
228 #define CD_PART_MASK (CD_PART_MAX - 1)
229 #define GPCMD_BLANK 0xa1
230 #define GPCMD_CLOSE_TRACK 0x5b
231 #define GPCMD_FLUSH_CACHE 0x35
232 #define GPCMD_FORMAT_UNIT 0x04
233 #define GPCMD_GET_CONFIGURATION 0x46
234 #define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
235 #define GPCMD_GET_PERFORMANCE 0xac
236 #define GPCMD_INQUIRY 0x12
237 #define GPCMD_LOAD_UNLOAD 0xa6
238 #define GPCMD_MECHANISM_STATUS 0xbd
239 #define GPCMD_MODE_SELECT_10 0x55
240 #define GPCMD_MODE_SENSE_10 0x5a
241 #define GPCMD_PAUSE_RESUME 0x4b
242 #define GPCMD_PLAY_AUDIO_10 0x45
243 #define GPCMD_PLAY_AUDIO_MSF 0x47
244 #define GPCMD_PLAY_AUDIO_TI 0x48
245 #define GPCMD_PLAY_CD 0xbc
246 #define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
247 #define GPCMD_READ_10 0x28
248 #define GPCMD_READ_12 0xa8
249 #define GPCMD_READ_BUFFER 0x3c
250 #define GPCMD_READ_BUFFER_CAPACITY 0x5c
251 #define GPCMD_READ_CDVD_CAPACITY 0x25
252 #define GPCMD_READ_CD 0xbe
253 #define GPCMD_READ_CD_MSF 0xb9
254 #define GPCMD_READ_DISC_INFO 0x51
255 #define GPCMD_READ_DVD_STRUCTURE 0xad
256 #define GPCMD_READ_FORMAT_CAPACITIES 0x23
257 #define GPCMD_READ_HEADER 0x44
258 #define GPCMD_READ_TRACK_RZONE_INFO 0x52
259 #define GPCMD_READ_SUBCHANNEL 0x42
260 #define GPCMD_READ_TOC_PMA_ATIP 0x43
261 #define GPCMD_REPAIR_RZONE_TRACK 0x58
262 #define GPCMD_REPORT_KEY 0xa4
263 #define GPCMD_REQUEST_SENSE 0x03
264 #define GPCMD_RESERVE_RZONE_TRACK 0x53
265 #define GPCMD_SEND_CUE_SHEET 0x5d
266 #define GPCMD_SCAN 0xba
267 #define GPCMD_SEEK 0x2b
268 #define GPCMD_SEND_DVD_STRUCTURE 0xbf
269 #define GPCMD_SEND_EVENT 0xa2
270 #define GPCMD_SEND_KEY 0xa3
271 #define GPCMD_SEND_OPC 0x54
272 #define GPCMD_SET_READ_AHEAD 0xa7
273 #define GPCMD_SET_STREAMING 0xb6
274 #define GPCMD_START_STOP_UNIT 0x1b
275 #define GPCMD_STOP_PLAY_SCAN 0x4e
276 #define GPCMD_TEST_UNIT_READY 0x00
277 #define GPCMD_VERIFY_10 0x2f
278 #define GPCMD_WRITE_10 0x2a
279 #define GPCMD_WRITE_12 0xaa
280 #define GPCMD_WRITE_AND_VERIFY_10 0x2e
281 #define GPCMD_WRITE_BUFFER 0x3b
282 #define GPCMD_SET_SPEED 0xbb
283 #define GPCMD_PLAYAUDIO_TI 0x48
284 #define GPCMD_GET_MEDIA_STATUS 0xda
285 #define GPMODE_VENDOR_PAGE 0x00
286 #define GPMODE_R_W_ERROR_PAGE 0x01
287 #define GPMODE_WRITE_PARMS_PAGE 0x05
288 #define GPMODE_WCACHING_PAGE 0x08
289 #define GPMODE_AUDIO_CTL_PAGE 0x0e
290 #define GPMODE_POWER_PAGE 0x1a
291 #define GPMODE_FAULT_FAIL_PAGE 0x1c
292 #define GPMODE_TO_PROTECT_PAGE 0x1d
293 #define GPMODE_CAPABILITIES_PAGE 0x2a
294 #define GPMODE_ALL_PAGES 0x3f
295 #define GPMODE_CDROM_PAGE 0x0d
296 #define DVD_STRUCT_PHYSICAL 0x00
297 #define DVD_STRUCT_COPYRIGHT 0x01
298 #define DVD_STRUCT_DISCKEY 0x02
299 #define DVD_STRUCT_BCA 0x03
300 #define DVD_STRUCT_MANUFACT 0x04
301 struct dvd_layer {
302   __u8 book_version : 4;
303   __u8 book_type : 4;
304   __u8 min_rate : 4;
305   __u8 disc_size : 4;
306   __u8 layer_type : 4;
307   __u8 track_path : 1;
308   __u8 nlayers : 2;
309   __u8 track_density : 4;
310   __u8 linear_density : 4;
311   __u8 bca : 1;
312   __u32 start_sector;
313   __u32 end_sector;
314   __u32 end_sector_l0;
315 };
316 #define DVD_LAYERS 4
317 struct dvd_physical {
318   __u8 type;
319   __u8 layer_num;
320   struct dvd_layer layer[DVD_LAYERS];
321 };
322 struct dvd_copyright {
323   __u8 type;
324   __u8 layer_num;
325   __u8 cpst;
326   __u8 rmi;
327 };
328 struct dvd_disckey {
329   __u8 type;
330   unsigned agid : 2;
331   __u8 value[2048];
332 };
333 struct dvd_bca {
334   __u8 type;
335   int len;
336   __u8 value[188];
337 };
338 struct dvd_manufact {
339   __u8 type;
340   __u8 layer_num;
341   int len;
342   __u8 value[2048];
343 };
344 typedef union {
345   __u8 type;
346   struct dvd_physical physical;
347   struct dvd_copyright copyright;
348   struct dvd_disckey disckey;
349   struct dvd_bca bca;
350   struct dvd_manufact manufact;
351 } dvd_struct;
352 #define DVD_LU_SEND_AGID 0
353 #define DVD_HOST_SEND_CHALLENGE 1
354 #define DVD_LU_SEND_KEY1 2
355 #define DVD_LU_SEND_CHALLENGE 3
356 #define DVD_HOST_SEND_KEY2 4
357 #define DVD_AUTH_ESTABLISHED 5
358 #define DVD_AUTH_FAILURE 6
359 #define DVD_LU_SEND_TITLE_KEY 7
360 #define DVD_LU_SEND_ASF 8
361 #define DVD_INVALIDATE_AGID 9
362 #define DVD_LU_SEND_RPC_STATE 10
363 #define DVD_HOST_SEND_RPC_STATE 11
364 typedef __u8 dvd_key[5];
365 typedef __u8 dvd_challenge[10];
366 struct dvd_lu_send_agid {
367   __u8 type;
368   unsigned agid : 2;
369 };
370 struct dvd_host_send_challenge {
371   __u8 type;
372   unsigned agid : 2;
373   dvd_challenge chal;
374 };
375 struct dvd_send_key {
376   __u8 type;
377   unsigned agid : 2;
378   dvd_key key;
379 };
380 struct dvd_lu_send_challenge {
381   __u8 type;
382   unsigned agid : 2;
383   dvd_challenge chal;
384 };
385 #define DVD_CPM_NO_COPYRIGHT 0
386 #define DVD_CPM_COPYRIGHTED 1
387 #define DVD_CP_SEC_NONE 0
388 #define DVD_CP_SEC_EXIST 1
389 #define DVD_CGMS_UNRESTRICTED 0
390 #define DVD_CGMS_SINGLE 2
391 #define DVD_CGMS_RESTRICTED 3
392 struct dvd_lu_send_title_key {
393   __u8 type;
394   unsigned agid : 2;
395   dvd_key title_key;
396   int lba;
397   unsigned cpm : 1;
398   unsigned cp_sec : 1;
399   unsigned cgms : 2;
400 };
401 struct dvd_lu_send_asf {
402   __u8 type;
403   unsigned agid : 2;
404   unsigned asf : 1;
405 };
406 struct dvd_host_send_rpcstate {
407   __u8 type;
408   __u8 pdrc;
409 };
410 struct dvd_lu_send_rpcstate {
411   __u8 type : 2;
412   __u8 vra : 3;
413   __u8 ucca : 3;
414   __u8 region_mask;
415   __u8 rpc_scheme;
416 };
417 typedef union {
418   __u8 type;
419   struct dvd_lu_send_agid lsa;
420   struct dvd_host_send_challenge hsc;
421   struct dvd_send_key lsk;
422   struct dvd_lu_send_challenge lsc;
423   struct dvd_send_key hsk;
424   struct dvd_lu_send_title_key lstk;
425   struct dvd_lu_send_asf lsasf;
426   struct dvd_host_send_rpcstate hrpcs;
427   struct dvd_lu_send_rpcstate lrpcs;
428 } dvd_authinfo;
429 struct request_sense {
430 #ifdef __BIG_ENDIAN_BITFIELD
431   __u8 valid : 1;
432   __u8 error_code : 7;
433 #elif defined(__LITTLE_ENDIAN_BITFIELD)
434   __u8 error_code : 7;
435   __u8 valid : 1;
436 #endif
437   __u8 segment_number;
438 #ifdef __BIG_ENDIAN_BITFIELD
439   __u8 reserved1 : 2;
440   __u8 ili : 1;
441   __u8 reserved2 : 1;
442   __u8 sense_key : 4;
443 #elif defined(__LITTLE_ENDIAN_BITFIELD)
444   __u8 sense_key : 4;
445   __u8 reserved2 : 1;
446   __u8 ili : 1;
447   __u8 reserved1 : 2;
448 #endif
449   __u8 information[4];
450   __u8 add_sense_len;
451   __u8 command_info[4];
452   __u8 asc;
453   __u8 ascq;
454   __u8 fruc;
455   __u8 sks[3];
456   __u8 asb[46];
457 };
458 #define CDF_RWRT 0x0020
459 #define CDF_HWDM 0x0024
460 #define CDF_MRW 0x0028
461 #define CDM_MRW_NOTMRW 0
462 #define CDM_MRW_BGFORMAT_INACTIVE 1
463 #define CDM_MRW_BGFORMAT_ACTIVE 2
464 #define CDM_MRW_BGFORMAT_COMPLETE 3
465 #define MRW_LBA_DMA 0
466 #define MRW_LBA_GAA 1
467 #define MRW_MODE_PC_PRE1 0x2c
468 #define MRW_MODE_PC 0x03
469 struct mrw_feature_desc {
470   __be16 feature_code;
471 #ifdef __BIG_ENDIAN_BITFIELD
472   __u8 reserved1 : 2;
473   __u8 feature_version : 4;
474   __u8 persistent : 1;
475   __u8 curr : 1;
476 #elif defined(__LITTLE_ENDIAN_BITFIELD)
477   __u8 curr : 1;
478   __u8 persistent : 1;
479   __u8 feature_version : 4;
480   __u8 reserved1 : 2;
481 #endif
482   __u8 add_len;
483 #ifdef __BIG_ENDIAN_BITFIELD
484   __u8 reserved2 : 7;
485   __u8 write : 1;
486 #elif defined(__LITTLE_ENDIAN_BITFIELD)
487   __u8 write : 1;
488   __u8 reserved2 : 7;
489 #endif
490   __u8 reserved3;
491   __u8 reserved4;
492   __u8 reserved5;
493 };
494 struct rwrt_feature_desc {
495   __be16 feature_code;
496 #ifdef __BIG_ENDIAN_BITFIELD
497   __u8 reserved1 : 2;
498   __u8 feature_version : 4;
499   __u8 persistent : 1;
500   __u8 curr : 1;
501 #elif defined(__LITTLE_ENDIAN_BITFIELD)
502   __u8 curr : 1;
503   __u8 persistent : 1;
504   __u8 feature_version : 4;
505   __u8 reserved1 : 2;
506 #endif
507   __u8 add_len;
508   __u32 last_lba;
509   __u32 block_size;
510   __u16 blocking;
511 #ifdef __BIG_ENDIAN_BITFIELD
512   __u8 reserved2 : 7;
513   __u8 page_present : 1;
514 #elif defined(__LITTLE_ENDIAN_BITFIELD)
515   __u8 page_present : 1;
516   __u8 reserved2 : 7;
517 #endif
518   __u8 reserved3;
519 };
520 typedef struct {
521   __be16 disc_information_length;
522 #ifdef __BIG_ENDIAN_BITFIELD
523   __u8 reserved1 : 3;
524   __u8 erasable : 1;
525   __u8 border_status : 2;
526   __u8 disc_status : 2;
527 #elif defined(__LITTLE_ENDIAN_BITFIELD)
528   __u8 disc_status : 2;
529   __u8 border_status : 2;
530   __u8 erasable : 1;
531   __u8 reserved1 : 3;
532 #else
533 #error "Please fix <asm/byteorder.h>"
534 #endif
535   __u8 n_first_track;
536   __u8 n_sessions_lsb;
537   __u8 first_track_lsb;
538   __u8 last_track_lsb;
539 #ifdef __BIG_ENDIAN_BITFIELD
540   __u8 did_v : 1;
541   __u8 dbc_v : 1;
542   __u8 uru : 1;
543   __u8 reserved2 : 2;
544   __u8 dbit : 1;
545   __u8 mrw_status : 2;
546 #elif defined(__LITTLE_ENDIAN_BITFIELD)
547   __u8 mrw_status : 2;
548   __u8 dbit : 1;
549   __u8 reserved2 : 2;
550   __u8 uru : 1;
551   __u8 dbc_v : 1;
552   __u8 did_v : 1;
553 #endif
554   __u8 disc_type;
555   __u8 n_sessions_msb;
556   __u8 first_track_msb;
557   __u8 last_track_msb;
558   __u32 disc_id;
559   __u32 lead_in;
560   __u32 lead_out;
561   __u8 disc_bar_code[8];
562   __u8 reserved3;
563   __u8 n_opc;
564 } disc_information;
565 typedef struct {
566   __be16 track_information_length;
567   __u8 track_lsb;
568   __u8 session_lsb;
569   __u8 reserved1;
570 #ifdef __BIG_ENDIAN_BITFIELD
571   __u8 reserved2 : 2;
572   __u8 damage : 1;
573   __u8 copy : 1;
574   __u8 track_mode : 4;
575   __u8 rt : 1;
576   __u8 blank : 1;
577   __u8 packet : 1;
578   __u8 fp : 1;
579   __u8 data_mode : 4;
580   __u8 reserved3 : 6;
581   __u8 lra_v : 1;
582   __u8 nwa_v : 1;
583 #elif defined(__LITTLE_ENDIAN_BITFIELD)
584   __u8 track_mode : 4;
585   __u8 copy : 1;
586   __u8 damage : 1;
587   __u8 reserved2 : 2;
588   __u8 data_mode : 4;
589   __u8 fp : 1;
590   __u8 packet : 1;
591   __u8 blank : 1;
592   __u8 rt : 1;
593   __u8 nwa_v : 1;
594   __u8 lra_v : 1;
595   __u8 reserved3 : 6;
596 #endif
597   __be32 track_start;
598   __be32 next_writable;
599   __be32 free_blocks;
600   __be32 fixed_packet_size;
601   __be32 track_size;
602   __be32 last_rec_address;
603 } track_information;
604 struct feature_header {
605   __u32 data_len;
606   __u8 reserved1;
607   __u8 reserved2;
608   __u16 curr_profile;
609 };
610 struct mode_page_header {
611   __be16 mode_data_length;
612   __u8 medium_type;
613   __u8 reserved1;
614   __u8 reserved2;
615   __u8 reserved3;
616   __be16 desc_length;
617 };
618 struct rm_feature_desc {
619   __be16 feature_code;
620 #ifdef __BIG_ENDIAN_BITFIELD
621   __u8 reserved1 : 2;
622   __u8 feature_version : 4;
623   __u8 persistent : 1;
624   __u8 curr : 1;
625 #elif defined(__LITTLE_ENDIAN_BITFIELD)
626   __u8 curr : 1;
627   __u8 persistent : 1;
628   __u8 feature_version : 4;
629   __u8 reserved1 : 2;
630 #endif
631   __u8 add_len;
632 #ifdef __BIG_ENDIAN_BITFIELD
633   __u8 mech_type : 3;
634   __u8 load : 1;
635   __u8 eject : 1;
636   __u8 pvnt_jmpr : 1;
637   __u8 dbml : 1;
638   __u8 lock : 1;
639 #elif defined(__LITTLE_ENDIAN_BITFIELD)
640   __u8 lock : 1;
641   __u8 dbml : 1;
642   __u8 pvnt_jmpr : 1;
643   __u8 eject : 1;
644   __u8 load : 1;
645   __u8 mech_type : 3;
646 #endif
647   __u8 reserved2;
648   __u8 reserved3;
649   __u8 reserved4;
650 };
651 #endif
652