1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 *
25 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #ifndef _SYS_SCSI_GENERIC_COMMANDS_H
29 #define _SYS_SCSI_GENERIC_COMMANDS_H
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 /*
36 * Standard SCSI Command Definitions
37 *
38 * Macros to determine known command sizes
39 */
40 #define CDB_GROUPID(cmd) ((cmd >> 5) & 0x7)
41 #define CDB_GROUPID_0 0
42 #define CDB_GROUPID_1 1
43 #define CDB_GROUPID_2 2
44 #define CDB_GROUPID_3 3
45 #define CDB_GROUPID_4 4
46 #define CDB_GROUPID_5 5
47 #define CDB_GROUPID_6 6
48 #define CDB_GROUPID_7 7
49
50 #define CDB_GROUP0 6 /* 6-byte cdb's */
51 #define CDB_GROUP1 10 /* 10-byte cdb's */
52 #define CDB_GROUP2 10 /* 10-byte cdb's */
53 #define CDB_GROUP3 0 /* reserved */
54 #define CDB_GROUP4 16 /* 16-byte cdb's */
55 #define CDB_GROUP5 12 /* 12-byte cdb's */
56 #define CDB_GROUP6 0 /* reserved */
57 #define CDB_GROUP7 0 /* reserved */
58
59 /*
60 * Generic Command Definitions
61 * NOTE: CDROM commands are defined in cdio.h
62 */
63
64 /*
65 * Group 0 Commands (CDB range 0x00 - 0x1F)
66 */
67 #define SCMD_GROUP0 0x00
68
69 /*
70 * Group 0 commands, All Devices
71 */
72 #define SCMD_TEST_UNIT_READY 0x00
73 #define SCMD_REQUEST_SENSE 0x03
74 #define SCMD_INQUIRY 0x12
75 #define SCMD_COPY 0x18
76 #define SCMD_GDIAG 0x1C /* receive diagnostic results */
77 #define SCMD_SDIAG 0x1D /* send diagnostic results */
78
79 /*
80 * Group 0 commands, Direct Access Devices
81 */
82 /* SCMD_TEST_UNIT_READY 0x00 */
83 #define SCMD_REZERO_UNIT 0x01
84 /* SCMD_REQUEST_SENSE 0x03 */
85 #define SCMD_FORMAT 0x04
86 #define SCMD_REASSIGN_BLOCK 0x07
87 #define SCMD_READ 0x08
88 #define SCMD_WRITE 0x0a
89 #define SCMD_SEEK 0x0b
90 /* SCMD_INQUIRY 0x12 */
91 #define SCMD_MODE_SELECT 0x15
92 #define SCMD_RESERVE 0x16
93 #define SCMD_RELEASE 0x17
94 /* SCMD_COPY 0x18 */
95 #define SCMD_MODE_SENSE 0x1a
96 #define SCMD_START_STOP 0x1b
97 /* SCMD_GDIAG 0x1C */
98 /* SCMD_SDIAG 0x1D */
99 #define SCMD_DOORLOCK 0x1E /* Prevent/Allow Medium Removal */
100
101 /*
102 * Group 0 commands, Sequential Access Devices
103 */
104 /* SCMD_TEST_UNIT_READY 0x00 */
105 #define SCMD_REWIND 0x01 /* Note similarity to SCMD_REZERO */
106 /* SCMD_REQUEST_SENSE 0x03 */
107 #define SCMD_READ_BLKLIM 0x05
108 /* SCMD_READ 0x08 */
109 /* SCMD_WRITE 0x0a */
110 #define SCMD_TRK_SEL 0x0b /* Note similarity to SCMD_SEEK */
111 #define SCMD_READ_REVERSE 0x0f
112 #define SCMD_WRITE_FILE_MARK 0x10
113 #define SCMD_SPACE 0x11
114 /* SCMD_INQUIRY 0x12 */
115 #define SCMD_VERIFY_G0 0x13
116 #define SCMD_RECOVER_BUF 0x14
117 /* SCMD_MODE_SELECT 0x15 */
118 /* SCMD_RESERVE 0x16 */
119 /* SCMD_RELEASE 0x17 */
120 /* SCMD_COPY 0x18 */
121 #define SCMD_ERASE 0x19
122 /* SCMD_MODE_SENSE 0x1a */
123 #define SCMD_LOAD 0x1b /* Note similarity to SCMD_START_STOP */
124 /* SCMD_GDIAG 0x1c */
125 /* SCMD_SDIAG 0x1d */
126 /* SCMD_DOORLOCK 0x1e */
127
128
129 /*
130 * Group 0 commands, Printer Devices
131 */
132 /* SCMD_TEST_UNIT_READY 0x00 */
133 /* SCMD_REQUEST_SENSE 0x03 */
134 /* SCMD_FORMAT 0x04 */
135 #define SCMD_PRINT 0x0a /* Note similarity to SCMD_WRITE */
136 #define SCMD_SLEW_PRINT 0x0b /* ? similar to SCMD_SEEK ? */
137 #define SCMD_FLUSH_PRINT_BUF 0x10 /* ? similar to SCMD_WRITE_FILE_MARK */
138 /* SCMD_INQUIRY 0x12 */
139 /* SCMD_RECOVER_BUF 0x14 */
140 /* SCMD_MODE_SELECT 0x15 */
141 /* SCMD_RESERVE 0x16 */
142 /* SCMD_RELEASE 0x17 */
143 /* SCMD_COPY 0x18 */
144 /* SCMD_MODE_SENSE 0x1a */
145 #define SCMD_STOP_PRINT 0x1b /* Note similarity to SCMD_START_STOP */
146 /* SCMD_GDIAG 0x1c */
147 /* SCMD_SDIAG 0x1d */
148
149 /*
150 * Group 0 commands, Processor Devices
151 */
152 /* SCMD_TEST_UNIT_READY 0x00 */
153 /* SCMD_REQUEST_SENSE 0x03 */
154 #define SCMD_RECEIVE 0x08 /* Note similarity to SCMD_READ */
155 #define SCMD_SEND 0x0a /* Note similarity to SCMD_WRITE */
156 /* SCMD_INQUIRY 0x12 */
157 /* SCMD_COPY 0x18 */
158 /* SCMD_MODE_SENSE 0x1a */
159 /* SCMD_GDIAG 0x1c */
160 /* SCMD_SDIAG 0x1d */
161
162 /*
163 * Group 0 commands, WORM Devices
164 */
165 /* SCMD_TEST_UNIT_READY 0x00 */
166 /* SCMD_REZERO_UNIT 0x01 */
167 /* SCMD_REQUEST_SENSE 0x03 */
168 /* SCMD_REASSIGN_BLOCK 0x07 */
169 /* SCMD_READ 0x08 */
170 /* SCMD_WRITE 0x0a */
171 /* SCMD_SEEK 0x0b */
172 /* SCMD_INQUIRY 0x12 */
173 /* SCMD_MODE_SELECT 0x15 */
174 /* SCMD_RESERVE 0x16 */
175 /* SCMD_RELEASE 0x17 */
176 /* SCMD_COPY 0x18 */
177 /* SCMD_MODE_SENSE 0x1a */
178 /* SCMD_START_STOP 0x1b */
179 /* SCMD_GDIAG 0x1C */
180 /* SCMD_SDIAG 0x1D */
181 /* SCMD_DOORLOCK 0x1E */
182
183 /*
184 * Group 0 commands, Read Only Devices
185 */
186 /* SCMD_TEST_UNIT_READY 0x00 */
187 /* SCMD_REZERO_UNIT 0x01 */
188 /* SCMD_REQUEST_SENSE 0x03 */
189 /* SCMD_REASSIGN_BLOCK 0x07 */
190 /* SCMD_READ 0x08 */
191 /* SCMD_SEEK 0x0b */
192 /* SCMD_INQUIRY 0x12 */
193 /* SCMD_MODE_SELECT 0x15 */
194 /* SCMD_RESERVE 0x16 */
195 /* SCMD_RELEASE 0x17 */
196 /* SCMD_COPY 0x18 */
197 /* SCMD_MODE_SENSE 0x1a */
198 /* SCMD_START_STOP 0x1b */
199 /* SCMD_GDIAG 0x1C */
200 /* SCMD_SDIAG 0x1D */
201 /* SCMD_DOORLOCK 0x1E */
202
203 /*
204 * Group 1 Commands (CDB range 0x20 - 0x3F)
205 */
206 #define SCMD_GROUP1 0x20
207
208 /*
209 * Group 1 Commands, All Devices
210 */
211 #define SCMD_COMPARE 0x39
212 #define SCMD_COPY_VERIFY 0x3A
213 #define SCMD_PERSISTENT_RESERVE_IN 0x5E
214 #define SCMD_PERSISTENT_RESERVE_OUT 0x5F
215 #define SCMD_PRIN SCMD_PERSISTENT_RESERVE_IN
216 #define SCMD_PROUT SCMD_PERSISTENT_RESERVE_OUT
217
218 /*
219 * Group 1 Commands, Direct Access Devices
220 */
221 #define SCMD_READ_FORMAT_CAP 0x23
222 #define SCMD_READ_CAPACITY 0x25
223 #define SCMD_READ_G1 0x28 /* Note that only the group changed */
224 #define SCMD_WRITE_G1 0x2a /* Note that only the group changed */
225 #define SCMD_SEEK_G1 0x2b /* Note that only the group changed */
226 #define SCMD_WRITE_VERIFY 0x2e
227 #define SCMD_VERIFY 0x2f
228 #define SCMD_SEARCH_HIGH 0x30
229 #define SCMD_SEARCH_EQUAL 0x31
230 #define SCMD_SEARCH_LOW 0x32
231 #define SCMD_SET_LIMITS 0x33
232 #define SCMD_SYNCHRONIZE_CACHE 0x35
233 #define SCMD_READ_DEFECT_LIST 0x37
234 #define SCMD_WRITE_BUFFER 0x3B
235 #define SCMD_READ_BUFFER 0x3c
236 #define SCMD_READ_LONG 0x3E
237 #define SCMD_WRITE_LONG 0x3F
238 #define SCMD_WRITE_SAME_G1 0x41
239 #define SCMD_UNMAP 0x42
240 #define SCMD_GET_CONFIGURATION 0x46
241 #define SCMD_LOG_SELECT_G1 0x4c
242 #define SCMD_LOG_SENSE_G1 0x4d
243 #define SCMD_RESERVE_G1 0x56
244 #define SCMD_RELEASE_G1 0x57
245 #define SCMD_MODE_SELECT_G1 0x55
246 #define SCMD_MODE_SENSE_G1 0x5A
247
248
249 /*
250 * Group 1 Commands, Sequential Access Devices
251 */
252 #define SCMD_LOCATE 0x2B /* Note similarity to SCMD_SEEK_G1 */
253 #define SCMD_READ_POSITION 0x34
254 #define SCMD_REPORT_DENSITIES 0x44
255
256 /*
257 * Group 1 Commands, Printer Devices
258 */
259 /* (None Defined) */
260
261 /*
262 * Group 1 Commands, Processor Devices
263 */
264 /* (None Defined) */
265
266 /*
267 * Group 1 Commands, WORM Devices
268 */
269 /* SCMD_READ_CAPACITY 0x25 */
270 /* SCMD_READ_G1 0x28 */
271 /* SCMD_WRITE_G1 0x2a */
272 /* SCMD_SEEK_G1 0x2b */
273 /* SCMD_WRITE_VERIFY 0x2e */
274 /* SCMD_VERIFY 0x2f */
275 /* SCMD_SEARCH_HIGH 0x30 */
276 /* SCMD_SEARCH_EQUAL 0x31 */
277 /* SCMD_SEARCH_LOW 0x32 */
278 /* SCMD_SET_LIMITS 0x33 */
279
280 /*
281 * Group 1 Commands, Read Only Devices
282 */
283 /* SCMD_READ_CAPACITY 0x25 */
284 /* SCMD_READ_G1 0x28 */
285 /* SCMD_SEEK_G1 0x2b */
286 /* SCMD_VERIFY 0x2f */
287 /* SCMD_SEARCH_HIGH 0x30 */
288 /* SCMD_SEARCH_EQUAL 0x31 */
289 /* SCMD_SEARCH_LOW 0x32 */
290 /* SCMD_SET_LIMITS 0x33 */
291
292 /*
293 * Group 1 Commands, MMC Devices
294 */
295
296 /* GET EVENT STATUS NOTIFICATION, MMC-3 5.6 */
297 #define SCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
298
299 /* event header */
300 #define SD_GESN_HEADER_LEN 4
301 #define SD_GESN_HEADER_NEA 0x80 /* byte 2 */
302 #define SD_GESN_HEADER_CLASS 0x07 /* byte 2 */
303
304 /* media class event class and event data that follows the header */
305 #define SD_GESN_MEDIA_CLASS 4
306
307 #define SD_GESN_MEDIA_DATA_LEN 4
308 #define SD_GESN_MEDIA_EVENT_CODE 0x0f /* byte 0 */
309 #define SD_GESN_MEDIA_EVENT_STATUS_PRESENT 0x02 /* byte 1 */
310 #define SD_GESN_MEDIA_EVENT_STATUS_TRAY_OPEN 0x01 /* byte 1 */
311
312 /* media event code */
313 #define SD_GESN_MEDIA_EVENT_NOCHG 0
314 #define SD_GESN_MEDIA_EVENT_EJECTREQUEST 1
315 #define SD_GESN_MEDIA_EVENT_NEWMEDIA 2
316 #define SD_GESN_MEDIA_EVENT_MEDIAREMOVAL 3
317 #define SD_GESN_MEDIA_EVENT_MEDIACHANGED 4
318 #define SD_GESN_MEDIA_EVENT_BGFORMATCOMPLETED 5
319 #define SD_GESN_MEDIA_EVENT_BGFORMATRESTARTED 6
320
321
322 /*
323 * Group 3 Commands
324 */
325 #define SCMD_VAR_LEN 0x7f
326
327 /*
328 * Group 4 Commands, All Devices
329 */
330 #define SCMD_GROUP4 0x80
331 #define SCMD_EXTENDED_COPY 0x83
332 #define SCMD_VERIFY_G4 0x8f
333
334 /*
335 * Group 4 Commands, Direct Access Devices
336 */
337 #define SCMD_READ_G4 0x88
338 #define SCMD_WRITE_G4 0x8a
339 #define SCMD_WRITE_VERIFY_G4 0x8e
340 #define SCMD_WRITE_SAME_G4 0x93
341 #define SCMD_SVC_ACTION_IN_G4 0x9e
342 #define SCMD_SVC_ACTION_OUT_G4 0x9f
343
344 /*
345 * Group 4 Service Actions for Service Action In (16)
346 */
347 #define SSVC_ACTION_READ_CAPACITY_G4 0x10
348 #define SSVC_ACTION_READ_LONG_G4 0x11
349
350 /*
351 * Group 4 Service Actions for Service Action Out (16)
352 */
353 #define SSVC_ACTION_WRITE_LONG_G4 0x11
354
355 /*
356 * Group 4 Commands, Sequential Access Devics
357 */
358 #define SCMD_WRITE_FILE_MARK_G4 0x80
359 #define SCMD_READ_REVERSE_G4 0x81
360 #define SCMD_READ_ATTRIBUTE 0x8c
361 #define SCMD_WRITE_ATTRIBUTE 0x8d
362 #define SCMD_SPACE_G4 0x91
363 #define SCMD_LOCATE_G4 0x92
364
365 /*
366 * Group 5 commands.
367 */
368 #define SCMD_GROUP5 0xA0
369 #define SCMD_REPORT_LUNS 0xA0
370 #define SCMD_SECURITY_PROTO_IN 0xA2
371 #define SCMD_MAINTENANCE_IN 0xA3
372 #define SCMD_MAINTENANCE_OUT 0xA4
373 #define SCMD_READ_G5 0xA8
374 #define SCMD_WRITE_G5 0xAA
375 #define SCMD_SVC_ACTION_OUT_G5 0xA9
376 #define SCMD_SVC_ACTION_IN_G5 0xAB
377 #define SCMD_GET_PERFORMANCE 0xAC
378 #define SCMD_WRITE_VERIFY_G5 0xAE
379 #define SCMD_VERIFY_G5 0xAF
380 #define SCMD_SECURITY_PROTO_OUT 0xB5
381
382 /*
383 * Group 5 Service Actions for Maintenance In (12)
384 */
385 #define SSVC_ACTION_GET_TARGET_PORT_GROUPS 0x0a
386 #define SSVC_ACTION_GET_SUPPORTED_OPERATIONS 0x0c
387 #define SSVC_SCTION_GET_SUPPORTED_MANAGEMENT 0x0d
388 #define SSVC_ACTION_GET_TIMESTAMP 0x0f
389
390 /*
391 * Group 5 Service Actions for Maintenance Out (12)
392 */
393 #define SSVC_ACTION_SET_DEVICE_IDENTIFIER 0x06
394 #define SSVC_ACTION_SET_PRIORITY 0x0e
395 #define SSVC_ACTION_SET_TARGET_PORT_GROUPS 0x0a
396 #define SSVC_ACTION_SET_TIMESTAMP 0x0f
397
398 /*
399 * Group 5 Service Actions for Service Action In (12)
400 */
401 #define SSVC_ACTION_READ_MEDIA_SERIAL 0x01
402 /*
403 * scsi_key_strings for SCMD_ definitions
404 * NOTE: see SCSI_CMDS_KEY_STRINGS_CDIO in cdio.h for additional
405 * command-to-string translations.
406 */
407 #define SCSI_CMDS_KEY_STRINGS \
408 /* 0x00 */ SCMD_TEST_UNIT_READY, "test_unit_ready", \
409 /* 0x01 */ SCMD_REWIND | \
410 SCMD_REZERO_UNIT, "rezero/rewind", \
411 /* 0x03 */ SCMD_REQUEST_SENSE, "request_sense", \
412 /* 0x04 */ SCMD_FORMAT, "format", \
413 /* 0x05 */ SCMD_READ_BLKLIM, "read_block_limits", \
414 /* 0x07 */ SCMD_REASSIGN_BLOCK, "reassign", \
415 /* 0x08 */ SCMD_READ | \
416 SCMD_RECEIVE, "read", \
417 /* 0x0a */ SCMD_PRINT | \
418 SCMD_SEND | \
419 SCMD_WRITE, "write", \
420 /* 0x0b */ SCMD_SEEK | \
421 SCMD_SLEW_PRINT | \
422 SCMD_TRK_SEL, "seek", \
423 /* 0x0f */ SCMD_READ_REVERSE, "read_reverse", \
424 /* 0x10 */ SCMD_WRITE_FILE_MARK | \
425 SCMD_FLUSH_PRINT_BUF, "write_file_mark", \
426 /* 0x11 */ SCMD_SPACE, "space", \
427 /* 0x12 */ SCMD_INQUIRY, "inquiry", \
428 /* 0x13 */ SCMD_VERIFY_G0, "verify", \
429 /* 0x14 */ SCMD_RECOVER_BUF, "recover_buffer_data", \
430 /* 0x15 */ SCMD_MODE_SELECT, "mode_select", \
431 /* 0x16 */ SCMD_RESERVE, "reserve", \
432 /* 0x17 */ SCMD_RELEASE, "release", \
433 /* 0x18 */ SCMD_COPY, "copy", \
434 /* 0x19 */ SCMD_ERASE, "erase_tape", \
435 /* 0x1a */ SCMD_MODE_SENSE, "mode_sense", \
436 /* 0x1b */ SCMD_LOAD | \
437 SCMD_START_STOP | \
438 SCMD_STOP_PRINT, "load/start/stop", \
439 /* 0x1c */ SCMD_GDIAG, "get_diagnostic_results", \
440 /* 0x1d */ SCMD_SDIAG, "send_diagnostic_command", \
441 /* 0x1e */ SCMD_DOORLOCK, "door_lock", \
442 /* 0x23 */ SCMD_READ_FORMAT_CAP, "read_format_capacity", \
443 /* 0x25 */ SCMD_READ_CAPACITY, "read_capacity", \
444 /* 0x28 */ SCMD_READ_G1, "read(10)", \
445 /* 0x2a */ SCMD_WRITE_G1, "write(10)", \
446 /* 0x2b */ SCMD_SEEK_G1 | \
447 SCMD_LOCATE, "seek(10)", \
448 /* 0x2e */ SCMD_WRITE_VERIFY, "write_verify", \
449 /* 0x2f */ SCMD_VERIFY, "verify(10)", \
450 /* 0x30 */ SCMD_SEARCH_HIGH, "search_data_high", \
451 /* 0x31 */ SCMD_SEARCH_EQUAL, "search_data_equal", \
452 /* 0x32 */ SCMD_SEARCH_LOW, "search_data_low", \
453 /* 0x33 */ SCMD_SET_LIMITS, "set_limits", \
454 /* 0x34 */ SCMD_READ_POSITION, "read_position", \
455 /* 0x35 */ SCMD_SYNCHRONIZE_CACHE, "synchronize_cache", \
456 /* 0x37 */ SCMD_READ_DEFECT_LIST, "read_defect_data", \
457 /* 0x39 */ SCMD_COMPARE, "compare", \
458 /* 0x3a */ SCMD_COPY_VERIFY, "copy_verify", \
459 /* 0x3b */ SCMD_WRITE_BUFFER, "write_buffer", \
460 /* 0x3c */ SCMD_READ_BUFFER, "read_buffer", \
461 /* 0x3e */ SCMD_READ_LONG, "read_long", \
462 /* 0x3f */ SCMD_WRITE_LONG, "write_long", \
463 /* 0x41 */ SCMD_WRITE_SAME_G1, "write_same(10)", \
464 /* 0x42 */ SCMD_UNMAP, "unmap", \
465 /* 0x44 */ SCMD_REPORT_DENSITIES | \
466 /* SCMD_READ_HEADER (from cdio.h) | */ \
467 0, "report_densities/read_header", \
468 /* 0x46 */ SCMD_GET_CONFIGURATION, "get_configuration", \
469 /* 0x4c */ SCMD_LOG_SELECT_G1, "log_select", \
470 /* 0x4d */ SCMD_LOG_SENSE_G1, "log_sense", \
471 /* 0x55 */ SCMD_MODE_SELECT_G1, "mode_select(10)", \
472 /* 0x56 */ SCMD_RESERVE_G1, "reserve(10)", \
473 /* 0x57 */ SCMD_RELEASE_G1, "release(10)", \
474 /* 0x5a */ SCMD_MODE_SENSE_G1, "mode_sense(10)", \
475 /* 0x5e */ SCMD_PERSISTENT_RESERVE_IN, "persistent_reserve_in", \
476 /* 0x5f */ SCMD_PERSISTENT_RESERVE_OUT, "persistent_reserve_out", \
477 /* 0x80 */ SCMD_WRITE_FILE_MARK_G4, "write_file_mark(16)", \
478 /* 0x81 */ SCMD_READ_REVERSE_G4, "read_reverse(16)", \
479 /* 0x83 */ SCMD_EXTENDED_COPY, "extended_copy", \
480 /* 0x88 */ SCMD_READ_G4, "read(16)", \
481 /* 0x8a */ SCMD_WRITE_G4, "write(16)", \
482 /* 0x8c */ SCMD_READ_ATTRIBUTE, "read_attribute", \
483 /* 0x8d */ SCMD_WRITE_ATTRIBUTE, "write_attribute", \
484 /* 0x8e */ SCMD_WRITE_VERIFY_G4, "write_verify(16)", \
485 /* 0x8f */ SCMD_VERIFY_G4, "verify(16)", \
486 /* 0x91 */ SCMD_SPACE_G4, "space(16)", \
487 /* 0x92 */ SCMD_LOCATE_G4, "locate(16)", \
488 /* 0x92 */ SCMD_WRITE_SAME_G4, "write_same(16)", \
489 /* 0x9e */ SCMD_SVC_ACTION_IN_G4, "service_action_in(16)", \
490 /* 0x9f */ SCMD_SVC_ACTION_OUT_G4, "service_action_out(16)", \
491 /* 0xa0 */ SCMD_REPORT_LUNS, "report_luns", \
492 /* 0xa2 */ SCMD_SECURITY_PROTO_IN, "security_protocol_in", \
493 /* 0xa3 */ SCMD_MAINTENANCE_IN, "maintenance_in", \
494 /* 0xa4 */ SCMD_MAINTENANCE_OUT, "maintenance_out", \
495 /* 0xa8 */ SCMD_READ_G5, "read(12)", \
496 /* 0xa9 */ SCMD_SVC_ACTION_OUT_G5, "service_action_out(12)", \
497 /* 0xaa */ SCMD_WRITE_G5, "write(12)", \
498 /* 0xab */ SCMD_SVC_ACTION_IN_G5, "service_action_in(12)", \
499 /* 0xac */ SCMD_GET_PERFORMANCE, "get_performance", \
500 /* 0xAE */ SCMD_WRITE_VERIFY_G5, "write_verify(12)", \
501 /* 0xAF */ SCMD_VERIFY_G5, "verify(12)", \
502 /* 0xb5 */ SCMD_SECURITY_PROTO_OUT, "security_protocol_out" \
503 /* see cdio.h for additional command-to-string translations */
504
505 /* XXX not a command code, does not belong here */
506 #define ATAPI_CAPABILITIES 0x2A
507
508 #ifdef __cplusplus
509 }
510 #endif
511
512 /*
513 * Below are inclusions of files describing various command structures
514 * of interest.
515 */
516 #include <sys/scsi/generic/inquiry.h>
517 #include <sys/scsi/generic/sense.h>
518
519 /*
520 * Private Vendor Unique Commands - Each implementation provides this.
521 */
522 #include <sys/scsi/impl/commands.h>
523
524 #endif /* _SYS_SCSI_GENERIC_COMMANDS_H */