/** @file\r
EFI_EXT_SCSI_PASS_THRU_PROTOCOL as defined in UEFI 2.0.\r
+ This protocol provides services that allow SCSI Pass Thru commands\r
+ to be sent to SCSI devices attached to a SCSI channel.\r
\r
- Copyright (c) 2006, Intel Corporation \r
- All rights reserved. This program and the accompanying materials \r
- are licensed and made available under the terms and conditions of the BSD License \r
- which accompanies this distribution. The full text of the license may be found at \r
- http://opensource.org/licenses/bsd-license.php \r
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
\r
\r
#define EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID \\r
{ \\r
- 0x1d3de7f0, 0x0807, 0x424f, {0xaa, 0x69, 0x11, 0xa5, 0x4e, 0x19, 0xa4, 0x6f } \\r
+ 0x143b7632, 0xb81b, 0x4cb7, {0xab, 0xd3, 0xb6, 0x25, 0xa5, 0xb9, 0xbf, 0xfe } \\r
}\r
\r
typedef struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL EFI_EXT_SCSI_PASS_THRU_PROTOCOL;\r
#define EFI_EXT_SCSI_STATUS_TARGET_TASK_ABORTED 0x40\r
\r
typedef struct {\r
+ ///\r
+ /// The Target ID of the host adapter on the SCSI channel.\r
+ ///\r
UINT32 AdapterId;\r
+ ///\r
+ /// Additional information on the attributes of the SCSI channel.\r
+ ///\r
UINT32 Attributes;\r
+ ///\r
+ /// Supplies the alignment requirement for any buffer used in a data transfer.\r
+ ///\r
UINT32 IoAlign;\r
} EFI_EXT_SCSI_PASS_THRU_MODE;\r
\r
typedef struct {\r
+ ///\r
+ /// The timeout, in 100 ns units, to use for the execution of this SCSI\r
+ /// Request Packet. A Timeout value of 0 means that this function\r
+ /// will wait indefinitely for the SCSI Request Packet to execute. If\r
+ /// Timeout is greater than zero, then this function will return\r
+ /// EFI_TIMEOUT if the time required to execute the SCSI\r
+ /// Request Packet is greater than Timeout.\r
+ ///\r
UINT64 Timeout;\r
+ ///\r
+ /// A pointer to the data buffer to transfer between the SCSI\r
+ /// controller and the SCSI device for read and bidirectional commands.\r
+ ///\r
VOID *InDataBuffer;\r
+ ///\r
+ /// A pointer to the data buffer to transfer between the SCSI\r
+ /// controller and the SCSI device for write or bidirectional commands.\r
+ ///\r
VOID *OutDataBuffer;\r
+ ///\r
+ /// A pointer to the sense data that was generated by the execution of\r
+ /// the SCSI Request Packet.\r
+ ///\r
VOID *SenseData;\r
+ ///\r
+ /// A pointer to buffer that contains the Command Data Block to\r
+ /// send to the SCSI device specified by Target and Lun.\r
+ ///\r
VOID *Cdb;\r
+ ///\r
+ /// On Input, the size, in bytes, of InDataBuffer. On output, the\r
+ /// number of bytes transferred between the SCSI controller and the SCSI device.\r
+ ///\r
UINT32 InTransferLength;\r
+ ///\r
+ /// On Input, the size, in bytes of OutDataBuffer. On Output, the\r
+ /// Number of bytes transferred between SCSI Controller and the SCSI device.\r
+ ///\r
UINT32 OutTransferLength;\r
+ ///\r
+ /// The length, in bytes, of the buffer Cdb. The standard values are 6,\r
+ /// 10, 12, and 16, but other values are possible if a variable length CDB is used.\r
+ ///\r
UINT8 CdbLength;\r
+ ///\r
+ /// The direction of the data transfer. 0 for reads, 1 for writes. A\r
+ /// value of 2 is Reserved for Bi-Directional SCSI commands.\r
+ ///\r
UINT8 DataDirection;\r
+ ///\r
+ /// The status of the host adapter specified by This when the SCSI\r
+ /// Request Packet was executed on the target device.\r
+ ///\r
UINT8 HostAdapterStatus;\r
+ ///\r
+ /// The status returned by the device specified by Target and Lun\r
+ /// when the SCSI Request Packet was executed.\r
+ ///\r
UINT8 TargetStatus;\r
+ ///\r
+ /// On input, the length in bytes of the SenseData buffer. On\r
+ /// output, the number of bytes written to the SenseData buffer.\r
+ ///\r
UINT8 SenseDataLength;\r
} EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET;\r
\r
/**\r
- Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function \r
+ Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function\r
supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the\r
- nonblocking I/O functionality is optional. \r
+ nonblocking I/O functionality is optional.\r
\r
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
@param Target The Target is an array of size TARGET_MAX_BYTES and it represents\r
the id of the SCSI device to send the SCSI Request Packet. Each\r
- transport driver may chose to utilize a subset of this size to suit the needs\r
+ transport driver may choose to utilize a subset of this size to suit the needs\r
of transport target representation. For example, a Fibre Channel driver\r
may use only 8 bytes (WWN) to represent an FC target.\r
@param Lun The LUN of the SCSI device to send the SCSI Request Packet.\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_PASSTHRU) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_PASSTHRU)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r
IN UINT8 *Target,\r
IN UINT64 Lun,\r
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,\r
IN EFI_EVENT Event OPTIONAL\r
- )\r
-; \r
+ );\r
\r
/**\r
- Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These \r
+ Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These\r
can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal\r
- Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the \r
- Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI \r
- channel. \r
+ Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the\r
+ Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI\r
+ channel.\r
\r
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
@param Target On input, a pointer to the Target ID (an array of size\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r
IN OUT UINT8 **Target,\r
IN OUT UINT64 *Lun\r
- )\r
-; \r
+ );\r
\r
/**\r
Used to allocate and build a device path node for a SCSI device on a SCSI channel.\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r
IN UINT8 *Target,\r
IN UINT64 Lun,\r
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r
- )\r
-; \r
+ );\r
\r
/**\r
Used to translate a device path node to a Target ID and LUN.\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
OUT UINT8 **Target,\r
OUT UINT64 *Lun\r
- )\r
-; \r
+ );\r
\r
/**\r
Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel.\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This\r
- )\r
-; \r
- \r
+ );\r
+\r
/**\r
Resets a SCSI logical unit that is connected to a SCSI channel.\r
\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r
IN UINT8 *Target,\r
IN UINT64 Lun\r
- )\r
-; \r
+ );\r
\r
/**\r
- Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either \r
+ Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either\r
be the list SCSI devices that are actually present on the SCSI channel, or the list of legal Target IDs\r
- for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to \r
- see if a SCSI device is actually present at that location on the SCSI channel. \r
+ for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to\r
+ see if a SCSI device is actually present at that location on the SCSI channel.\r
\r
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
@param Target (TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel.\r
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI\r
channel was returned in Target.\r
@retval EFI_INVALID_PARAMETER Target or Lun is NULL.\r
- @retval EFI_TIMEOUT Target array is not all 0xF, and Target were not\r
+ @retval EFI_TIMEOUT Target array is not all 0xF, and Target was not\r
returned on a previous call to GetNextTarget().\r
@retval EFI_NOT_FOUND There are no more SCSI devices on this SCSI channel.\r
\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET) (\r
+(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET)(\r
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,\r
IN OUT UINT8 **Target\r
- )\r
-; \r
- \r
+ );\r
+\r
+///\r
+/// The EFI_EXT_SCSI_PASS_THRU_PROTOCOL provides information about a SCSI channel\r
+/// and the ability to send SCI Request Packets to any SCSI device attached to\r
+/// that SCSI channel. The information includes the Target ID of the host controller\r
+/// on the SCSI channel and the attributes of the SCSI channel.\r
+///\r
struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL {\r
+ ///\r
+ /// A pointer to the EFI_EXT_SCSI_PASS_THRU_MODE data for this SCSI channel.\r
+ ///\r
EFI_EXT_SCSI_PASS_THRU_MODE *Mode;\r
EFI_EXT_SCSI_PASS_THRU_PASSTHRU PassThru;\r
EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN GetNextTargetLun;\r