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