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