diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-20 15:16:32 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-20 15:16:32 +0000 |
commit | 4135253bde4f1bb0004844f3ab1112882c76072e (patch) | |
tree | 784ffd0e4d2cec91972c3ba93380af314d82dd83 /MdePkg/Include/IndustryStandard/Scsi.h | |
parent | ee256e2c4d3aaea2c265d80d120db65f41520090 (diff) | |
download | edk2-platforms-4135253bde4f1bb0004844f3ab1112882c76072e.tar.xz |
Update IndustryStandard according to code review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6155 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/IndustryStandard/Scsi.h')
-rw-r--r-- | MdePkg/Include/IndustryStandard/Scsi.h | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/MdePkg/Include/IndustryStandard/Scsi.h b/MdePkg/Include/IndustryStandard/Scsi.h index 04bd3b4fb0..ccb3590bdf 100644 --- a/MdePkg/Include/IndustryStandard/Scsi.h +++ b/MdePkg/Include/IndustryStandard/Scsi.h @@ -1,7 +1,7 @@ /** @file
- support for SCSI-2 standard
+ Support for SCSI-2 standard
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -33,15 +33,15 @@ #define EFI_SCSI_OP_MODE_SEN6 0x1a
#define EFI_SCSI_OP_MODE_SEN10 0x5a
#define EFI_SCSI_OP_READ_BUFFER 0x3c
+#define EFI_SCSI_OP_RECEIVE_DIAG 0x1c
#define EFI_SCSI_OP_REQUEST_SENSE 0x03
#define EFI_SCSI_OP_SEND_DIAG 0x1d
#define EFI_SCSI_OP_TEST_UNIT_READY 0x00
#define EFI_SCSI_OP_WRITE_BUFF 0x3b
//
-// Commands unique to Direct Access Devices
+// Additional commands for Direct Access Devices
//
-#define EFI_SCSI_OP_COMPARE 0x39
#define EFI_SCSI_OP_FORMAT 0x04
#define EFI_SCSI_OP_LOCK_UN_CACHE 0x36
#define EFI_SCSI_OP_PREFETCH 0x34
@@ -52,7 +52,6 @@ #define EFI_SCSI_OP_READ_DEFECT 0x37
#define EFI_SCSI_OP_READ_LONG 0x3e
#define EFI_SCSI_OP_REASSIGN_BLK 0x07
-#define EFI_SCSI_OP_RECEIVE_DIAG 0x1c
#define EFI_SCSI_OP_RELEASE 0x17
#define EFI_SCSI_OP_REZERO 0x01
#define EFI_SCSI_OP_SEARCH_DATA_E 0x31
@@ -72,7 +71,7 @@ #define EFI_SCSI_OP_WRITE_SAME 0x41
//
-// Commands unique to Sequential Access Devices
+// Additional commands for Sequential Access Devices
//
#define EFI_SCSI_OP_ERASE 0x19
#define EFI_SCSI_OP_LOAD_UNLOAD 0x1b
@@ -88,7 +87,7 @@ #define EFI_SCSI_OP_WRITE_FILEMARK 0x10
//
-// Commands unique to Printer Devices
+// Additional commands for Printer Devices
//
#define EFI_SCSI_OP_PRINT 0x0a
#define EFI_SCSI_OP_SLEW_PRINT 0x0b
@@ -96,13 +95,13 @@ #define EFI_SCSI_OP_SYNC_BUFF 0x10
//
-// Commands unique to Processor Devices
+// Additional commands for Processor Devices
//
#define EFI_SCSI_OP_RECEIVE 0x08
#define EFI_SCSI_OP_SEND 0x0a
//
-// Commands unique to Write-Once Devices
+// Additional commands for Write-Once Devices
//
#define EFI_SCSI_OP_MEDIUM_SCAN 0x38
#define EFI_SCSI_OP_SEARCH_DAT_E10 0x31
@@ -120,7 +119,7 @@ #define EFI_SCSI_OP_WRITE_VERIFY12 0xae
//
-// Commands unique to CD-ROM Devices
+// Additional commands for CD-ROM Devices
//
#define EFI_SCSI_OP_PLAY_AUD_10 0x45
#define EFI_SCSI_OP_PLAY_AUD_12 0xa5
@@ -134,7 +133,7 @@ #define EFI_SCSI_OP_READ_TOC 0x43
//
-// Commands unique to Scanner Devices
+// Additional commands for Scanner Devices
//
#define EFI_SCSI_OP_GET_DATABUFF_STAT 0x34
#define EFI_SCSI_OP_GET_WINDOW 0x25
@@ -143,12 +142,12 @@ #define EFI_SCSI_OP_SET_WINDOW 0x24
//
-// Commands unique to Optical Memory Devices
+// Additional commands for Optical Memory Devices
//
#define EFI_SCSI_OP_UPDATE_BLOCK 0x3d
//
-// Commands unique to Medium Changer Devices
+// Additional commands for Medium Changer Devices
//
#define EFI_SCSI_OP_EXCHANGE_MEDIUM 0xa6
#define EFI_SCSI_OP_INIT_ELEMENT_STAT 0x07
@@ -157,7 +156,7 @@ #define EFI_SCSI_OP_SEND_VOL_TAG 0xb6
//
-// Commands unique to Communition Devices
+// Additional commands for Communition Devices
//
#define EFI_SCSI_OP_GET_MESSAGE6 0x08
#define EFI_SCSI_OP_GET_MESSAGE10 0x28
@@ -175,23 +174,27 @@ //
// Peripheral Device Type Definitions
//
-#define EFI_SCSI_TYPE_DISK 0x00 // Disk device
-#define EFI_SCSI_TYPE_TAPE 0x01 // Tape device
-#define EFI_SCSI_TYPE_PRINTER 0x02 // Printer
-#define EFI_SCSI_TYPE_PROCESSOR 0x03 // Processor
-#define EFI_SCSI_TYPE_WORM 0x04 // Write-once read-multiple
-#define EFI_SCSI_TYPE_CDROM 0x05 // CD-ROM device
-#define EFI_SCSI_TYPE_SCANNER 0x06 // Scanner device
-#define EFI_SCSI_TYPE_OPTICAL 0x07 // Optical memory device
-#define EFI_SCSI_TYPE_MEDIUMCHANGER 0x08 // Medium Changer device
-#define EFI_SCSI_TYPE_COMMUNICATION 0x09 // Communications device
-#define EFI_SCSI_TYPE_RESERVED_LOW 0x0A // Reserved (low)
-#define EFI_SCSI_TYPE_RESERVED_HIGH 0x1E // Reserved (high)
-#define EFI_SCSI_TYPE_UNKNOWN 0x1F // Unknown or no device type
+#define EFI_SCSI_TYPE_DISK 0x00 ///< Direct-access device (e.g. magnetic disk)
+#define EFI_SCSI_TYPE_TAPE 0x01 ///< Sequential-access device (e.g. magnetic tape)
+#define EFI_SCSI_TYPE_PRINTER 0x02 ///< Printer device
+#define EFI_SCSI_TYPE_PROCESSOR 0x03 ///< Processor device
+#define EFI_SCSI_TYPE_WORM 0x04 ///< Write-once device (e.g. some optical disks)
+#define EFI_SCSI_TYPE_CDROM 0x05 ///< CD-ROM device
+#define EFI_SCSI_TYPE_SCANNER 0x06 ///< Scanner device
+#define EFI_SCSI_TYPE_OPTICAL 0x07 ///< Optical memory device (e.g. some optical disks)
+#define EFI_SCSI_TYPE_MEDIUMCHANGER 0x08 ///< Medium changer device (e.g. jukeboxes)
+#define EFI_SCSI_TYPE_COMMUNICATION 0x09 ///< Communications device
+#define EFI_SCSI_TYPE_ASCIT8_1 0x0A ///< Defined by ASC IT8 (Graphic arts pre-press devices)
+#define EFI_SCSI_TYPE_ASCIT8_2 0x0B ///< Defined by ASC IT8 (Graphic arts pre-press devices)
+//
+// 0Ch - 1Eh are reserved
+//
+#define EFI_SCSI_TYPE_UNKNOWN 0x1F ///< Unknown or no device type
+
#pragma pack(1)
-//
-// Data structures for scsi command use
-//
+///
+/// Standard INQUIRY data format
+///
typedef struct {
UINT8 Peripheral_Type : 5;
UINT8 Peripheral_Qualifier : 3;
@@ -203,6 +206,9 @@ typedef struct { UINT8 Reserved_5_95[95 - 5 + 1];
} EFI_SCSI_INQUIRY_DATA;
+///
+/// Error codes 70h and 71h sense data format
+///
typedef struct {
UINT8 Error_Code : 7;
UINT8 Valid : 1;
@@ -212,11 +218,11 @@ typedef struct { UINT8 ILI : 1;
UINT8 Reserved_22 : 2;
UINT8 Information_3_6[4];
- UINT8 Addnl_Sense_Length; // n - 7
+ UINT8 Addnl_Sense_Length; ///< Additional sense length (n-7)
UINT8 Vendor_Specific_8_11[4];
- UINT8 Addnl_Sense_Code; // mandatory
- UINT8 Addnl_Sense_Code_Qualifier; // mandatory
- UINT8 Field_Replaceable_Unit_Code; // optional
+ UINT8 Addnl_Sense_Code; ///< Additional sense code
+ UINT8 Addnl_Sense_Code_Qualifier; ///< Additional sense code qualifier
+ UINT8 Field_Replaceable_Unit_Code; ///< Field replaceable unit code
UINT8 Reserved_15_17[3];
} EFI_SCSI_SENSE_DATA;
@@ -232,10 +238,10 @@ typedef struct { } EFI_SCSI_DISK_CAPACITY_DATA;
#pragma pack()
+
//
// Sense Key
//
-#define EFI_SCSI_REQUEST_SENSE_ERROR (0x70)
#define EFI_SCSI_SK_NO_SENSE (0x0)
#define EFI_SCSI_SK_RECOVERY_ERROR (0x1)
#define EFI_SCSI_SK_NOT_READY (0x2)
@@ -254,9 +260,13 @@ typedef struct { #define EFI_SCSI_SK_RESERVED_F (0xF)
//
-// Additional Sense Codes
+// Additional Sense Codes and Sense Code Qualifiers.
+// Only some frequently used additional sense codes and qualifiers are
+// defined here. Please refer to SCSI standard for full value definition.
//
#define EFI_SCSI_ASC_NOT_READY (0x04)
+#define EFI_SCSI_ASCQ_IN_PROGRESS (0x01)
+
#define EFI_SCSI_ASC_MEDIA_ERR1 (0x10)
#define EFI_SCSI_ASC_MEDIA_ERR2 (0x11)
#define EFI_SCSI_ASC_MEDIA_ERR3 (0x14)
@@ -267,19 +277,9 @@ typedef struct { #define EFI_SCSI_ASC_INVALID_FIELD (0x24)
#define EFI_SCSI_ASC_WRITE_PROTECTED (0x27)
#define EFI_SCSI_ASC_MEDIA_CHANGE (0x28)
-#define EFI_SCSI_ASC_RESET (0x29) /* Power On Reset or Bus Reset occurred */
+#define EFI_SCSI_ASC_RESET (0x29) ///<Power On Reset or Bus Reset occurred
#define EFI_SCSI_ASC_ILLEGAL_FIELD (0x26)
#define EFI_SCSI_ASC_NO_MEDIA (0x3A)
#define EFI_SCSI_ASC_ILLEGAL_MODE_FOR_THIS_TRACK (0x64)
-///
-/// Additional Sense Code Qualifier
-///
-#define EFI_SCSI_ASCQ_IN_PROGRESS (0x01)
-
-///
-/// Max bytes needed to represent ID of a SCSI device
-///
-#define EFI_SCSI_TARGET_MAX_BYTES (0x10)
-
#endif
|