diff options
| author | cth <none@none> | 2005-07-15 09:16:33 -0700 |
|---|---|---|
| committer | cth <none@none> | 2005-07-15 09:16:33 -0700 |
| commit | 30a83a24c1f8c1cdf6fad534cbcc1bfc0b884e9a (patch) | |
| tree | de9130a268715c304358fd3ad2b5460052cfb001 | |
| parent | bd335c6465ddbafe543900df4b03247bfa288eff (diff) | |
| download | illumos-joyent-30a83a24c1f8c1cdf6fad534cbcc1bfc0b884e9a.tar.gz | |
6228435 Undecoded command in var/adm/messages - Error for Command: undecoded cmd 0x5a
| -rw-r--r-- | usr/src/uts/common/io/scsi/impl/scsi_data.c | 97 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/cdio.h | 39 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h | 10 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/scsi/generic/commands.h | 121 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/scsi/targets/sddef.h | 21 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/usb/scsa2usb/scsa2usb.h | 7 |
6 files changed, 162 insertions, 133 deletions
diff --git a/usr/src/uts/common/io/scsi/impl/scsi_data.c b/usr/src/uts/common/io/scsi/impl/scsi_data.c index e03ab0afb0..af85ffd242 100644 --- a/usr/src/uts/common/io/scsi/impl/scsi_data.c +++ b/usr/src/uts/common/io/scsi/impl/scsi_data.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,31 +31,34 @@ */ #include <sys/scsi/scsi.h> +#include <sys/cdio.h> /* CDROM SCMD_ commands */ char *sense_keys[NUM_SENSE_KEYS + NUM_IMPL_SENSE_KEYS] = { - "No Additional Sense", /* 0x00 */ - "Soft Error", /* 0x01 */ - "Not Ready", /* 0x02 */ - "Media Error", /* 0x03 */ - "Hardware Error", /* 0x04 */ - "Illegal Request", /* 0x05 */ - "Unit Attention", /* 0x06 */ - "Write Protected", /* 0x07 */ - "Blank Check", /* 0x08 */ - "Vendor Unique", /* 0x09 */ - "Copy Aborted", /* 0x0a */ - "Aborted Command", /* 0x0b */ - "Equal Error", /* 0x0c */ - "Volume Overflow", /* 0x0d */ - "Miscompare Error", /* 0x0e */ - "Reserved", /* 0x0f */ - "fatal", /* 0x10 */ - "timeout", /* 0x11 */ - "EOF", /* 0x12 */ - "EOT", /* 0x13 */ - "length error", /* 0x14 */ - "BOT", /* 0x15 */ - "wrong tape media" /* 0x16 */ + /* ==== SCSI Standard Keys */ + "No_Additional_Sense", /* 0x00 KEY_NO_SENSE */ + "Soft_Error", /* 0x01 KEY_RECOVERABLE_ERROR */ + "Not_Ready", /* 0x02 KEY_NOT_READY */ + "Media_Error", /* 0x03 KEY_MEDIUM_ERROR */ + "Hardware_Error", /* 0x04 KEY_HARDWARE_ERROR */ + "Illegal_Request", /* 0x05 KEY_ILLEGAL_REQUEST */ + "Unit_Attention", /* 0x06 KEY_UNIT_ATTENTION */ + "Write_Protected", /* 0x07 KEY_WRITE_PROTECT */ + "Blank_Check", /* 0x08 KEY_BLANK_CHECK */ + "Vendor_Unique", /* 0x09 KEY_VENDOR_UNIQUE */ + "Copy_Aborted", /* 0x0a KEY_COPY_ABORTED */ + "Aborted_Command", /* 0x0b KEY_ABORTED_COMMAND */ + "Equal_Error", /* 0x0c KEY_EQUAL */ + "Volume_Overflow", /* 0x0d KEY_VOLUME_OVERFLOW */ + "Miscompare_Error", /* 0x0e KEY_MISCOMPARE */ + "Reserved", /* 0x0f KEY_RESERVED */ + /* ==== SUN SCSA 'pseudo' keys */ + "fatal", /* 0x10 SUN_KEY_FATAL */ + "timeout", /* 0x11 SUN_KEY_TIMEOUT */ + "EOF", /* 0x12 SUN_KEY_EOF */ + "EOT", /* 0x13 SUN_KEY_EOT */ + "length_error", /* 0x14 SUN_KEY_LENGTH */ + "BOT", /* 0x15 SUN_KEY_BOT */ + "wrong_tape_media" /* 0x16 SUN_KEY_WRONGMEDIA */ }; @@ -83,47 +86,7 @@ uchar_t scsi_cdb_size[] = { * to pass to scsi_errmsg(). */ struct scsi_key_strings scsi_cmds[] = { -/* 0x00 */ SCMD_TEST_UNIT_READY, "test unit ready", -/* 0x01 */ SCMD_REZERO_UNIT|SCMD_REWIND, "rezero/rewind", -/* 0x02 */ SCMD_REQUEST_SENSE, "request sense", -/* 0x04 */ SCMD_FORMAT, "format", -/* 0x05 */ SCMD_READ_BLKLIM, "read block limits", -/* 0x07 */ SCMD_REASSIGN_BLOCK, "reassign", -/* 0x08 */ SCMD_READ, "read", -/* 0x0a */ SCMD_WRITE, "write", -/* 0x0b */ SCMD_SEEK, "seek", -/* 0x0f */ SCMD_READ_REVERSE, "read reverce", -/* 0x10 */ SCMD_WRITE_FILE_MARK, "write file mark", -/* 0x11 */ SCMD_SPACE, "space", -/* 0x12 */ SCMD_INQUIRY, "inquiry", -/* 0x13 */ SCMD_VERIFY_G0, "verify(8)", -/* 0x14 */ SCMD_RECOVER_BUF, "recover buffer data", -/* 0x15 */ SCMD_MODE_SELECT, "mode select", -/* 0x16 */ SCMD_RESERVE, "reserve", -/* 0x17 */ SCMD_RELEASE, "release", -/* 0x18 */ SCMD_COPY, "copy", -/* 0x19 */ SCMD_ERASE, "erase tape", -/* 0x1a */ SCMD_MODE_SENSE, "mode sense", -/* 0x1b */ SCMD_START_STOP|SCMD_LOAD, "load/start/stop", -/* 0x1c */ SCMD_GDIAG, "get diagnostic results", -/* 0x1d */ SCMD_SDIAG, "send diagnostic command", -/* 0x1e */ SCMD_DOORLOCK, "door lock", -/* 0x23 */ SCMD_READ_FORMAT_CAP, "read format capacity", -/* 0x25 */ SCMD_READ_CAPACITY, "read capacity", -/* 0x28 */ SCMD_READ_G1, "read(10)", -/* 0x2a */ SCMD_WRITE_G1, "write(10)", -/* 0x2b */ SCMD_SEEK_G1|SCMD_LOCATE, "locate/seek(10)", -/* 0x2f */ SCMD_VERIFY, "verify", -/* 0x34 */ SCMD_READ_POSITION, "read position", -/* 0x37 */ SCMD_READ_DEFECT_LIST, "read defect data", -/* 0x3b */ SCMD_WRITE_BUFFER, "write buffer", -/* 0x3c */ SCMD_READ_BUFFER, "read buffer", -/* 0x44 */ SCMD_REPORT_DENSITIES, "report densities", -/* 0x46 */ SCMD_GET_CONFIGURATION, "get configuration", -/* 0x4c */ SCMD_LOG_SELECT_G1, "log select(10)", -/* 0x4d */ SCMD_LOG_SENSE_G1, "log sense(10)", -/* 0x5e */ SCMD_PRIN, "persistent reservation in", -/* 0x5f */ SCMD_PROUT, "persistent reservation out", -/* 0xa0 */ SCMD_REPORT_LUNS, "report luns", - -1, NULL + SCSI_CMDS_KEY_STRINGS, + SCSI_CMDS_KEY_STRINGS_CDIO, + -1, NULL }; diff --git a/usr/src/uts/common/sys/cdio.h b/usr/src/uts/common/sys/cdio.h index fd69333c64..40d5082304 100644 --- a/usr/src/uts/common/sys/cdio.h +++ b/usr/src/uts/common/sys/cdio.h @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -331,15 +331,14 @@ struct cdrom_subcode32 { * Group 2 Commands * */ - +#define SCMD_READ_SUBCHANNEL 0x42 /* optional SCSI command */ #define SCMD_READ_TOC 0x43 /* optional SCSI command */ +#define SCMD_READ_HEADER 0x44 /* optional SCSI command */ +#define SCMD_PLAYAUDIO10 0x45 /* optional SCSI command */ #define SCMD_PLAYAUDIO_MSF 0x47 /* optional SCSI command */ #define SCMD_PLAYAUDIO_TI 0x48 /* optional SCSI command */ -#define SCMD_PAUSE_RESUME 0x4B /* optional SCSI command */ -#define SCMD_READ_SUBCHANNEL 0x42 /* optional SCSI command */ -#define SCMD_PLAYAUDIO10 0x45 /* optional SCSI command */ #define SCMD_PLAYTRACK_REL10 0x49 /* optional SCSI command */ -#define SCMD_READ_HEADER 0x44 /* optional SCSI command */ +#define SCMD_PAUSE_RESUME 0x4B /* optional SCSI command */ /* * @@ -348,6 +347,7 @@ struct cdrom_subcode32 { */ #define SCMD_PLAYAUDIO12 0xA5 /* optional SCSI command */ #define SCMD_PLAYTRACK_REL12 0xA9 /* optional SCSI command */ +#define SCMD_SET_CDROM_SPEED 0xBB /* optional SCSI command */ #define SCMD_READ_CD 0xBE /* Universal way of accessing CD data */ /* @@ -370,7 +370,6 @@ struct cdrom_subcode32 { * Group 6 Commands * */ - #define SCMD_CD_PLAYBACK_CONTROL 0xC9 /* SONY unique SCSI command */ #define SCMD_CD_PLAYBACK_STATUS 0xC4 /* SONY unique SCSI command */ #define SCMD_READ_CDDA 0xD8 /* Vendor unique SCSI command */ @@ -379,6 +378,32 @@ struct cdrom_subcode32 { #define CDROM_MODE2_SIZE 2336 +/* + * scsi_key_strings for CDROM cdio SCMD_ definitions + */ +#define SCSI_CMDS_KEY_STRINGS_CDIO \ +/* 0x42 */ SCMD_READ_SUBCHANNEL, "read_subchannel", \ +/* 0x43 */ SCMD_READ_TOC, "read_toc", \ +/* 0x44 */ SCMD_REPORT_DENSITIES | \ + SCMD_READ_HEADER, "report_densities/read_header", \ +/* 0x45 */ SCMD_PLAYAUDIO10, "playaudio", \ +/* 0x46 */ SCMD_GET_CONFIGURATION, "get_configuration", \ +/* 0x47 */ SCMD_PLAYAUDIO_MSF, "playaudio_msf", \ +/* 0x48 */ SCMD_PLAYAUDIO_TI, "playaudio_ti", \ +/* 0x49 */ SCMD_PLAYTRACK_REL10, "playaudio_rel", \ +/* 0x4b */ SCMD_PAUSE_RESUME, "pause_resume", \ + \ +/* 0xa5 */ SCMD_PLAYAUDIO12, "playaudio(12)", \ +/* 0xa9 */ SCMD_PLAYTRACK_REL12, "playtrack_rel", \ +/* 0xbb */ SCMD_SET_CDROM_SPEED, "set_cd_speed", \ +/* 0xbe */ SCMD_READ_CD, "read_cd", \ + \ +/* 0xc4 */ SCMD_CD_PLAYBACK_STATUS, "cd_playback_status", \ +/* 0xc9 */ SCMD_CD_PLAYBACK_CONTROL, "cd_playback_control", \ +/* 0xd8 */ SCMD_READ_CDDA, "read_cdda", \ +/* 0xdb */ SCMD_READ_CDXA, "read_cdxa", \ +/* 0xdf */ SCMD_READ_ALL_SUBCODES, "read_all_subcodes" + #ifdef __cplusplus } #endif diff --git a/usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h b/usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h index cb7b3c8242..75ee409a57 100644 --- a/usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h +++ b/usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h @@ -172,14 +172,6 @@ extern int vhci_debug; #define CFLAG_NOWAIT 0x1000 /* don't sleep */ #define CFLAG_DMA_PARTIAL 0x2000 /* Support Partial DMA */ -#ifndef SCMD_PRIN -#define SCMD_PRIN 0x5E -#endif - -#ifndef SCMD_PROUT -#define SCMD_PROUT 0x5F -#endif - /* * Maximum size of SCSI cdb in SCSI command */ @@ -579,7 +571,7 @@ struct scsi_failover_ops { #if defined(_SYSCALL32) /* - * 32 bit varients of sv_path_info_prop_t and sv_path_info_t; + * 32 bit variants of sv_path_info_prop_t and sv_path_info_t; * To be used only in the driver and NOT applications */ typedef struct sv_path_info_prop32 { diff --git a/usr/src/uts/common/sys/scsi/generic/commands.h b/usr/src/uts/common/sys/scsi/generic/commands.h index ef6072679d..0aa84ef58b 100644 --- a/usr/src/uts/common/sys/scsi/generic/commands.h +++ b/usr/src/uts/common/sys/scsi/generic/commands.h @@ -38,7 +38,6 @@ extern "C" { * * Macros to determine known command sizes */ - #define CDB_GROUPID(cmd) ((cmd >> 5) & 0x7) #define CDB_GROUPID_0 0 #define CDB_GROUPID_1 1 @@ -60,18 +59,17 @@ extern "C" { /* * Generic Command Definitions + * NOTE: CDROM commands are defined in cdio.h */ /* * Group 0 Commands (CDB range 0x00 - 0x1F) */ - #define SCMD_GROUP0 0x00 /* * Group 0 commands, All Devices */ - #define SCMD_TEST_UNIT_READY 0x00 #define SCMD_REQUEST_SENSE 0x03 #define SCMD_INQUIRY 0x12 @@ -82,7 +80,6 @@ extern "C" { /* * Group 0 commands, Direct Access Devices */ - /* SCMD_TEST_UNIT_READY 0x00 */ #define SCMD_REZERO_UNIT 0x01 /* SCMD_REQUEST_SENSE 0x03 */ @@ -105,7 +102,6 @@ extern "C" { /* * Group 0 commands, Sequential Access Devices */ - /* SCMD_TEST_UNIT_READY 0x00 */ #define SCMD_REWIND 0x01 /* Note similarity to SCMD_REZERO */ /* SCMD_REQUEST_SENSE 0x03 */ @@ -134,7 +130,6 @@ extern "C" { /* * Group 0 commands, Printer Devices */ - /* SCMD_TEST_UNIT_READY 0x00 */ /* SCMD_REQUEST_SENSE 0x03 */ /* SCMD_FORMAT 0x04 */ @@ -168,7 +163,6 @@ extern "C" { /* * Group 0 commands, WORM Devices */ - /* SCMD_TEST_UNIT_READY 0x00 */ /* SCMD_REZERO_UNIT 0x01 */ /* SCMD_REQUEST_SENSE 0x03 */ @@ -190,7 +184,6 @@ extern "C" { /* * Group 0 commands, Read Only Devices */ - /* SCMD_TEST_UNIT_READY 0x00 */ /* SCMD_REZERO_UNIT 0x01 */ /* SCMD_REQUEST_SENSE 0x03 */ @@ -211,22 +204,21 @@ extern "C" { /* * Group 1 Commands (CDB range 0x20 - 0x3F) */ - #define SCMD_GROUP1 0x20 /* * Group 1 Commands, All Devices */ - #define SCMD_COMPARE 0x39 #define SCMD_COPY_VERIFY 0x3A -#define SCMD_PRIN 0x5E -#define SCMD_PROUT 0x5F +#define SCMD_PERSISTENT_RESERVE_IN 0x5E +#define SCMD_PERSISTENT_RESERVE_OUT 0x5F +#define SCMD_PRIN SCMD_PERSISTENT_RESERVE_IN +#define SCMD_PROUT SCMD_PERSISTENT_RESERVE_OUT /* * Group 1 Commands, Direct Access Devices */ - #define SCMD_READ_FORMAT_CAP 0x23 #define SCMD_READ_CAPACITY 0x25 #define SCMD_READ_G1 0x28 /* Note that only the group changed */ @@ -238,6 +230,7 @@ extern "C" { #define SCMD_SEARCH_EQUAL 0x31 #define SCMD_SEARCH_LOW 0x32 #define SCMD_SET_LIMITS 0x33 +#define SCMD_SYNCHRONIZE_CACHE 0x35 #define SCMD_READ_DEFECT_LIST 0x37 #define SCMD_WRITE_BUFFER 0x3B #define SCMD_READ_BUFFER 0x3c @@ -253,36 +246,25 @@ extern "C" { /* - * The following have been included for the ATAPI devices - */ -#define ATAPI_SET_CD_SPEED 0xBB -#define ATAPI_CAPABILITIES 0x2A - -/* * Group 1 Commands, Sequential Access Devices */ - #define SCMD_LOCATE 0x2B /* Note similarity to SCMD_SEEK_G1 */ #define SCMD_READ_POSITION 0x34 #define SCMD_REPORT_DENSITIES 0x44 - /* * 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 */ @@ -297,7 +279,6 @@ extern "C" { /* * Group 1 Commands, Read Only Devices */ - /* SCMD_READ_CAPACITY 0x25 */ /* SCMD_READ_G1 0x28 */ /* SCMD_SEEK_G1 0x2b */ @@ -336,29 +317,111 @@ extern "C" { * Define for Group 5 command. */ #define SCMD_GROUP5 0xA0 +#define SCMD_REPORT_LUNS 0xA0 #define SCMD_READ_G5 0xA8 #define SCMD_WRITE_G5 0xAA #define SCMD_GET_PERFORMANCE 0xAC -#define SCMD_REPORT_LUNS 0xA0 + +/* + * 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 \ +/* 0x00 */ SCMD_TEST_UNIT_READY, "test_unit_ready", \ +/* 0x01 */ SCMD_REWIND | \ + SCMD_REZERO_UNIT, "rezero/rewind", \ +/* 0x03 */ SCMD_REQUEST_SENSE, "request_sense", \ +/* 0x04 */ SCMD_FORMAT, "format", \ +/* 0x05 */ SCMD_READ_BLKLIM, "read_block_limits", \ +/* 0x07 */ SCMD_REASSIGN_BLOCK, "reassign", \ +/* 0x08 */ SCMD_READ | \ + SCMD_RECEIVE, "read", \ +/* 0x0a */ SCMD_PRINT | \ + SCMD_SEND | \ + SCMD_WRITE, "write", \ +/* 0x0b */ SCMD_SEEK | \ + SCMD_SLEW_PRINT | \ + SCMD_TRK_SEL, "seek", \ +/* 0x0f */ SCMD_READ_REVERSE, "read_reverse", \ +/* 0x10 */ SCMD_WRITE_FILE_MARK | \ + SCMD_FLUSH_PRINT_BUF, "write_file_mark", \ +/* 0x11 */ SCMD_SPACE, "space", \ +/* 0x12 */ SCMD_INQUIRY, "inquiry", \ +/* 0x13 */ SCMD_VERIFY_G0, "verify", \ +/* 0x14 */ SCMD_RECOVER_BUF, "recover_buffer_data", \ +/* 0x15 */ SCMD_MODE_SELECT, "mode_select", \ +/* 0x16 */ SCMD_RESERVE, "reserve", \ +/* 0x17 */ SCMD_RELEASE, "release", \ +/* 0x18 */ SCMD_COPY, "copy", \ +/* 0x19 */ SCMD_ERASE, "erase_tape", \ +/* 0x1a */ SCMD_MODE_SENSE, "mode_sense", \ +/* 0x1b */ SCMD_LOAD | \ + SCMD_START_STOP | \ + SCMD_STOP_PRINT, "load/start/stop", \ +/* 0x1c */ SCMD_GDIAG, "get_diagnostic_results", \ +/* 0x1d */ SCMD_SDIAG, "send_diagnostic_command", \ +/* 0x1e */ SCMD_DOORLOCK, "door_lock", \ +/* 0x23 */ SCMD_READ_FORMAT_CAP, "read_format_capacity", \ +/* 0x25 */ SCMD_READ_CAPACITY, "read_capacity", \ +/* 0x28 */ SCMD_READ_G1, "read(10)", \ +/* 0x2a */ SCMD_WRITE_G1, "write(10)", \ +/* 0x2b */ SCMD_SEEK_G1 | \ + SCMD_LOCATE, "seek(10)", \ +/* 0x2e */ SCMD_WRITE_VERIFY, "write_verify", \ +/* 0x2f */ SCMD_VERIFY, "verify(10)", \ +/* 0x30 */ SCMD_SEARCH_HIGH, "search_data_high", \ +/* 0x31 */ SCMD_SEARCH_EQUAL, "search_data_equal", \ +/* 0x32 */ SCMD_SEARCH_LOW, "search_data_low", \ +/* 0x33 */ SCMD_SET_LIMITS, "set_limits", \ +/* 0x34 */ SCMD_READ_POSITION, "read_position", \ +/* 0x35 */ SCMD_SYNCHRONIZE_CACHE, "synchronize_cache", \ +/* 0x37 */ SCMD_READ_DEFECT_LIST, "read_defect_data", \ +/* 0x39 */ SCMD_COMPARE, "compare", \ +/* 0x3a */ SCMD_COPY_VERIFY, "copy_verify", \ +/* 0x3b */ SCMD_WRITE_BUFFER, "write_buffer", \ +/* 0x3c */ SCMD_READ_BUFFER, "read_buffer", \ +/* 0x3e */ SCMD_READ_LONG, "read_long", \ +/* 0x3f */ SCMD_WRITE_LONG, "write_long", \ +/* 0x44 */ SCMD_REPORT_DENSITIES | \ + /* SCMD_READ_HEADER (from cdio.h) | */ \ + 0, "report_densities/read_header", \ +/* 0x4c */ SCMD_LOG_SELECT_G1, "log_select", \ +/* 0x4d */ SCMD_LOG_SENSE_G1, "log_sense", \ +/* 0x55 */ SCMD_MODE_SELECT_G1, "mode_select(10)", \ +/* 0x56 */ SCMD_RESERVE_G1, "reserve(10)", \ +/* 0x57 */ SCMD_RELEASE_G1, "release(10)", \ +/* 0x5a */ SCMD_MODE_SENSE_G1, "mode_sense(10)", \ +/* 0x5e */ SCMD_PERSISTENT_RESERVE_IN, "persistent_reserve_in", \ +/* 0x5f */ SCMD_PERSISTENT_RESERVE_OUT, "persistent_reserve_out", \ +/* 0x83 */ SCMD_EXTENDED_COPY, "extended_copy", \ +/* 0x88 */ SCMD_READ_G4, "read(16)", \ +/* 0x8a */ SCMD_WRITE_G4, "write(16)", \ +/* 0xa0 */ SCMD_REPORT_LUNS, "report_luns", \ +/* 0xa8 */ SCMD_READ_G5, "read(12)", \ +/* 0xaa */ SCMD_WRITE_G5, "write(12)", \ +/* 0xac */ SCMD_GET_PERFORMANCE, "get_performance" \ + /* see cdio.h for additional command-to-string translations */ + +/* XXX not a command code, does not belong here */ +#define ATAPI_CAPABILITIES 0x2A + #ifdef __cplusplus } #endif - /* * Below are inclusions of files describing various command structures * of interest. */ - #include <sys/scsi/generic/inquiry.h> #include <sys/scsi/generic/sense.h> /* * Private Vendor Unique Commands - Each implementation provides this. */ - #include <sys/scsi/impl/commands.h> #endif /* _SYS_SCSI_GENERIC_COMMANDS_H */ diff --git a/usr/src/uts/common/sys/scsi/targets/sddef.h b/usr/src/uts/common/sys/scsi/targets/sddef.h index 829638d712..f01ddddd7a 100644 --- a/usr/src/uts/common/sys/scsi/targets/sddef.h +++ b/usr/src/uts/common/sys/scsi/targets/sddef.h @@ -407,7 +407,7 @@ struct sd_lun { /* * Bit fields for various configuration/state/status info. * Comments indicate the condition if the value of the - * varaible is TRUE (nonzero). + * variable is TRUE (nonzero). */ uint32_t un_f_arq_enabled :1, /* Auto request sense is */ @@ -557,7 +557,7 @@ struct sd_lun { * for conversion between block counts and byte counts. As used here, * "system" block size refers to the block size used by the kernel/ * filesystem (this includes the disk label). The "target" block size - * is the block size returned by the SCSI READ CAPACITY commmand. + * is the block size returned by the SCSI READ CAPACITY command. * * Note: These macros will round up to the next largest blocksize to accomodate * the number of blocks specified. @@ -860,9 +860,6 @@ typedef struct sd_prout { uint16_t ext_len; } sd_prout_t; -#define SCMD_PERSISTENT_RESERVE_IN 0x5E -#define SCMD_PERSISTENT_RESERVE_OUT 0x5F - #define SD_READ_KEYS 0x00 #define SD_READ_RESV 0x01 @@ -1013,13 +1010,13 @@ _NOTE(SCHEME_PROTECTS_DATA("Unshared data", sd_prout)) #ifdef SD_FAULT_INJECTION /* - * sd_fi_pkt replicates the varables that are exposed through pkt + * sd_fi_pkt replicates the variables that are exposed through pkt * - * sd_fi_xb replicates the varables that are exposed through xb + * sd_fi_xb replicates the variables that are exposed through xb * - * sd_fi_un replicates the varables that are exposed through un + * sd_fi_un replicates the variables that are exposed through un * - * sd_fi_arq replicates the varables that are + * sd_fi_arq replicates the variables that are * exposed for Auto-Reqeust-Sense * */ @@ -1640,7 +1637,7 @@ _NOTE(SCHEME_PROTECTS_DATA("Unshared data", sd_uscsi_info)) /* * Driver Property Bit Flag definitions * - * Unfortunaltely, for historical reasons, the bit-flag definitions are + * Unfortunately, for historical reasons, the bit-flag definitions are * different on SPARC, INTEL, & FIBRE platforms. */ @@ -1879,8 +1876,6 @@ typedef struct sd_disk_config { #define SCMD_READ_CDD4 0xd4 /* the one used by some first */ /* generation ATAPI CD drives */ -#define SCMD_SYNCHRONIZE_CACHE 0x35 - /* expected sector type filter values for Play and Read CD CDBs */ #define CDROM_SECTOR_TYPE_CDDA (1<<2) /* IEC 908:1987 (CDDA) */ #define CDROM_SECTOR_TYPE_MODE1 (2<<2) /* Yellow book 2048 bytes */ @@ -1898,8 +1893,6 @@ typedef struct sd_disk_config { #define CDROM_READ_CD_C2 0x02 /* read C2 error data */ #define CDROM_READ_CD_C2_BEB 0x04 /* read C2 and Block Error Bits */ -#define SCMD_SET_CDROM_SPEED 0xbb /* Set CD Speed command */ - /* * These belong in sys/scsi/generic/mode.h diff --git a/usr/src/uts/common/sys/usb/scsa2usb/scsa2usb.h b/usr/src/uts/common/sys/usb/scsa2usb/scsa2usb.h index 2ce0557984..b5957e9c8a 100644 --- a/usr/src/uts/common/sys/usb/scsa2usb/scsa2usb.h +++ b/usr/src/uts/common/sys/usb/scsa2usb/scsa2usb.h @@ -414,13 +414,6 @@ _NOTE(SCHEME_PROTECTS_DATA("unshared data", usb_bulk_req_t)) #define SCSA2USB_TRANSPORT 1 #define SCSA2USB_REJECT -1 - -/* - * these cmds are not passed on but just accepted - */ -#define SCMD_PERSISTENT_RESERVE_IN 0x5E -#define SCMD_PERSISTENT_RESERVE_OUT 0x5F - /* * The scsa2usb_cpr_info data structure is used for cpr related * callbacks. It is used for panic callbacks as well. |
