+++ /dev/null
-/** @file\r
- Common Libarary for SCSI\r
-\r
- Copyright (c) 2006 - 2007, 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
-\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
-#ifndef _SCSI_LIB_H_\r
-#define _SCSI_LIB_H_\r
-\r
-#include <Protocol/ScsiIo.h>\r
-\r
-//\r
-// the time unit is 100ns, since the SCSI I/O defines timeout in 100ns unit.\r
-//\r
-#define EFI_SCSI_STALL_1_MICROSECOND 10\r
-#define EFI_SCSI_STALL_1_MILLISECOND 10000\r
-#define EFI_SCSI_STALL_1_SECOND 10000000\r
-\r
-///\r
-/// this macro cannot be directly used by the gBS->Stall(),\r
-/// since the value output by this macro is in 100ns unit,\r
-/// not 1us unit (1us = 1000ns)\r
-///\r
-#define EFI_SCSI_STALL_SECONDS(a) ((a) * EFI_SCSI_STALL_1_SECOND)\r
-\r
-\r
-/**\r
- Function test the ready status of the SCSI unit.\r
-\r
- Submit SCSI test unit ready command with SCSI request packet specified by this scsi command, TimeOut\r
- and SenseData, then get the status of the target Scsi unit.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
-\r
- If HostAdapterStatus is NULL, then ASSERT().\r
-\r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo A pointer to SCSI IO protocol.\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
-\r
- @retval EFI_SUCCESS The status of the unit is tested successfully.\r
- @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
- but the entire DataBuffer could not be transferred.\r
- The actual number of bytes transferred is returned\r
- in InTransferLength.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet\r
- is not supported by the SCSI initiator(i.e., SCSI \r
- Host Controller).\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiTestUnitReadyCommand (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus\r
- );\r
-\r
-\r
-/**\r
- Function to submit SCSI inquiry command.\r
-\r
- Submit SCSI inquiry command with the SCSI request packet specified by this SCSI command and input\r
- parameters, then return the status of Scsi unit execution.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
-\r
- If HostAdapterStatus is NULL, then ASSERT().\r
-\r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- If InquiryDataLength is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo SCSI IO Protocol to use\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[in, out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
- @param[in, out] InquiryDataBuffer A pointer to inquiry data buffer.\r
- @param[in, out] InquiryDataLength The length of inquiry data buffer.\r
- @param[in] EnableVitalProductData Boolean to enable Vital Product Data.\r
-\r
- @retval EFI_SUCCESS Command is executed successfully.\r
- @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
- but the entire DataBuffer could not be transferred.\r
- The actual number of bytes transferred is returned\r
- in TransferLength.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet\r
- is not supported by the SCSI initiator(i.e., SCSI \r
- Host Controller).\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiInquiryCommand (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- IN OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus,\r
- IN OUT VOID *InquiryDataBuffer,\r
- IN OUT UINT32 *InquiryDataLength,\r
- IN BOOLEAN EnableVitalProductData\r
- );\r
-\r
-\r
-/**\r
- Function to submit SCSI mode sense 10 command.\r
-\r
- Submit SCSI Mode Sense (10) command with the SCSI request packet specified by this SCSI command and\r
- the input parameters, then return the status of Scsi unit execution.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
-\r
- If HostAdapterStatus is NULL, then ASSERT().\r
-\r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- If DataLength is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo A pointer to SCSI IO protocol.\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[in, out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
- @param[in] DataBuffer A pointer to input data buffer.\r
- @param[in, out] DataLength The length of input data buffer.\r
- @param[in] DBDField The DBD Field (Optional).\r
- @param[in] PageControl Page Control.\r
- @param[in] PageCode Page code.\r
-\r
- @retval EFI_SUCCESS The status of the unit is tested successfully.\r
- @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
- but the entire DataBuffer could not be transferred.\r
- The actual number of bytes transferred is returned\r
- in TransferLength.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL. \r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet\r
- is not supported by the SCSI initiator(i.e., SCSI \r
- Host Controller).\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiModeSense10Command (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- IN OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus,\r
- IN VOID *DataBuffer,\r
- IN OUT UINT32 *DataLength,\r
- IN UINT8 DBDField, OPTIONAL\r
- IN UINT8 PageControl,\r
- IN UINT8 PageCode\r
- );\r
-\r
-\r
-\r
-/**\r
- Function to submit SCSI request sense command.\r
-\r
- Submit SCSI request sense command with the SCSI requested packet specified by this\r
- SCSI command, TimeOut and SenseData, and then return the status of scsi unit execution.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
- \r
- If HostAdapterStatus is NULL, then ASSERT().\r
- \r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo A pointer to SCSI IO protocol.\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[in, out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
-\r
- @retval EFI_SUCCESS Command is executed successfully.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are\r
- too many SCSI Command Packets already queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by\r
- the SCSI initiator(i.e., SCSI Host Controller)\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiRequestSenseCommand (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- IN OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus\r
- );\r
-\r
-\r
-/**\r
- Function to submit read capacity command.\r
-\r
- Submit SCSI read capacity command with the SCSI request packet specified by this SCSI \r
- command and the input parameters, and then return the status of Scsi unit execution.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
-\r
- If HostAdapterStatus is NULL, then ASSERT().\r
-\r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- If DataLength is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo A pointer to SCSI IO protocol.\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[in, out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
- @param[out] DataBuffer A pointer to a data buffer.\r
- @param[in, out] DataLength The length of data buffer.\r
- @param[in] PMI Partial medium indicator.\r
-\r
- @retval EFI_SUCCESS Command is executed successfully.\r
- @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could\r
- not be transferred. The actual number of bytes transferred is returned in DataLength.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many \r
- SCSI Command Packets already queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by \r
- the SCSI initiator(i.e., SCSI Host Controller)\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiReadCapacityCommand (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- IN OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus,\r
- OUT VOID *DataBuffer,\r
- IN OUT UINT32 *DataLength,\r
- IN BOOLEAN PMI\r
- );\r
-\r
-\r
-/**\r
- Function to submit read 10 command.\r
-\r
- Submit SCSI read (10) command with the SCSI request packet specified by this SCSI command \r
- and the input parameters, and then return the status of Scsi unit execution.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
-\r
- If HostAdapterStatus is NULL, then ASSERT().\r
-\r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- If DataLength is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo A pointer to SCSI IO protocol.\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[in, out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
- @param[out] DataBuffer Read 10 command data.\r
- @param[in, out] DataLength The length of data buffer.\r
- @param[in] StartLba The start address of LBA.\r
- @param[in] SectorSize The sector size.\r
-\r
- @retval EFI_SUCCESS Command is executed successfully.\r
- @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could\r
- not be transferred. The actual number of bytes transferred is returned in DataLength.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many \r
- SCSI Command Packets already queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by \r
- the SCSI initiator(i.e., SCSI Host Controller)\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiRead10Command (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- IN OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus,\r
- OUT VOID *DataBuffer,\r
- IN OUT UINT32 *DataLength,\r
- IN UINT32 StartLba,\r
- IN UINT32 SectorSize\r
- );\r
-\r
-\r
-/**\r
- Function to submit SCSI write 10 command.\r
-\r
- Submit SCSI write (10) command with the SCSI request packet specified by this SCSI command and the\r
- input parameters, and then return the status of Scsi unit execution.\r
-\r
- If SenseDataLength is NULL, then ASSERT().\r
-\r
- If HostAdapterStatus is NULL, then ASSERT().\r
-\r
- If TargetStatus is NULL, then ASSERT().\r
-\r
- If DataLength is NULL, then ASSERT().\r
-\r
- @param[in] ScsiIo SCSI IO Protocol to use\r
- @param[in] Timeout The length of timeout period.\r
- @param[in] SenseData A pointer to output sense data.\r
- @param[in, out] SenseDataLength The length of output sense data.\r
- @param[out] HostAdapterStatus The status of Host Adapter.\r
- @param[out] TargetStatus The status of the target.\r
- @param[out] DataBuffer A pointer to a data buffer.\r
- @param[in, out] DataLength The length of data buffer.\r
- @param[in] StartLba The start address of LBA.\r
- @param[in] SectorSize The sector size.\r
-\r
- @retval EFI_SUCCESS Command is executed successfully.\r
- @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could\r
- not be transferred. The actual number of bytes transferred is returned in DataLength.\r
- @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many \r
- SCSI Command Packets already queued.\r
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
- @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by \r
- the SCSI initiator(i.e., SCSI Host Controller)\r
- @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
- @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ScsiWrite10Command (\r
- IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
- IN UINT64 Timeout,\r
- IN VOID *SenseData,\r
- IN OUT UINT8 *SenseDataLength,\r
- OUT UINT8 *HostAdapterStatus,\r
- OUT UINT8 *TargetStatus,\r
- OUT VOID *DataBuffer,\r
- IN OUT UINT32 *DataLength,\r
- IN UINT32 StartLba,\r
- IN UINT32 SectorSize\r
- );\r
-\r
-\r
-#endif\r
--- /dev/null
+/** @file\r
+ Common Libarary for SCSI\r
+\r
+ Copyright (c) 2006 - 2007, 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
+\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
+#ifndef _SCSI_LIB_H_\r
+#define _SCSI_LIB_H_\r
+\r
+#include <Protocol/ScsiIo.h>\r
+\r
+//\r
+// the time unit is 100ns, since the SCSI I/O defines timeout in 100ns unit.\r
+//\r
+#define EFI_SCSI_STALL_1_MICROSECOND 10\r
+#define EFI_SCSI_STALL_1_MILLISECOND 10000\r
+#define EFI_SCSI_STALL_1_SECOND 10000000\r
+\r
+///\r
+/// this macro cannot be directly used by the gBS->Stall(),\r
+/// since the value output by this macro is in 100ns unit,\r
+/// not 1us unit (1us = 1000ns)\r
+///\r
+#define EFI_SCSI_STALL_SECONDS(a) ((a) * EFI_SCSI_STALL_1_SECOND)\r
+\r
+\r
+/**\r
+ Function test the ready status of the SCSI unit.\r
+\r
+ Submit SCSI test unit ready command with SCSI request packet specified by this scsi command, TimeOut\r
+ and SenseData, then get the status of the target Scsi unit.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+\r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo A pointer to SCSI IO protocol.\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+\r
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
+ but the entire DataBuffer could not be transferred.\r
+ The actual number of bytes transferred is returned\r
+ in InTransferLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because \r
+ there are too many SCSI Command Packets already \r
+ queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send \r
+ the SCSI Request Packet.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet\r
+ is not supported by the SCSI initiator(i.e., SCSI \r
+ Host Controller).\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI \r
+ Request Packet to execute.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiTestUnitReadyCommand (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus\r
+ );\r
+\r
+\r
+/**\r
+ Function to submit SCSI inquiry command.\r
+\r
+ Submit SCSI inquiry command with the SCSI request packet specified by this SCSI command and input\r
+ parameters, then return the status of Scsi unit execution.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+\r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ If InquiryDataLength is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo SCSI IO Protocol to use\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[in, out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+ @param[in, out] InquiryDataBuffer A pointer to inquiry data buffer.\r
+ @param[in, out] InquiryDataLength The length of inquiry data buffer.\r
+ @param[in] EnableVitalProductData Boolean to enable Vital Product Data.\r
+\r
+ @retval EFI_SUCCESS Command is executed successfully.\r
+ @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
+ but the entire DataBuffer could not be transferred.\r
+ The actual number of bytes transferred is returned\r
+ in TransferLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because \r
+ there are too many SCSI Command Packets already \r
+ queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send \r
+ the SCSI Request Packet.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet\r
+ is not supported by the SCSI initiator(i.e., SCSI \r
+ Host Controller).\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI \r
+ Request Packet to execute.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiInquiryCommand (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus,\r
+ IN OUT VOID *InquiryDataBuffer,\r
+ IN OUT UINT32 *InquiryDataLength,\r
+ IN BOOLEAN EnableVitalProductData\r
+ );\r
+\r
+\r
+/**\r
+ Function to submit SCSI mode sense 10 command.\r
+\r
+ Submit SCSI Mode Sense (10) command with the SCSI request packet specified by this SCSI command and\r
+ the input parameters, then return the status of Scsi unit execution.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+\r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ If DataLength is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo A pointer to SCSI IO protocol.\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[in, out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+ @param[in] DataBuffer A pointer to input data buffer.\r
+ @param[in, out] DataLength The length of input data buffer.\r
+ @param[in] DBDField The DBD Field (Optional).\r
+ @param[in] PageControl Page Control.\r
+ @param[in] PageCode Page code.\r
+\r
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
+ but the entire DataBuffer could not be transferred.\r
+ The actual number of bytes transferred is returned\r
+ in TransferLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because \r
+ there are too many SCSI Command Packets already \r
+ queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send \r
+ the SCSI Request Packet.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL. \r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet\r
+ is not supported by the SCSI initiator(i.e., SCSI \r
+ Host Controller).\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI \r
+ Request Packet to execute.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiModeSense10Command (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus,\r
+ IN VOID *DataBuffer,\r
+ IN OUT UINT32 *DataLength,\r
+ IN UINT8 DBDField, OPTIONAL\r
+ IN UINT8 PageControl,\r
+ IN UINT8 PageCode\r
+ );\r
+\r
+\r
+\r
+/**\r
+ Function to submit SCSI request sense command.\r
+\r
+ Submit SCSI request sense command with the SCSI requested packet specified by this\r
+ SCSI command, TimeOut and SenseData, and then return the status of scsi unit execution.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+ \r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+ \r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo A pointer to SCSI IO protocol.\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[in, out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+\r
+ @retval EFI_SUCCESS Command is executed successfully.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are\r
+ too many SCSI Command Packets already queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by\r
+ the SCSI initiator(i.e., SCSI Host Controller)\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiRequestSenseCommand (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus\r
+ );\r
+\r
+\r
+/**\r
+ Function to submit read capacity command.\r
+\r
+ Submit SCSI read capacity command with the SCSI request packet specified by this SCSI \r
+ command and the input parameters, and then return the status of Scsi unit execution.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+\r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ If DataLength is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo A pointer to SCSI IO protocol.\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[in, out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+ @param[out] DataBuffer A pointer to a data buffer.\r
+ @param[in, out] DataLength The length of data buffer.\r
+ @param[in] PMI Partial medium indicator.\r
+\r
+ @retval EFI_SUCCESS Command is executed successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could\r
+ not be transferred. The actual number of bytes transferred is returned in DataLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many \r
+ SCSI Command Packets already queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by \r
+ the SCSI initiator(i.e., SCSI Host Controller)\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiReadCapacityCommand (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus,\r
+ OUT VOID *DataBuffer,\r
+ IN OUT UINT32 *DataLength,\r
+ IN BOOLEAN PMI\r
+ );\r
+\r
+\r
+/**\r
+ Function to submit read 10 command.\r
+\r
+ Submit SCSI read (10) command with the SCSI request packet specified by this SCSI command \r
+ and the input parameters, and then return the status of Scsi unit execution.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+\r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ If DataLength is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo A pointer to SCSI IO protocol.\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[in, out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+ @param[out] DataBuffer Read 10 command data.\r
+ @param[in, out] DataLength The length of data buffer.\r
+ @param[in] StartLba The start address of LBA.\r
+ @param[in] SectorSize The sector size.\r
+\r
+ @retval EFI_SUCCESS Command is executed successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could\r
+ not be transferred. The actual number of bytes transferred is returned in DataLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many \r
+ SCSI Command Packets already queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by \r
+ the SCSI initiator(i.e., SCSI Host Controller)\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiRead10Command (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus,\r
+ OUT VOID *DataBuffer,\r
+ IN OUT UINT32 *DataLength,\r
+ IN UINT32 StartLba,\r
+ IN UINT32 SectorSize\r
+ );\r
+\r
+\r
+/**\r
+ Function to submit SCSI write 10 command.\r
+\r
+ Submit SCSI write (10) command with the SCSI request packet specified by this SCSI command and the\r
+ input parameters, and then return the status of Scsi unit execution.\r
+\r
+ If SenseDataLength is NULL, then ASSERT().\r
+\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+\r
+ If TargetStatus is NULL, then ASSERT().\r
+\r
+ If DataLength is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo SCSI IO Protocol to use\r
+ @param[in] Timeout The length of timeout period.\r
+ @param[in] SenseData A pointer to output sense data.\r
+ @param[in, out] SenseDataLength The length of output sense data.\r
+ @param[out] HostAdapterStatus The status of Host Adapter.\r
+ @param[out] TargetStatus The status of the target.\r
+ @param[out] DataBuffer A pointer to a data buffer.\r
+ @param[in, out] DataLength The length of data buffer.\r
+ @param[in] StartLba The start address of LBA.\r
+ @param[in] SectorSize The sector size.\r
+\r
+ @retval EFI_SUCCESS Command is executed successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could\r
+ not be transferred. The actual number of bytes transferred is returned in DataLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many \r
+ SCSI Command Packets already queued.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by \r
+ the SCSI initiator(i.e., SCSI Host Controller)\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.\r
+ @retval EFI_INVALID_PARAMETER ScsiIo is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiWrite10Command (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN VOID *SenseData,\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus,\r
+ OUT VOID *DataBuffer,\r
+ IN OUT UINT32 *DataLength,\r
+ IN UINT32 StartLba,\r
+ IN UINT32 SectorSize\r
+ );\r
+\r
+\r
+#endif\r