-/*++\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
- \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
-// The package level header files this module uses\r
-//\r
-#include <PiDxe.h>\r
+/** @file\r
+ UEFI SCSI Library implementation\r
+\r
+ Copyright (c) 2006 - 2007, Intel Corporation.<BR>\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
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-//\r
-// The Library classes this module consumes\r
-//\r
+\r
+#include <PiDxe.h>\r
#include <Library/ScsiLib.h>\r
#include <Library/BaseMemoryLib.h>\r
\r
#include <IndustryStandard/scsi.h>\r
\r
+\r
+/**
+ Function test the ready status of the SCSI unit.\r
+
+ @param[in] ScsiIo A pointer to SCSI IO protocol.
+ @param[in] Timeout The length of timeout period.
+ @param[out] SenseData A pointer to output sense data.
+ @param[out] SenseDataLength The length of output sense data.
+ @param[out] HostAdapterStatus The status of Host Adapter.
+ @param[out] TargetStatus The status of the target.
+
+ @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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitTestUnitReadyCommand (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
OUT UINT8 *HostAdapterStatus,\r
OUT UINT8 *TargetStatus\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function tests the ready status of SCSI unit.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r
return Status;\r
}\r
\r
+\r
+/**
+ Function to submit SCSI inquiry command.\r
+
+ @param[in] ScsiIo SCSI IO Protocol to use
+ @param[in] Timeout The length of timeout period.
+ @param[out] SenseData A pointer to output sense data.
+ @param[in,out] SenseDataLength The length of output sense data.
+ @param[out] HostAdapterStatus The status of Host Adapter.
+ @param[out] TargetStatus The status of the target.
+ @param[in,out] InquirydataBuffer A pointer to inquiry data buffer.
+ @param[in,out] InquiryDataLength The length of inquiry data buffer.
+ @param[in] EnableVitalProductData Boolean to enable Vital Product Data.
+
+ @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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitInquiryCommand (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
IN OUT UINT32 *InquiryDataLength,\r
IN BOOLEAN EnableVitalProductData\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function to submit SCSI inquiry command.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
- InquiryDataBuffer - A pointer to inquiry data buffer.\r
- InquiryDataLength - The length of inquiry data buffer.\r
- EnableVitalProductData - Boolean to enable Vital Product Data.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r
return Status;\r
}\r
\r
+\r
+/**
+ Function to submit SCSI mode sense 10 command.\r
+
+ @param[in] ScsiIo A pointer to SCSI IO protocol.
+ @param[in] Timeout The length of timeout period.
+ @param[out] SenseData A pointer to output sense data.
+ @param[in,out] SenseDataLength The length of output sense data.
+ @param[out] HostAdapterStatus The status of Host Adapter.
+ @param[out] TargetStatus The status of the target.
+ @param[in] DataBuffer A pointer to input data buffer.
+ @param[in,out] DataLength The length of input data buffer.
+ @param[in] DBDField The DBD Field (Optional).
+ @param[in] PageControl Page Control.
+ @param[in] PageCode Page code.
+
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL 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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitModeSense10Command (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
IN UINT8 PageControl,\r
IN UINT8 PageCode\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function to submit SCSI mode sense 10 command.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
- DataBuffer - A pointer to input data buffer.\r
- DataLength - The length of input data buffer.\r
- DBDField - The DBD Field (Optional).\r
- PageControl - Page Control.\r
- PageCode - Page code.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- EFI_WARN_BUFFER_TOO_SMALL - 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r
return Status;\r
}\r
\r
+\r
+/**
+ Function to submit SCSI request sense command.\r
+ ScsiIo - A pointer to SCSI IO protocol.\r
+ Timeout - The length of timeout period.\r
+ SenseData - A pointer to output sense data.\r
+ SenseDataLength - The length of output sense data.\r
+ HostAdapterStatus - The status of Host Adapter.\r
+ TargetStatus - The status of the target.\r
+
+ @param[in] ScsiIo SCSI IO Protocol to use
+ @param[in] Timeout TODO:
+ @param[out] SenseData TODO:
+ @param[in,out] SenseDataLength TODO:
+ @param[out] HostAdapterStatus TODO:
+ @param[out] TargetStatus TODO:
+
+ @retval EFI_SUCCESS Valid data returned
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL 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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitRequestSenseCommand (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
OUT UINT8 *HostAdapterStatus,\r
OUT UINT8 *TargetStatus\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function to submit SCSI request sense command.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- EFI_WARN_BUFFER_TOO_SMALL - 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r
return Status;\r
}\r
\r
+\r
+/**
+ Function to submit read capacity command.\r
+\r
+ @param[in] ScsiIo A pointer to SCSI IO protocol.
+ @param[in] Timeout The length of timeout period.
+ @param[out] SenseData A pointer to output sense data.
+ @param[in,out] SenseDataLength The length of output sense data.
+ @param[out] HostAdapterStatus The status of Host Adapter.
+ @param[out] TargetStatus The status of the target.
+ @param[out] DataBuffer A pointer to a data buffer.
+ @param[in,out] DataLength The length of data buffer.
+ @param[in] PMI Partial medium indicator.
+
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL 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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitReadCapacityCommand (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
IN OUT UINT32 *DataLength,\r
IN BOOLEAN PMI\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function to submit read capacity command.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
- DataBuffer - A pointer to a data buffer.\r
- DataLength - The length of data buffer.\r
- PMI - Partial medium indicator.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- EFI_WARN_BUFFER_TOO_SMALL - 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r
return Status;\r
}\r
\r
+\r
+/**
+ Function to submit read 10 command.\r
+
+ @param[in] ScsiIo A pointer to SCSI IO protocol.
+ @param[in] Timeout The length of timeout period.
+ @param[out] SenseData A pointer to output sense data.
+ @param[in,out] SenseDataLength The length of output sense data.
+ @param[out] HostAdapterStatus The status of Host Adapter.
+ @param[out] TargetStatus The status of the target.
+ @param[out] DataBuffer Read 10 command data.
+ @param[in,out] DataLength The length of data buffer.
+ @param[in] StartLba The start address of LBA.
+ @param[in] SectorSize The sector size.
+
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL 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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitRead10Command (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
IN UINT32 StartLba,\r
IN UINT32 SectorSize\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function to submit read 10 command.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
- DataBuffer - A pointer to a data buffer.\r
- DataLength - The length of data buffer.\r
- StartLba - The start address of LBA.\r
- SectorSize - The sector size.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- EFI_WARN_BUFFER_TOO_SMALL - 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r
return Status;\r
}\r
\r
+\r
+/**
+ Function to submit SCSI write 10 command.\r
+
+ @param[in] ScsiIo SCSI IO Protocol to use
+ @param[in] Timeout The length of timeout period.
+ @param[out] SenseData A pointer to output sense data.
+ @param[in,out] SenseDataLength The length of output sense data.
+ @param[out] HostAdapterStatus The status of Host Adapter.
+ @param[out] TargetStatus The status of the target.
+ @param[out] DataBuffer A pointer to a data buffer.
+ @param[in,out] DataLength The length of data buffer.
+ @param[in] StartLba The start address of LBA.
+ @param[in] SectorSize The sector size.
+
+ @retval EFI_SUCCESS The status of the unit is tested successfully.\r
+ @retval EFI_WARN_BUFFER_TOO_SMALL 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 The contents of CommandPacket are invalid. \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
EFI_STATUS\r
SubmitWrite10Command (\r
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
IN UINT32 StartLba,\r
IN UINT32 SectorSize\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Function to submit SCSI write 10 command.\r
-\r
-Arguments:\r
- ScsiIo - A pointer to SCSI IO protocol.\r
- Timeout - The length of timeout period.\r
- SenseData - A pointer to output sense data.\r
- SenseDataLength - The length of output sense data.\r
- HostAdapterStatus - The status of Host Adapter.\r
- TargetStatus - The status of the target.\r
- DataBuffer - A pointer to a data buffer.\r
- DataLength - The length of data buffer.\r
- StartLba - The start address of LBA.\r
- SectorSize - The sector size.\r
-\r
-Returns:\r
-\r
- Returns:\r
- EFI_SUCCESS - The status of the unit is tested successfully.\r
- EFI_WARN_BUFFER_TOO_SMALL - 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
- EFI_NOT_READY - The SCSI Request Packet could not be sent because \r
- there are too many SCSI Command Packets already \r
- queued.\r
- EFI_DEVICE_ERROR - A device error occurred while attempting to send \r
- the SCSI Request Packet.\r
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid. \r
- 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
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI \r
- Request Packet to execute.\r
-\r
---*/\r
{\r
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;\r
UINT64 Lun;\r