/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SYS_SCSI_GENERIC_COMMANDS_H
#define _SYS_SCSI_GENERIC_COMMANDS_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Standard SCSI Command Definitions
*
* Macros to determine known command sizes
*/
#define CDB_GROUPID_0 0
/*
* Generic Command Definitions
* NOTE: CDROM commands are defined in cdio.h
*/
/*
* Group 0 Commands (CDB range 0x00 - 0x1F)
*/
/*
* Group 0 commands, All Devices
*/
/*
* Group 0 commands, Direct Access Devices
*/
/* SCMD_TEST_UNIT_READY 0x00 */
/* SCMD_REQUEST_SENSE 0x03 */
/* SCMD_INQUIRY 0x12 */
/* SCMD_COPY 0x18 */
/* SCMD_GDIAG 0x1C */
/* SCMD_SDIAG 0x1D */
/*
* Group 0 commands, Sequential Access Devices
*/
/* SCMD_TEST_UNIT_READY 0x00 */
/* SCMD_REQUEST_SENSE 0x03 */
/* SCMD_READ 0x08 */
/* SCMD_WRITE 0x0a */
/* SCMD_INQUIRY 0x12 */
/* SCMD_MODE_SELECT 0x15 */
/* SCMD_RESERVE 0x16 */
/* SCMD_RELEASE 0x17 */
/* SCMD_COPY 0x18 */
/* SCMD_MODE_SENSE 0x1a */
/* SCMD_GDIAG 0x1c */
/* SCMD_SDIAG 0x1d */
/* SCMD_DOORLOCK 0x1e */
/*
* Group 0 commands, Printer Devices
*/
/* SCMD_TEST_UNIT_READY 0x00 */
/* SCMD_REQUEST_SENSE 0x03 */
/* SCMD_FORMAT 0x04 */
/* SCMD_INQUIRY 0x12 */
/* SCMD_RECOVER_BUF 0x14 */
/* SCMD_MODE_SELECT 0x15 */
/* SCMD_RESERVE 0x16 */
/* SCMD_RELEASE 0x17 */
/* SCMD_COPY 0x18 */
/* SCMD_MODE_SENSE 0x1a */
/* SCMD_GDIAG 0x1c */
/* SCMD_SDIAG 0x1d */
/*
* Group 0 commands, Processor Devices
*/
/* SCMD_TEST_UNIT_READY 0x00 */
/* SCMD_REQUEST_SENSE 0x03 */
/* SCMD_INQUIRY 0x12 */
/* SCMD_COPY 0x18 */
/* SCMD_MODE_SENSE 0x1a */
/* SCMD_GDIAG 0x1c */
/* SCMD_SDIAG 0x1d */
/*
* Group 0 commands, WORM Devices
*/
/* SCMD_TEST_UNIT_READY 0x00 */
/* SCMD_REZERO_UNIT 0x01 */
/* SCMD_REQUEST_SENSE 0x03 */
/* SCMD_REASSIGN_BLOCK 0x07 */
/* SCMD_READ 0x08 */
/* SCMD_WRITE 0x0a */
/* SCMD_SEEK 0x0b */
/* SCMD_INQUIRY 0x12 */
/* SCMD_MODE_SELECT 0x15 */
/* SCMD_RESERVE 0x16 */
/* SCMD_RELEASE 0x17 */
/* SCMD_COPY 0x18 */
/* SCMD_MODE_SENSE 0x1a */
/* SCMD_START_STOP 0x1b */
/* SCMD_GDIAG 0x1C */
/* SCMD_SDIAG 0x1D */
/* SCMD_DOORLOCK 0x1E */
/*
* Group 0 commands, Read Only Devices
*/
/* SCMD_TEST_UNIT_READY 0x00 */
/* SCMD_REZERO_UNIT 0x01 */
/* SCMD_REQUEST_SENSE 0x03 */
/* SCMD_REASSIGN_BLOCK 0x07 */
/* SCMD_READ 0x08 */
/* SCMD_SEEK 0x0b */
/* SCMD_INQUIRY 0x12 */
/* SCMD_MODE_SELECT 0x15 */
/* SCMD_RESERVE 0x16 */
/* SCMD_RELEASE 0x17 */
/* SCMD_COPY 0x18 */
/* SCMD_MODE_SENSE 0x1a */
/* SCMD_START_STOP 0x1b */
/* SCMD_GDIAG 0x1C */
/* SCMD_SDIAG 0x1D */
/* SCMD_DOORLOCK 0x1E */
/*
* Group 1 Commands (CDB range 0x20 - 0x3F)
*/
/*
* Group 1 Commands, All Devices
*/
/*
* Group 1 Commands, Direct Access Devices
*/
/*
* Group 1 Commands, Sequential Access Devices
*/
/*
* Group 1 Commands, Printer Devices
*/
/* (None Defined) */
/*
* Group 1 Commands, Processor Devices
*/
/* (None Defined) */
/*
* Group 1 Commands, WORM Devices
*/
/* SCMD_READ_CAPACITY 0x25 */
/* SCMD_READ_G1 0x28 */
/* SCMD_WRITE_G1 0x2a */
/* SCMD_SEEK_G1 0x2b */
/* SCMD_WRITE_VERIFY 0x2e */
/* SCMD_VERIFY 0x2f */
/* SCMD_SEARCH_HIGH 0x30 */
/* SCMD_SEARCH_EQUAL 0x31 */
/* SCMD_SEARCH_LOW 0x32 */
/* SCMD_SET_LIMITS 0x33 */
/*
* Group 1 Commands, Read Only Devices
*/
/* SCMD_READ_CAPACITY 0x25 */
/* SCMD_READ_G1 0x28 */
/* SCMD_SEEK_G1 0x2b */
/* SCMD_VERIFY 0x2f */
/* SCMD_SEARCH_HIGH 0x30 */
/* SCMD_SEARCH_EQUAL 0x31 */
/* SCMD_SEARCH_LOW 0x32 */
/* SCMD_SET_LIMITS 0x33 */
/*
* Group 1 Commands, MMC Devices
*/
/* GET EVENT STATUS NOTIFICATION, MMC-3 5.6 */
/* event header */
/* media class event class and event data that follows the header */
/* media event code */
#define SD_GESN_MEDIA_EVENT_NOCHG 0
/*
* Group 3 Commands
*/
/*
* Group 4 Commands, All Devices
*/
/*
* Group 4 Commands, Direct Access Devices
*/
/*
* Group 4 Service Actions for Service Action In (16)
*/
/*
* Group 4 Service Actions for Service Action Out (16)
*/
/*
* Group 4 Commands, Sequential Access Devics
*/
/*
* Group 5 commands.
*/
/*
* Group 5 Service Actions for Maintenance In (12)
*/
/*
* Group 5 Service Actions for Maintenance Out (12)
*/
/*
* Group 5 Service Actions for Service Action In (12)
*/
/*
* scsi_key_strings for SCMD_ definitions
* NOTE: see SCSI_CMDS_KEY_STRINGS_CDIO in cdio.h for additional
* command-to-string translations.
*/
#define SCSI_CMDS_KEY_STRINGS \
/* 0x01 */ SCMD_REWIND | \
SCMD_REZERO_UNIT, "rezero/rewind", \
/* 0x08 */ SCMD_READ | \
SCMD_RECEIVE, "read", \
/* 0x0a */ SCMD_PRINT | \
SCMD_SEND | \
SCMD_WRITE, "write", \
/* 0x0b */ SCMD_SEEK | \
SCMD_SLEW_PRINT | \
SCMD_TRK_SEL, "seek", \
/* 0x10 */ SCMD_WRITE_FILE_MARK | \
SCMD_FLUSH_PRINT_BUF, "write_file_mark", \
/* 0x1b */ SCMD_LOAD | \
SCMD_START_STOP | \
SCMD_STOP_PRINT, "load/start/stop", \
/* 0x2b */ SCMD_SEEK_G1 | \
SCMD_LOCATE, "seek(10)", \
/* 0x44 */ SCMD_REPORT_DENSITIES | \
/* SCMD_READ_HEADER (from cdio.h) | */ \
0, "report_densities/read_header", \
/* see cdio.h for additional command-to-string translations */
/* XXX not a command code, does not belong here */
#ifdef __cplusplus
}
#endif
/*
* Below are inclusions of files describing various command structures
* of interest.
*/
/*
* Private Vendor Unique Commands - Each implementation provides this.
*/
#endif /* _SYS_SCSI_GENERIC_COMMANDS_H */