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