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