sync the comments of scsilib library class with Mde Library Spec.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6081 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2008-10-07 09:23:48 +00:00
parent d69107aadc
commit b91d5eca6c
2 changed files with 310 additions and 258 deletions

View File

@ -35,6 +35,15 @@
/** /**
Function test the ready status of the SCSI unit. Function test the ready status of the SCSI unit.
Submit SCSI test unit ready command with SCSI request packet specified by this scsi command, TimeOut
and SenseData, then get the status of the target Scsi unit.
If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[out] SenseData A pointer to output sense data. @param[out] SenseData A pointer to output sense data.
@ -52,7 +61,7 @@
queued. queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI is not supported by the SCSI initiator(i.e., SCSI
Host Controller). Host Controller).
@ -75,6 +84,17 @@ ScsiTestUnitReadyCommand (
/** /**
Function to submit SCSI inquiry command. Function to submit SCSI inquiry command.
Submit SCSI inquiry command with the SCSI request packet specified by this SCSI command and input
parameters, then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT().
If InquiryDataLength is NULL, then ASSERT().
@param[in] ScsiIo SCSI IO Protocol to use @param[in] ScsiIo SCSI IO Protocol to use
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@ -85,7 +105,7 @@ ScsiTestUnitReadyCommand (
@param[in out] InquiryDataLength The length of inquiry data buffer. @param[in out] InquiryDataLength The length of inquiry data buffer.
@param[in] EnableVitalProductData Boolean to enable Vital Product Data. @param[in] EnableVitalProductData Boolean to enable Vital Product Data.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred. but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned The actual number of bytes transferred is returned
@ -95,7 +115,7 @@ ScsiTestUnitReadyCommand (
queued. queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI is not supported by the SCSI initiator(i.e., SCSI
Host Controller). Host Controller).
@ -121,6 +141,17 @@ ScsiInquiryCommand (
/** /**
Function to submit SCSI mode sense 10 command. Function to submit SCSI mode sense 10 command.
Submit SCSI Mode Sense (10) command with the SCSI request packet specified by this SCSI command and
the input parameters, then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@ -143,7 +174,7 @@ ScsiInquiryCommand (
queued. queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI is not supported by the SCSI initiator(i.e., SCSI
Host Controller). Host Controller).
@ -171,37 +202,31 @@ ScsiModeSense10Command (
/** /**
Function to submit SCSI request sense command. Function to submit SCSI request sense command.
ScsiIo - A pointer to SCSI IO protocol.
Timeout - The length of timeout period.
SenseData - A pointer to output sense data.
SenseDataLength - The length of output sense data.
HostAdapterStatus - The status of Host Adapter.
TargetStatus - The status of the target.
@param[in] ScsiIo SCSI IO Protocol to use Submit SCSI request sense command with the SCSI requested packet specified by this
@param[in] Timeout TODO: SCSI command, TimeOut and SenseData, and then return the status of scsi unit execution.
@param[in] SenseData TODO:
@param[in out] SenseDataLength TODO:
@param[out] HostAdapterStatus TODO:
@param[out] TargetStatus TODO:
@retval EFI_SUCCESS Valid data returned If SenseDataLength is NULL, then ASSERT().
@retval EFI_SUCCESS The status of the unit is tested successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, If HostAdapterStatus is NULL, then ASSERT().
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned If TargetStatus is NULL, then ASSERT().
in TransferLength.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @param[in] ScsiIo A pointer to SCSI IO protocol.
there are too many SCSI Command Packets already @param[in] Timeout The length of timeout period.
queued. @param[in] SenseData A pointer to output sense data.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @param[in out] SenseDataLength The length of output sense data.
the SCSI Request Packet. @param[out] HostAdapterStatus The status of Host Adapter.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. @param[out] TargetStatus The status of the target.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI @retval EFI_SUCCESS Command is executed successfully.
Host Controller). @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI too many SCSI Command Packets already queued.
Request Packet to execute. @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
@retval EFI_INVALID_PARAMETER ScsiIo is NULL.
**/ **/
EFI_STATUS EFI_STATUS
@ -219,6 +244,17 @@ ScsiRequestSenseCommand (
/** /**
Function to submit read capacity command. Function to submit read capacity command.
Submit SCSI read capacity command with the SCSI request packet specified by this SCSI
command and the input parameters, and then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@ -229,22 +265,16 @@ ScsiRequestSenseCommand (
@param[in out] DataLength The length of data buffer. @param[in out] DataLength The length of data buffer.
@param[in] PMI Partial medium indicator. @param[in] PMI Partial medium indicator.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could
but the entire DataBuffer could not be transferred. not be transferred. The actual number of bytes transferred is returned in DataLength.
The actual number of bytes transferred is returned @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
in TransferLength. SCSI Command Packets already queued.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
there are too many SCSI Command Packets already @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
queued. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
the SCSI Request Packet. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS
@ -265,6 +295,17 @@ ScsiReadCapacityCommand (
/** /**
Function to submit read 10 command. Function to submit read 10 command.
Submit SCSI read (10) command with the SCSI request packet specified by this SCSI command
and the input parameters, and then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@ -276,22 +317,16 @@ ScsiReadCapacityCommand (
@param[in] StartLba The start address of LBA. @param[in] StartLba The start address of LBA.
@param[in] SectorSize The sector size. @param[in] SectorSize The sector size.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could
but the entire DataBuffer could not be transferred. not be transferred. The actual number of bytes transferred is returned in DataLength.
The actual number of bytes transferred is returned @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
in TransferLength. SCSI Command Packets already queued.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
there are too many SCSI Command Packets already @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
queued. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
the SCSI Request Packet. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS
@ -313,6 +348,17 @@ ScsiRead10Command (
/** /**
Function to submit SCSI write 10 command. Function to submit SCSI write 10 command.
Submit SCSI write (10) command with the SCSI request packet specified by this SCSI command and the
input parameters, and then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT().
@param[in] ScsiIo SCSI IO Protocol to use @param[in] ScsiIo SCSI IO Protocol to use
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@ -324,22 +370,16 @@ ScsiRead10Command (
@param[in] StartLba The start address of LBA. @param[in] StartLba The start address of LBA.
@param[in] SectorSize The sector size. @param[in] SectorSize The sector size.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could
but the entire DataBuffer could not be transferred. not be transferred. The actual number of bytes transferred is returned in DataLength.
The actual number of bytes transferred is returned @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
in InTransferLength. SCSI Command Packets already queued.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
there are too many SCSI Command Packets already @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
queued. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
the SCSI Request Packet. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -34,16 +34,20 @@
/** /**
Function test the ready status of the SCSI unit. Function test the ready status of the SCSI unit.
Submit SCSI test unit ready command with SCSI request packet specified by this scsi command, TimeOut
and SenseData, then get the status of the target Scsi unit.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in out] SenseData A pointer to the sense data that @param[out] SenseData A pointer to output sense data.
was generated by the execution of the SCSI Request Packet. @param[out] SenseDataLength The length of output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@ -57,7 +61,7 @@
queued. queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI is not supported by the SCSI initiator(i.e., SCSI
Host Controller). Host Controller).
@ -124,23 +128,29 @@ ScsiTestUnitReadyCommand (
/** /**
Function to submit SCSI inquiry command. Function to submit SCSI inquiry command.
Submit SCSI inquiry command with the SCSI request packet specified by this SCSI command and input
parameters, then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
If InquiryDataLength is NULL, then ASSERT(). If InquiryDataLength is NULL, then ASSERT().
@param[in] ScsiIo SCSI IO Protocol to use @param[in] ScsiIo SCSI IO Protocol to use
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On @param[in out] SenseDataLength The length of output sense data.
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@param[in] InquirydDtaBuffer A pointer to inquiry data buffer. @param[in out] InquirydataBuffer A pointer to inquiry data buffer.
@param[in out] InquiryDataLength The length of inquiry data buffer. @param[in out] InquiryDataLength The length of inquiry data buffer.
@param[in] EnableVitalProductData Boolean to enable Vital Product Data. @param[in] EnableVitalProductData Boolean to enable Vital Product Data.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred. but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned The actual number of bytes transferred is returned
@ -150,7 +160,7 @@ ScsiTestUnitReadyCommand (
queued. queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI is not supported by the SCSI initiator(i.e., SCSI
Host Controller). Host Controller).
@ -228,16 +238,22 @@ ScsiInquiryCommand (
/** /**
Function to submit SCSI mode sense 10 command. Function to submit SCSI mode sense 10 command.
Submit SCSI Mode Sense (10) command with the SCSI request packet specified by this SCSI command and
the input parameters, then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT(). If DataLength is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On @param[in out] SenseDataLength The length of output sense data.
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@param[in] DataBuffer A pointer to input data buffer. @param[in] DataBuffer A pointer to input data buffer.
@ -256,7 +272,7 @@ ScsiInquiryCommand (
queued. queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI is not supported by the SCSI initiator(i.e., SCSI
Host Controller). Host Controller).
@ -339,35 +355,31 @@ ScsiModeSense10Command (
/** /**
Function to submit SCSI request sense command. Function to submit SCSI request sense command.
Submit SCSI request sense command with the SCSI requested packet specified by this
SCSI command, TimeOut and SenseData, and then return the status of scsi unit execution.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On @param[in out] SenseDataLength The length of output sense data.
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@retval EFI_SUCCESS Valid data returned @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, too many SCSI Command Packets already queued.
but the entire DataBuffer could not be transferred. @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
The actual number of bytes transferred is returned @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
in TransferLength. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
there are too many SCSI Command Packets already @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
queued.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS
@ -430,38 +442,38 @@ ScsiRequestSenseCommand (
/** /**
Function to submit read capacity command. Function to submit read capacity command.
Submit SCSI read capacity command with the SCSI request packet specified by this SCSI
command and the input parameters, and then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT(). If DataLength is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On @param[in out] SenseDataLength The length of output sense data.
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@param[out] DataBuffer A pointer to a data buffer. @param[out] DataBuffer A pointer to a data buffer.
@param[in out] DataLength The length of data buffer. @param[in out] DataLength The length of data buffer.
@param[in] PMI Partial medium indicator. @param[in] PMI Partial medium indicator.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could
but the entire DataBuffer could not be transferred. not be transferred. The actual number of bytes transferred is returned in DataLength.
The actual number of bytes transferred is returned @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
in TransferLength. SCSI Command Packets already queued.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
there are too many SCSI Command Packets already @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
queued. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
the SCSI Request Packet. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS
@ -536,16 +548,22 @@ ScsiReadCapacityCommand (
/** /**
Function to submit read 10 command. Function to submit read 10 command.
Submit SCSI read (10) command with the SCSI request packet specified by this SCSI command
and the input parameters, and then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT(). If DataLength is NULL, then ASSERT().
@param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] ScsiIo A pointer to SCSI IO protocol.
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On @param[in out] SenseDataLength The length of output sense data.
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@param[out] DataBuffer Read 10 command data. @param[out] DataBuffer Read 10 command data.
@ -553,22 +571,16 @@ ScsiReadCapacityCommand (
@param[in] StartLba The start address of LBA. @param[in] StartLba The start address of LBA.
@param[in] SectorSize The sector size. @param[in] SectorSize The sector size.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could
but the entire DataBuffer could not be transferred. not be transferred. The actual number of bytes transferred is returned in DataLength.
The actual number of bytes transferred is returned @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
in TransferLength. SCSI Command Packets already queued.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
there are too many SCSI Command Packets already @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
queued. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
the SCSI Request Packet. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS
@ -642,16 +654,22 @@ ScsiRead10Command (
/** /**
Function to submit SCSI write 10 command. Function to submit SCSI write 10 command.
Submit SCSI write (10) command with the SCSI request packet specified by this SCSI command and the
input parameters, and then return the status of Scsi unit execution.
If SenseDataLength is NULL, then ASSERT(). If SenseDataLength is NULL, then ASSERT().
If HostAdapterStatus is NULL, then ASSERT(). If HostAdapterStatus is NULL, then ASSERT().
If TargetStatus is NULL, then ASSERT(). If TargetStatus is NULL, then ASSERT().
If DataLength is NULL, then ASSERT(). If DataLength is NULL, then ASSERT().
@param[in] ScsiIo SCSI IO Protocol to use @param[in] ScsiIo SCSI IO Protocol to use
@param[in] Timeout The length of timeout period. @param[in] Timeout The length of timeout period.
@param[in] SenseData A pointer to output sense data. @param[in] SenseData A pointer to output sense data.
@param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On @param[in out] SenseDataLength The length of output sense data.
output, the number of bytes written to the SenseData buffer.
@param[out] HostAdapterStatus The status of Host Adapter. @param[out] HostAdapterStatus The status of Host Adapter.
@param[out] TargetStatus The status of the target. @param[out] TargetStatus The status of the target.
@param[out] DataBuffer A pointer to a data buffer. @param[out] DataBuffer A pointer to a data buffer.
@ -659,22 +677,16 @@ ScsiRead10Command (
@param[in] StartLba The start address of LBA. @param[in] StartLba The start address of LBA.
@param[in] SectorSize The sector size. @param[in] SectorSize The sector size.
@retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_SUCCESS Command is executed successfully.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the entire DataBuffer could
but the entire DataBuffer could not be transferred. not be transferred. The actual number of bytes transferred is returned in DataLength.
The actual number of bytes transferred is returned @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
in InTransferLength. SCSI Command Packets already queued.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
there are too many SCSI Command Packets already @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
queued. the SCSI initiator(i.e., SCSI Host Controller)
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
the SCSI Request Packet. @retval EFI_INVALID_PARAMETER ScsiIo is NULL.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid, or ScsiIo is NULL.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute.
**/ **/
EFI_STATUS EFI_STATUS