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