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 _SCSI_SCSI_H
20 #define _SCSI_SCSI_H
21 #include <linux/types.h>
22 #define TEST_UNIT_READY 0x00
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define REZERO_UNIT 0x01
25 #define REQUEST_SENSE 0x03
26 #define FORMAT_UNIT 0x04
27 #define READ_BLOCK_LIMITS 0x05
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define REASSIGN_BLOCKS 0x07
30 #define INITIALIZE_ELEMENT_STATUS 0x07
31 #define READ_6 0x08
32 #define WRITE_6 0x0a
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define SEEK_6 0x0b
35 #define READ_REVERSE 0x0f
36 #define WRITE_FILEMARKS 0x10
37 #define SPACE 0x11
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define INQUIRY 0x12
40 #define RECOVER_BUFFERED_DATA 0x14
41 #define MODE_SELECT 0x15
42 #define RESERVE 0x16
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define RELEASE 0x17
45 #define COPY 0x18
46 #define ERASE 0x19
47 #define MODE_SENSE 0x1a
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define START_STOP 0x1b
50 #define RECEIVE_DIAGNOSTIC 0x1c
51 #define SEND_DIAGNOSTIC 0x1d
52 #define ALLOW_MEDIUM_REMOVAL 0x1e
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define READ_FORMAT_CAPACITIES 0x23
55 #define SET_WINDOW 0x24
56 #define READ_CAPACITY 0x25
57 #define READ_10 0x28
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define WRITE_10 0x2a
60 #define SEEK_10 0x2b
61 #define POSITION_TO_ELEMENT 0x2b
62 #define WRITE_VERIFY 0x2e
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define VERIFY 0x2f
65 #define SEARCH_HIGH 0x30
66 #define SEARCH_EQUAL 0x31
67 #define SEARCH_LOW 0x32
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define SET_LIMITS 0x33
70 #define PRE_FETCH 0x34
71 #define READ_POSITION 0x34
72 #define SYNCHRONIZE_CACHE 0x35
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define LOCK_UNLOCK_CACHE 0x36
75 #define READ_DEFECT_DATA 0x37
76 #define MEDIUM_SCAN 0x38
77 #define COMPARE 0x39
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define COPY_VERIFY 0x3a
80 #define WRITE_BUFFER 0x3b
81 #define READ_BUFFER 0x3c
82 #define UPDATE_BLOCK 0x3d
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define READ_LONG 0x3e
85 #define WRITE_LONG 0x3f
86 #define CHANGE_DEFINITION 0x40
87 #define WRITE_SAME 0x41
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define UNMAP 0x42
90 #define READ_TOC 0x43
91 #define READ_HEADER 0x44
92 #define GET_EVENT_STATUS_NOTIFICATION 0x4a
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define LOG_SELECT 0x4c
95 #define LOG_SENSE 0x4d
96 #define XDWRITEREAD_10 0x53
97 #define MODE_SELECT_10 0x55
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define RESERVE_10 0x56
100 #define RELEASE_10 0x57
101 #define MODE_SENSE_10 0x5a
102 #define PERSISTENT_RESERVE_IN 0x5e
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define PERSISTENT_RESERVE_OUT 0x5f
105 #define VARIABLE_LENGTH_CMD 0x7f
106 #define REPORT_LUNS 0xa0
107 #define SECURITY_PROTOCOL_IN 0xa2
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define MAINTENANCE_IN 0xa3
110 #define MAINTENANCE_OUT 0xa4
111 #define MOVE_MEDIUM 0xa5
112 #define EXCHANGE_MEDIUM 0xa6
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define READ_12 0xa8
115 #define WRITE_12 0xaa
116 #define READ_MEDIA_SERIAL_NUMBER 0xab
117 #define WRITE_VERIFY_12 0xae
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #define VERIFY_12 0xaf
120 #define SEARCH_HIGH_12 0xb0
121 #define SEARCH_EQUAL_12 0xb1
122 #define SEARCH_LOW_12 0xb2
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define SECURITY_PROTOCOL_OUT 0xb5
125 #define READ_ELEMENT_STATUS 0xb8
126 #define SEND_VOLUME_TAG 0xb6
127 #define WRITE_LONG_2 0xea
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define EXTENDED_COPY 0x83
130 #define RECEIVE_COPY_RESULTS 0x84
131 #define ACCESS_CONTROL_IN 0x86
132 #define ACCESS_CONTROL_OUT 0x87
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define READ_16 0x88
135 #define COMPARE_AND_WRITE 0x89
136 #define WRITE_16 0x8a
137 #define READ_ATTRIBUTE 0x8c
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 #define WRITE_ATTRIBUTE 0x8d
140 #define VERIFY_16 0x8f
141 #define SYNCHRONIZE_CACHE_16 0x91
142 #define WRITE_SAME_16 0x93
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 #define SERVICE_ACTION_IN 0x9e
145 #define GOOD 0x00
146 #define CHECK_CONDITION 0x01
147 #define CONDITION_GOOD 0x02
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 #define BUSY 0x04
150 #define INTERMEDIATE_GOOD 0x08
151 #define INTERMEDIATE_C_GOOD 0x0a
152 #define RESERVATION_CONFLICT 0x0c
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #define COMMAND_TERMINATED 0x11
155 #define QUEUE_FULL 0x14
156 #define ACA_ACTIVE 0x18
157 #define TASK_ABORTED 0x20
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define STATUS_MASK 0xfe
160 #define NO_SENSE 0x00
161 #define RECOVERED_ERROR 0x01
162 #define NOT_READY 0x02
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define MEDIUM_ERROR 0x03
165 #define HARDWARE_ERROR 0x04
166 #define ILLEGAL_REQUEST 0x05
167 #define UNIT_ATTENTION 0x06
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 #define DATA_PROTECT 0x07
170 #define BLANK_CHECK 0x08
171 #define COPY_ABORTED 0x0a
172 #define ABORTED_COMMAND 0x0b
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 #define VOLUME_OVERFLOW 0x0d
175 #define MISCOMPARE 0x0e
176 #define TYPE_DISK 0x00
177 #define TYPE_TAPE 0x01
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 #define TYPE_PRINTER 0x02
180 #define TYPE_PROCESSOR 0x03
181 #define TYPE_WORM 0x04
182 #define TYPE_ROM 0x05
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 #define TYPE_SCANNER 0x06
185 #define TYPE_MOD 0x07
186 #define TYPE_MEDIUM_CHANGER 0x08
187 #define TYPE_COMM 0x09
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 #define TYPE_RAID 0x0c
190 #define TYPE_ENCLOSURE 0x0d
191 #define TYPE_RBC 0x0e
192 #define TYPE_OSD 0x11
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 #define TYPE_ZBC 0x14
195 #define TYPE_WLUN 0x1e
196 #define TYPE_NO_LUN 0x7f
197 struct ccs_modesel_head {
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   __u8 _r1;
200   __u8 medium;
201   __u8 _r2;
202   __u8 block_desc_length;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204   __u8 density;
205   __u8 number_blocks_hi;
206   __u8 number_blocks_med;
207   __u8 number_blocks_lo;
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209   __u8 _r3;
210   __u8 block_length_hi;
211   __u8 block_length_med;
212   __u8 block_length_lo;
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 };
215 #define COMMAND_COMPLETE 0x00
216 #define EXTENDED_MESSAGE 0x01
217 #define EXTENDED_MODIFY_DATA_POINTER 0x00
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define EXTENDED_SDTR 0x01
220 #define EXTENDED_EXTENDED_IDENTIFY 0x02
221 #define EXTENDED_WDTR 0x03
222 #define EXTENDED_PPR 0x04
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define EXTENDED_MODIFY_BIDI_DATA_PTR 0x05
225 #define SAVE_POINTERS 0x02
226 #define RESTORE_POINTERS 0x03
227 #define DISCONNECT 0x04
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define INITIATOR_ERROR 0x05
230 #define ABORT_TASK_SET 0x06
231 #define MESSAGE_REJECT 0x07
232 #define NOP 0x08
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define MSG_PARITY_ERROR 0x09
235 #define LINKED_CMD_COMPLETE 0x0a
236 #define LINKED_FLG_CMD_COMPLETE 0x0b
237 #define TARGET_RESET 0x0c
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 #define ABORT_TASK 0x0d
240 #define CLEAR_TASK_SET 0x0e
241 #define INITIATE_RECOVERY 0x0f
242 #define RELEASE_RECOVERY 0x10
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 #define CLEAR_ACA 0x16
245 #define LOGICAL_UNIT_RESET 0x17
246 #define SIMPLE_QUEUE_TAG 0x20
247 #define HEAD_OF_QUEUE_TAG 0x21
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 #define ORDERED_QUEUE_TAG 0x22
250 #define IGNORE_WIDE_RESIDUE 0x23
251 #define ACA 0x24
252 #define QAS_REQUEST 0x55
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 #define BUS_DEVICE_RESET TARGET_RESET
255 #define ABORT ABORT_TASK_SET
256 #define SCSI_IOCTL_GET_IDLUN 0x5382
257 #define SCSI_IOCTL_PROBE_HOST 0x5385
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
260 #define SCSI_IOCTL_GET_PCI 0x5387
261 #endif
262