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