7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #pragma ident "%Z%%M% %I% %E% SMI"
28
29 /*
30 * Global SCSI data
31 */
32
33 #include <sys/scsi/scsi.h>
34 #include <sys/cdio.h> /* CDROM SCMD_ commands */
35
36 char *sense_keys[NUM_SENSE_KEYS + NUM_IMPL_SENSE_KEYS] = {
37 /* ==== SCSI Standard Keys */
38 "No_Additional_Sense", /* 0x00 KEY_NO_SENSE */
39 "Soft_Error", /* 0x01 KEY_RECOVERABLE_ERROR */
40 "Not_Ready", /* 0x02 KEY_NOT_READY */
41 "Media_Error", /* 0x03 KEY_MEDIUM_ERROR */
42 "Hardware_Error", /* 0x04 KEY_HARDWARE_ERROR */
43 "Illegal_Request", /* 0x05 KEY_ILLEGAL_REQUEST */
44 "Unit_Attention", /* 0x06 KEY_UNIT_ATTENTION */
45 "Write_Protected", /* 0x07 KEY_WRITE_PROTECT */
46 "Blank_Check", /* 0x08 KEY_BLANK_CHECK */
47 "Vendor_Unique", /* 0x09 KEY_VENDOR_UNIQUE */
48 "Copy_Aborted", /* 0x0a KEY_COPY_ABORTED */
71 * CDB_GROUPID macro. Lookup returns size of cdb. If unknown, zero returned.
72 */
73 uchar_t scsi_cdb_size[] = {
74 CDB_GROUP0, /* Group 0, 6 byte cdb */
75 CDB_GROUP1, /* Group 1, 10 byte cdb */
76 CDB_GROUP2, /* Group 2, 10 byte cdb */
77 CDB_GROUP3, /* Group 3, reserved */
78 CDB_GROUP4, /* Group 4, 16 byte cdb */
79 CDB_GROUP5, /* Group 5, 12 byte cdb */
80 CDB_GROUP6, /* Group 6, ? byte cdb (vendor specific) */
81 CDB_GROUP7 /* Group 7, ? byte cdb (vendor specific) */
82 };
83
84 /*
85 * Basic SCSI command description strings that can be used by drivers
86 * to pass to scsi_errmsg().
87 */
88 struct scsi_key_strings scsi_cmds[] = {
89 SCSI_CMDS_KEY_STRINGS,
90 SCSI_CMDS_KEY_STRINGS_CDIO,
91 -1, NULL
92 };
|
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * Global SCSI data
29 */
30
31 #include <sys/scsi/scsi.h>
32 #include <sys/cdio.h> /* CDROM SCMD_ commands */
33
34 char *sense_keys[NUM_SENSE_KEYS + NUM_IMPL_SENSE_KEYS] = {
35 /* ==== SCSI Standard Keys */
36 "No_Additional_Sense", /* 0x00 KEY_NO_SENSE */
37 "Soft_Error", /* 0x01 KEY_RECOVERABLE_ERROR */
38 "Not_Ready", /* 0x02 KEY_NOT_READY */
39 "Media_Error", /* 0x03 KEY_MEDIUM_ERROR */
40 "Hardware_Error", /* 0x04 KEY_HARDWARE_ERROR */
41 "Illegal_Request", /* 0x05 KEY_ILLEGAL_REQUEST */
42 "Unit_Attention", /* 0x06 KEY_UNIT_ATTENTION */
43 "Write_Protected", /* 0x07 KEY_WRITE_PROTECT */
44 "Blank_Check", /* 0x08 KEY_BLANK_CHECK */
45 "Vendor_Unique", /* 0x09 KEY_VENDOR_UNIQUE */
46 "Copy_Aborted", /* 0x0a KEY_COPY_ABORTED */
69 * CDB_GROUPID macro. Lookup returns size of cdb. If unknown, zero returned.
70 */
71 uchar_t scsi_cdb_size[] = {
72 CDB_GROUP0, /* Group 0, 6 byte cdb */
73 CDB_GROUP1, /* Group 1, 10 byte cdb */
74 CDB_GROUP2, /* Group 2, 10 byte cdb */
75 CDB_GROUP3, /* Group 3, reserved */
76 CDB_GROUP4, /* Group 4, 16 byte cdb */
77 CDB_GROUP5, /* Group 5, 12 byte cdb */
78 CDB_GROUP6, /* Group 6, ? byte cdb (vendor specific) */
79 CDB_GROUP7 /* Group 7, ? byte cdb (vendor specific) */
80 };
81
82 /*
83 * Basic SCSI command description strings that can be used by drivers
84 * to pass to scsi_errmsg().
85 */
86 struct scsi_key_strings scsi_cmds[] = {
87 SCSI_CMDS_KEY_STRINGS,
88 SCSI_CMDS_KEY_STRINGS_CDIO,
89 { -1, NULL }
90 };
|