blob: d4d082a2898d208ff93d2543c898943f276253ef [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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
Tao Baod7db5942015-01-28 10:07:51 -080082struct cdrom_msf0 {
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __u8 minute;
85 __u8 second;
86 __u8 frame;
Ben Cheng655a7c02013-10-16 16:09:24 -070087};
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089union cdrom_addr {
90 struct cdrom_msf0 msf;
91 int lba;
Ben Cheng655a7c02013-10-16 16:09:24 -070092};
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094struct 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 */
104struct 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};
111struct cdrom_tochdr {
112 __u8 cdth_trk0;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 __u8 cdth_trk1;
115};
116struct 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 */
124struct 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};
136struct 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};
146struct 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};
152struct 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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159};
Tao Baod7db5942015-01-28 10:07:51 -0800160struct 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};
166struct cdrom_mcn {
167 __u8 medium_catalog_number[14];
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169};
Tao Baod7db5942015-01-28 10:07:51 -0800170struct cdrom_blk {
171 unsigned from;
172 unsigned short len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700174};
175#define CDROM_PACKET_SIZE 12
176#define CGC_DATA_UNKNOWN 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define CGC_DATA_WRITE 1
Tao Baod7db5942015-01-28 10:07:51 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700179#define CGC_DATA_READ 2
180#define CGC_DATA_NONE 3
Tao Baod7db5942015-01-28 10:07:51 -0800181struct cdrom_generic_command {
182 unsigned char cmd[CDROM_PACKET_SIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 unsigned char __user * buffer;
185 unsigned int buflen;
186 int stat;
187 struct request_sense __user * sense;
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800189 unsigned char data_direction;
190 int quiet;
191 int timeout;
192 void __user * reserved[1];
Ben Cheng655a7c02013-10-16 16:09:24 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700194};
195#define CD_MINS 74
Ben Cheng655a7c02013-10-16 16:09:24 -0700196#define CD_SECS 60
197#define CD_FRAMES 75
Tao Baod7db5942015-01-28 10:07:51 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700199#define CD_SYNC_SIZE 12
200#define CD_MSF_OFFSET 150
Ben Cheng655a7c02013-10-16 16:09:24 -0700201#define CD_CHUNK_SIZE 24
202#define CD_NUM_OF_CHUNKS 98
Tao Baod7db5942015-01-28 10:07:51 -0800203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700204#define CD_FRAMESIZE_SUB 96
205#define CD_HEAD_SIZE 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700206#define CD_SUBHEAD_SIZE 8
207#define CD_EDC_SIZE 4
Tao Baod7db5942015-01-28 10:07:51 -0800208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700209#define CD_ZERO_SIZE 8
210#define CD_ECC_SIZE 276
Ben Cheng655a7c02013-10-16 16:09:24 -0700211#define CD_FRAMESIZE 2048
212#define CD_FRAMESIZE_RAW 2352
Tao Baod7db5942015-01-28 10:07:51 -0800213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700214#define CD_FRAMESIZE_RAWER 2646
Tao Baod7db5942015-01-28 10:07:51 -0800215#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)
Ben Cheng655a7c02013-10-16 16:09:24 -0700218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800219#define CD_XA_TAIL (CD_EDC_SIZE + CD_ECC_SIZE)
220#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE + CD_XA_HEAD)
Ben Cheng655a7c02013-10-16 16:09:24 -0700221#define CDROM_LBA 0x01
222#define CDROM_MSF 0x02
Tao Baod7db5942015-01-28 10:07:51 -0800223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700224#define CDROM_DATA_TRACK 0x04
225#define CDROM_LEADOUT 0xAA
Ben Cheng655a7c02013-10-16 16:09:24 -0700226#define CDROM_AUDIO_INVALID 0x00
227#define CDROM_AUDIO_PLAY 0x11
Tao Baod7db5942015-01-28 10:07:51 -0800228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700229#define CDROM_AUDIO_PAUSED 0x12
230#define CDROM_AUDIO_COMPLETED 0x13
Ben Cheng655a7c02013-10-16 16:09:24 -0700231#define CDROM_AUDIO_ERROR 0x14
232#define CDROM_AUDIO_NO_STATUS 0x15
Tao Baod7db5942015-01-28 10:07:51 -0800233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700234#define CDC_CLOSE_TRAY 0x1
235#define CDC_OPEN_TRAY 0x2
Ben Cheng655a7c02013-10-16 16:09:24 -0700236#define CDC_LOCK 0x4
237#define CDC_SELECT_SPEED 0x8
Tao Baod7db5942015-01-28 10:07:51 -0800238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700239#define CDC_SELECT_DISC 0x10
240#define CDC_MULTI_SESSION 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -0700241#define CDC_MCN 0x40
242#define CDC_MEDIA_CHANGED 0x80
Tao Baod7db5942015-01-28 10:07:51 -0800243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700244#define CDC_PLAY_AUDIO 0x100
245#define CDC_RESET 0x200
Ben Cheng655a7c02013-10-16 16:09:24 -0700246#define CDC_DRIVE_STATUS 0x800
247#define CDC_GENERIC_PACKET 0x1000
Tao Baod7db5942015-01-28 10:07:51 -0800248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700249#define CDC_CD_R 0x2000
250#define CDC_CD_RW 0x4000
Ben Cheng655a7c02013-10-16 16:09:24 -0700251#define CDC_DVD 0x8000
252#define CDC_DVD_R 0x10000
Tao Baod7db5942015-01-28 10:07:51 -0800253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700254#define CDC_DVD_RAM 0x20000
255#define CDC_MO_DRIVE 0x40000
Ben Cheng655a7c02013-10-16 16:09:24 -0700256#define CDC_MRW 0x80000
257#define CDC_MRW_W 0x100000
Tao Baod7db5942015-01-28 10:07:51 -0800258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700259#define CDC_RAM 0x200000
260#define CDS_NO_INFO 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700261#define CDS_NO_DISC 1
262#define CDS_TRAY_OPEN 2
Tao Baod7db5942015-01-28 10:07:51 -0800263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700264#define CDS_DRIVE_NOT_READY 3
265#define CDS_DISC_OK 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700266#define CDS_AUDIO 100
267#define CDS_DATA_1 101
Tao Baod7db5942015-01-28 10:07:51 -0800268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700269#define CDS_DATA_2 102
270#define CDS_XA_2_1 103
Ben Cheng655a7c02013-10-16 16:09:24 -0700271#define CDS_XA_2_2 104
272#define CDS_MIXED 105
Tao Baod7db5942015-01-28 10:07:51 -0800273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700274#define CDO_AUTO_CLOSE 0x1
275#define CDO_AUTO_EJECT 0x2
Ben Cheng655a7c02013-10-16 16:09:24 -0700276#define CDO_USE_FFLAGS 0x4
277#define CDO_LOCK 0x8
Ben Cheng655a7c02013-10-16 16:09:24 -0700278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800279#define CDO_CHECK_TYPE 0x10
280#define CDSL_NONE (INT_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700281#define CDSL_CURRENT INT_MAX
282#define CD_PART_MAX 64
Tao Baod7db5942015-01-28 10:07:51 -0800283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700284#define CD_PART_MASK (CD_PART_MAX - 1)
285#define GPCMD_BLANK 0xa1
Ben Cheng655a7c02013-10-16 16:09:24 -0700286#define GPCMD_CLOSE_TRACK 0x5b
287#define GPCMD_FLUSH_CACHE 0x35
Tao Baod7db5942015-01-28 10:07:51 -0800288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700289#define GPCMD_FORMAT_UNIT 0x04
290#define GPCMD_GET_CONFIGURATION 0x46
Ben Cheng655a7c02013-10-16 16:09:24 -0700291#define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
292#define GPCMD_GET_PERFORMANCE 0xac
Tao Baod7db5942015-01-28 10:07:51 -0800293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700294#define GPCMD_INQUIRY 0x12
295#define GPCMD_LOAD_UNLOAD 0xa6
Ben Cheng655a7c02013-10-16 16:09:24 -0700296#define GPCMD_MECHANISM_STATUS 0xbd
297#define GPCMD_MODE_SELECT_10 0x55
Tao Baod7db5942015-01-28 10:07:51 -0800298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700299#define GPCMD_MODE_SENSE_10 0x5a
300#define GPCMD_PAUSE_RESUME 0x4b
Ben Cheng655a7c02013-10-16 16:09:24 -0700301#define GPCMD_PLAY_AUDIO_10 0x45
302#define GPCMD_PLAY_AUDIO_MSF 0x47
Tao Baod7db5942015-01-28 10:07:51 -0800303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700304#define GPCMD_PLAY_AUDIO_TI 0x48
305#define GPCMD_PLAY_CD 0xbc
Ben Cheng655a7c02013-10-16 16:09:24 -0700306#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
307#define GPCMD_READ_10 0x28
Tao Baod7db5942015-01-28 10:07:51 -0800308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700309#define GPCMD_READ_12 0xa8
310#define GPCMD_READ_BUFFER 0x3c
Ben Cheng655a7c02013-10-16 16:09:24 -0700311#define GPCMD_READ_BUFFER_CAPACITY 0x5c
312#define GPCMD_READ_CDVD_CAPACITY 0x25
Tao Baod7db5942015-01-28 10:07:51 -0800313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700314#define GPCMD_READ_CD 0xbe
315#define GPCMD_READ_CD_MSF 0xb9
Ben Cheng655a7c02013-10-16 16:09:24 -0700316#define GPCMD_READ_DISC_INFO 0x51
317#define GPCMD_READ_DVD_STRUCTURE 0xad
Tao Baod7db5942015-01-28 10:07:51 -0800318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700319#define GPCMD_READ_FORMAT_CAPACITIES 0x23
320#define GPCMD_READ_HEADER 0x44
Ben Cheng655a7c02013-10-16 16:09:24 -0700321#define GPCMD_READ_TRACK_RZONE_INFO 0x52
322#define GPCMD_READ_SUBCHANNEL 0x42
Tao Baod7db5942015-01-28 10:07:51 -0800323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700324#define GPCMD_READ_TOC_PMA_ATIP 0x43
325#define GPCMD_REPAIR_RZONE_TRACK 0x58
Ben Cheng655a7c02013-10-16 16:09:24 -0700326#define GPCMD_REPORT_KEY 0xa4
327#define GPCMD_REQUEST_SENSE 0x03
Tao Baod7db5942015-01-28 10:07:51 -0800328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700329#define GPCMD_RESERVE_RZONE_TRACK 0x53
330#define GPCMD_SEND_CUE_SHEET 0x5d
Ben Cheng655a7c02013-10-16 16:09:24 -0700331#define GPCMD_SCAN 0xba
332#define GPCMD_SEEK 0x2b
Tao Baod7db5942015-01-28 10:07:51 -0800333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700334#define GPCMD_SEND_DVD_STRUCTURE 0xbf
335#define GPCMD_SEND_EVENT 0xa2
Ben Cheng655a7c02013-10-16 16:09:24 -0700336#define GPCMD_SEND_KEY 0xa3
337#define GPCMD_SEND_OPC 0x54
Tao Baod7db5942015-01-28 10:07:51 -0800338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700339#define GPCMD_SET_READ_AHEAD 0xa7
340#define GPCMD_SET_STREAMING 0xb6
Ben Cheng655a7c02013-10-16 16:09:24 -0700341#define GPCMD_START_STOP_UNIT 0x1b
342#define GPCMD_STOP_PLAY_SCAN 0x4e
Tao Baod7db5942015-01-28 10:07:51 -0800343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700344#define GPCMD_TEST_UNIT_READY 0x00
345#define GPCMD_VERIFY_10 0x2f
Ben Cheng655a7c02013-10-16 16:09:24 -0700346#define GPCMD_WRITE_10 0x2a
347#define GPCMD_WRITE_12 0xaa
Tao Baod7db5942015-01-28 10:07:51 -0800348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700349#define GPCMD_WRITE_AND_VERIFY_10 0x2e
350#define GPCMD_WRITE_BUFFER 0x3b
Ben Cheng655a7c02013-10-16 16:09:24 -0700351#define GPCMD_SET_SPEED 0xbb
352#define GPCMD_PLAYAUDIO_TI 0x48
Tao Baod7db5942015-01-28 10:07:51 -0800353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700354#define GPCMD_GET_MEDIA_STATUS 0xda
355#define GPMODE_VENDOR_PAGE 0x00
Ben Cheng655a7c02013-10-16 16:09:24 -0700356#define GPMODE_R_W_ERROR_PAGE 0x01
357#define GPMODE_WRITE_PARMS_PAGE 0x05
Tao Baod7db5942015-01-28 10:07:51 -0800358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700359#define GPMODE_WCACHING_PAGE 0x08
360#define GPMODE_AUDIO_CTL_PAGE 0x0e
Ben Cheng655a7c02013-10-16 16:09:24 -0700361#define GPMODE_POWER_PAGE 0x1a
362#define GPMODE_FAULT_FAIL_PAGE 0x1c
Tao Baod7db5942015-01-28 10:07:51 -0800363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700364#define GPMODE_TO_PROTECT_PAGE 0x1d
365#define GPMODE_CAPABILITIES_PAGE 0x2a
Ben Cheng655a7c02013-10-16 16:09:24 -0700366#define GPMODE_ALL_PAGES 0x3f
367#define GPMODE_CDROM_PAGE 0x0d
Tao Baod7db5942015-01-28 10:07:51 -0800368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700369#define DVD_STRUCT_PHYSICAL 0x00
370#define DVD_STRUCT_COPYRIGHT 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700371#define DVD_STRUCT_DISCKEY 0x02
372#define DVD_STRUCT_BCA 0x03
Tao Baod7db5942015-01-28 10:07:51 -0800373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700374#define DVD_STRUCT_MANUFACT 0x04
375struct dvd_layer {
Tao Baod7db5942015-01-28 10:07:51 -0800376 __u8 book_version : 4;
377 __u8 book_type : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800379 __u8 min_rate : 4;
380 __u8 disc_size : 4;
381 __u8 layer_type : 4;
382 __u8 track_path : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800384 __u8 nlayers : 2;
385 __u8 track_density : 4;
386 __u8 linear_density : 4;
387 __u8 bca : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800389 __u32 start_sector;
390 __u32 end_sector;
391 __u32 end_sector_l0;
Ben Cheng655a7c02013-10-16 16:09:24 -0700392};
Tao Baod7db5942015-01-28 10:07:51 -0800393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700394#define DVD_LAYERS 4
395struct dvd_physical {
Tao Baod7db5942015-01-28 10:07:51 -0800396 __u8 type;
397 __u8 layer_num;
Ben Cheng655a7c02013-10-16 16:09:24 -0700398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800399 struct dvd_layer layer[DVD_LAYERS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700400};
Ben Cheng655a7c02013-10-16 16:09:24 -0700401struct dvd_copyright {
Tao Baod7db5942015-01-28 10:07:51 -0800402 __u8 type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800404 __u8 layer_num;
405 __u8 cpst;
406 __u8 rmi;
Ben Cheng655a7c02013-10-16 16:09:24 -0700407};
Ben Cheng655a7c02013-10-16 16:09:24 -0700408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800409struct 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 */
Ben Cheng655a7c02013-10-16 16:09:24 -0700414};
415struct dvd_bca {
Tao Baod7db5942015-01-28 10:07:51 -0800416 __u8 type;
417 int len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700418/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800419 __u8 value[188];
Ben Cheng655a7c02013-10-16 16:09:24 -0700420};
Ben Cheng655a7c02013-10-16 16:09:24 -0700421struct dvd_manufact {
Tao Baod7db5942015-01-28 10:07:51 -0800422 __u8 type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700423/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800424 __u8 layer_num;
425 int len;
426 __u8 value[2048];
Ben Cheng655a7c02013-10-16 16:09:24 -0700427};
Tao Baod7db5942015-01-28 10:07:51 -0800428/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700429typedef union {
Tao Baod7db5942015-01-28 10:07:51 -0800430 __u8 type;
431 struct dvd_physical physical;
432 struct dvd_copyright copyright;
Ben Cheng655a7c02013-10-16 16:09:24 -0700433/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800434 struct dvd_disckey disckey;
435 struct dvd_bca bca;
436 struct dvd_manufact manufact;
Ben Cheng655a7c02013-10-16 16:09:24 -0700437} dvd_struct;
Tao Baod7db5942015-01-28 10:07:51 -0800438/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700439#define DVD_LU_SEND_AGID 0
440#define DVD_HOST_SEND_CHALLENGE 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700441#define DVD_LU_SEND_KEY1 2
442#define DVD_LU_SEND_CHALLENGE 3
Tao Baod7db5942015-01-28 10:07:51 -0800443/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700444#define DVD_HOST_SEND_KEY2 4
445#define DVD_AUTH_ESTABLISHED 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700446#define DVD_AUTH_FAILURE 6
447#define DVD_LU_SEND_TITLE_KEY 7
Tao Baod7db5942015-01-28 10:07:51 -0800448/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700449#define DVD_LU_SEND_ASF 8
450#define DVD_INVALIDATE_AGID 9
Ben Cheng655a7c02013-10-16 16:09:24 -0700451#define DVD_LU_SEND_RPC_STATE 10
452#define DVD_HOST_SEND_RPC_STATE 11
Tao Baod7db5942015-01-28 10:07:51 -0800453/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700454typedef __u8 dvd_key[5];
455typedef __u8 dvd_challenge[10];
Ben Cheng655a7c02013-10-16 16:09:24 -0700456struct dvd_lu_send_agid {
Tao Baod7db5942015-01-28 10:07:51 -0800457 __u8 type;
458/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
459 unsigned agid : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700460};
Ben Cheng655a7c02013-10-16 16:09:24 -0700461struct dvd_host_send_challenge {
Tao Baod7db5942015-01-28 10:07:51 -0800462 __u8 type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700463/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800464 unsigned agid : 2;
465 dvd_challenge chal;
Ben Cheng655a7c02013-10-16 16:09:24 -0700466};
467struct dvd_send_key {
Ben Cheng655a7c02013-10-16 16:09:24 -0700468/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800469 __u8 type;
470 unsigned agid : 2;
471 dvd_key key;
Ben Cheng655a7c02013-10-16 16:09:24 -0700472};
Ben Cheng655a7c02013-10-16 16:09:24 -0700473/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800474struct 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 */
Ben Cheng655a7c02013-10-16 16:09:24 -0700479};
480#define DVD_CPM_NO_COPYRIGHT 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700481#define DVD_CPM_COPYRIGHTED 1
482#define DVD_CP_SEC_NONE 0
Tao Baod7db5942015-01-28 10:07:51 -0800483/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700484#define DVD_CP_SEC_EXIST 1
485#define DVD_CGMS_UNRESTRICTED 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700486#define DVD_CGMS_SINGLE 2
487#define DVD_CGMS_RESTRICTED 3
Tao Baod7db5942015-01-28 10:07:51 -0800488/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700489struct dvd_lu_send_title_key {
Tao Baod7db5942015-01-28 10:07:51 -0800490 __u8 type;
491 unsigned agid : 2;
492 dvd_key title_key;
Ben Cheng655a7c02013-10-16 16:09:24 -0700493/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800494 int lba;
495 unsigned cpm : 1;
496 unsigned cp_sec : 1;
497 unsigned cgms : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700498/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700499};
500struct dvd_lu_send_asf {
Tao Baod7db5942015-01-28 10:07:51 -0800501 __u8 type;
502 unsigned agid : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700503/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800504 unsigned asf : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700505};
Ben Cheng655a7c02013-10-16 16:09:24 -0700506struct dvd_host_send_rpcstate {
Tao Baod7db5942015-01-28 10:07:51 -0800507 __u8 type;
508/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
509 __u8 pdrc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700510};
Ben Cheng655a7c02013-10-16 16:09:24 -0700511struct dvd_lu_send_rpcstate {
Tao Baod7db5942015-01-28 10:07:51 -0800512 __u8 type : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700513/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800514 __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 */
Ben Cheng655a7c02013-10-16 16:09:24 -0700519};
520typedef union {
Tao Baod7db5942015-01-28 10:07:51 -0800521 __u8 type;
522 struct dvd_lu_send_agid lsa;
Ben Cheng655a7c02013-10-16 16:09:24 -0700523/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800524 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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700528/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800529 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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700533/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700534} dvd_authinfo;
535struct request_sense {
Ben Cheng655a7c02013-10-16 16:09:24 -0700536#ifdef __BIG_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -0800537 __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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700552#elif defined(__LITTLE_ENDIAN_BITFIELD)
553/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800554 __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 */
Ben Cheng655a7c02013-10-16 16:09:24 -0700559#endif
Tao Baod7db5942015-01-28 10:07:51 -0800560 __u8 information[4];
561 __u8 add_sense_len;
562 __u8 command_info[4];
Ben Cheng655a7c02013-10-16 16:09:24 -0700563/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800564 __u8 asc;
565 __u8 ascq;
566 __u8 fruc;
567 __u8 sks[3];
Ben Cheng655a7c02013-10-16 16:09:24 -0700568/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800569 __u8 asb[46];
Ben Cheng655a7c02013-10-16 16:09:24 -0700570};
Ben Cheng655a7c02013-10-16 16:09:24 -0700571#define CDF_RWRT 0x0020
572#define CDF_HWDM 0x0024
Tao Baod7db5942015-01-28 10:07:51 -0800573/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700574#define CDF_MRW 0x0028
575#define CDM_MRW_NOTMRW 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700576#define CDM_MRW_BGFORMAT_INACTIVE 1
577#define CDM_MRW_BGFORMAT_ACTIVE 2
Tao Baod7db5942015-01-28 10:07:51 -0800578/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700579#define CDM_MRW_BGFORMAT_COMPLETE 3
580#define MRW_LBA_DMA 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700581#define MRW_LBA_GAA 1
582#define MRW_MODE_PC_PRE1 0x2c
Tao Baod7db5942015-01-28 10:07:51 -0800583/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700584#define MRW_MODE_PC 0x03
585struct mrw_feature_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800586 __be16 feature_code;
Ben Cheng655a7c02013-10-16 16:09:24 -0700587#ifdef __BIG_ENDIAN_BITFIELD
Ben Cheng655a7c02013-10-16 16:09:24 -0700588/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800589 __u8 reserved1 : 2;
590 __u8 feature_version : 4;
591 __u8 persistent : 1;
592 __u8 curr : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700593/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
594#elif defined(__LITTLE_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -0800595 __u8 curr : 1;
596 __u8 persistent : 1;
597 __u8 feature_version : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700598/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800599 __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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700615};
Ben Cheng655a7c02013-10-16 16:09:24 -0700616struct rwrt_feature_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800617 __be16 feature_code;
618/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700619#ifdef __BIG_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -0800620 __u8 reserved1 : 2;
621 __u8 feature_version : 4;
622 __u8 persistent : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700623/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800624 __u8 curr : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700625#elif defined(__LITTLE_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -0800626 __u8 curr : 1;
627 __u8 persistent : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700628/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800629 __u8 feature_version : 4;
630 __u8 reserved1 : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700631#endif
Tao Baod7db5942015-01-28 10:07:51 -0800632 __u8 add_len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700633/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800634 __u32 last_lba;
635 __u32 block_size;
636 __u16 blocking;
Ben Cheng655a7c02013-10-16 16:09:24 -0700637#ifdef __BIG_ENDIAN_BITFIELD
Ben Cheng655a7c02013-10-16 16:09:24 -0700638/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800639 __u8 reserved2 : 7;
640 __u8 page_present : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700641#elif defined(__LITTLE_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -0800642 __u8 page_present : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700643/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800644 __u8 reserved2 : 7;
645#endif
646 __u8 reserved3;
Ben Cheng655a7c02013-10-16 16:09:24 -0700647};
Tao Baod7db5942015-01-28 10:07:51 -0800648/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700649typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800650 __be16 disc_information_length;
Ben Cheng655a7c02013-10-16 16:09:24 -0700651#ifdef __BIG_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -0800652 __u8 reserved1 : 3;
Ben Cheng655a7c02013-10-16 16:09:24 -0700653/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800654 __u8 erasable : 1;
655 __u8 border_status : 2;
656 __u8 disc_status : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700657#elif defined(__LITTLE_ENDIAN_BITFIELD)
Ben Cheng655a7c02013-10-16 16:09:24 -0700658/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800659 __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 */
Ben Cheng655a7c02013-10-16 16:09:24 -0700664#else
665#error "Please fix <asm/byteorder.h>"
Ben Cheng655a7c02013-10-16 16:09:24 -0700666#endif
Tao Baod7db5942015-01-28 10:07:51 -0800667 __u8 n_first_track;
Ben Cheng655a7c02013-10-16 16:09:24 -0700668/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800669 __u8 n_sessions_lsb;
670 __u8 first_track_lsb;
671 __u8 last_track_lsb;
Ben Cheng655a7c02013-10-16 16:09:24 -0700672#ifdef __BIG_ENDIAN_BITFIELD
Ben Cheng655a7c02013-10-16 16:09:24 -0700673/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800674 __u8 did_v : 1;
675 __u8 dbc_v : 1;
676 __u8 uru : 1;
677 __u8 reserved2 : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700678/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800679 __u8 dbit : 1;
680 __u8 mrw_status : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700681#elif defined(__LITTLE_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -0800682 __u8 mrw_status : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700683/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800684 __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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700690#endif
Tao Baod7db5942015-01-28 10:07:51 -0800691 __u8 disc_type;
692 __u8 n_sessions_msb;
Ben Cheng655a7c02013-10-16 16:09:24 -0700693/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800694 __u8 first_track_msb;
695 __u8 last_track_msb;
696 __u32 disc_id;
697 __u32 lead_in;
Ben Cheng655a7c02013-10-16 16:09:24 -0700698/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800699 __u32 lead_out;
700 __u8 disc_bar_code[8];
701 __u8 reserved3;
702 __u8 n_opc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700703/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700704} disc_information;
705typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800706 __be16 track_information_length;
707 __u8 track_lsb;
Ben Cheng655a7c02013-10-16 16:09:24 -0700708/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800709 __u8 session_lsb;
710 __u8 reserved1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700711#ifdef __BIG_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -0800712 __u8 reserved2 : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700713/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800714 __u8 damage : 1;
715 __u8 copy : 1;
716 __u8 track_mode : 4;
717 __u8 rt : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700718/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800719 __u8 blank : 1;
720 __u8 packet : 1;
721 __u8 fp : 1;
722 __u8 data_mode : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700723/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800724 __u8 reserved3 : 6;
725 __u8 lra_v : 1;
726 __u8 nwa_v : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700727#elif defined(__LITTLE_ENDIAN_BITFIELD)
Ben Cheng655a7c02013-10-16 16:09:24 -0700728/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800729 __u8 track_mode : 4;
730 __u8 copy : 1;
731 __u8 damage : 1;
732 __u8 reserved2 : 2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700733/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800734 __u8 data_mode : 4;
735 __u8 fp : 1;
736 __u8 packet : 1;
737 __u8 blank : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700738/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800739 __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 */
Ben Cheng655a7c02013-10-16 16:09:24 -0700744#endif
Tao Baod7db5942015-01-28 10:07:51 -0800745 __be32 track_start;
746 __be32 next_writable;
747 __be32 free_blocks;
Ben Cheng655a7c02013-10-16 16:09:24 -0700748/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800749 __be32 fixed_packet_size;
750 __be32 track_size;
751 __be32 last_rec_address;
Ben Cheng655a7c02013-10-16 16:09:24 -0700752} track_information;
Tao Baod7db5942015-01-28 10:07:51 -0800753/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700754struct feature_header {
Tao Baod7db5942015-01-28 10:07:51 -0800755 __u32 data_len;
756 __u8 reserved1;
757 __u8 reserved2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700758/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800759 __u16 curr_profile;
Ben Cheng655a7c02013-10-16 16:09:24 -0700760};
Ben Cheng655a7c02013-10-16 16:09:24 -0700761struct mode_page_header {
Tao Baod7db5942015-01-28 10:07:51 -0800762 __be16 mode_data_length;
Ben Cheng655a7c02013-10-16 16:09:24 -0700763/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800764 __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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700770};
Ben Cheng655a7c02013-10-16 16:09:24 -0700771struct rm_feature_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800772 __be16 feature_code;
Ben Cheng655a7c02013-10-16 16:09:24 -0700773/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800774#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;
Ben Cheng655a7c02013-10-16 16:09:24 -0700797#elif defined(__LITTLE_ENDIAN_BITFIELD)
798/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800799 __u8 lock : 1;
800 __u8 dbml : 1;
801 __u8 pvnt_jmpr : 1;
802 __u8 eject : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700803/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800804 __u8 load : 1;
805 __u8 mech_type : 3;
Ben Cheng655a7c02013-10-16 16:09:24 -0700806#endif
Tao Baod7db5942015-01-28 10:07:51 -0800807 __u8 reserved2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700808/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800809 __u8 reserved3;
810 __u8 reserved4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700811};
812#endif
Tao Baod7db5942015-01-28 10:07:51 -0800813/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */