scsilib.h
来自「EFI BIOS是Intel提出的下一代的BIOS标准。这里上传的Edk源代码是」· C头文件 代码 · 共 410 行 · 第 1/2 页
H
410 行
OUT UINT8 *TargetStatus
)
/*++
Routine Description:
Function to submit SCSI request sense command.
Arguments:
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.
Returns:
EFI_SUCCESS - The status of the unit is tested successfully.
EFI_WARN_BUFFER_TOO_SMALL - The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
in TransferLength.
EFI_NOT_READY - The SCSI Request Packet could not be sent because
there are too many SCSI Command Packets already
queued.
EFI_DEVICE_ERROR - A device error occurred while attempting to send
the SCSI Request Packet.
EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
EFI_UNSUPPORTED - The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
Request Packet to execute.
--*/
;
//
// Commands for direct access command
//
EFI_STATUS
SubmitReadCapacityCommand (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT VOID *DataBuffer,
IN OUT UINT32 *DataLength,
IN BOOLEAN PMI
)
/*++
Routine Description:
Function to submit read capacity command.
Arguments:
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.
DataBuffer - A pointer to a data buffer.
DataLength - The length of data buffer.
PMI - Partial medium indicator.
Returns:
EFI_SUCCESS - The status of the unit is tested successfully.
EFI_WARN_BUFFER_TOO_SMALL - The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
in TransferLength.
EFI_NOT_READY - The SCSI Request Packet could not be sent because
there are too many SCSI Command Packets already
queued.
EFI_DEVICE_ERROR - A device error occurred while attempting to send
the SCSI Request Packet.
EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
EFI_UNSUPPORTED - The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
Request Packet to execute.
--*/
;
EFI_STATUS
SubmitRead10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT VOID *DataBuffer,
IN OUT UINT32 *DataLength,
IN UINT32 StartLba,
IN UINT32 SectorSize
)
/*++
Routine Description:
Function to submit read 10 command.
Arguments:
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.
DataBuffer - A pointer to a data buffer.
DataLength - The length of data buffer.
StartLba - The start address of LBA.
SectorSize - The sector size.
Returns:
EFI_SUCCESS - The status of the unit is tested successfully.
EFI_WARN_BUFFER_TOO_SMALL - The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
in TransferLength.
EFI_NOT_READY - The SCSI Request Packet could not be sent because
there are too many SCSI Command Packets already
queued.
EFI_DEVICE_ERROR - A device error occurred while attempting to send
the SCSI Request Packet.
EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
EFI_UNSUPPORTED - The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
Request Packet to execute.
--*/
;
EFI_STATUS
SubmitWrite10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN VOID *SenseData,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT VOID *DataBuffer,
IN OUT UINT32 *DataLength,
IN UINT32 StartLba,
IN UINT32 SectorSize
)
/*++
Routine Description:
Function to submit SCSI write 10 command.
Arguments:
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.
DataBuffer - A pointer to a data buffer.
DataLength - The length of data buffer.
StartLba - The start address of LBA.
SectorSize - The sector size.
Returns:
EFI_SUCCESS - The status of the unit is tested successfully.
EFI_WARN_BUFFER_TOO_SMALL - The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
in TransferLength.
EFI_NOT_READY - The SCSI Request Packet could not be sent because
there are too many SCSI Command Packets already
queued.
EFI_DEVICE_ERROR - A device error occurred while attempting to send
the SCSI Request Packet.
EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
EFI_UNSUPPORTED - The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller).
EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
Request Packet to execute.
--*/
;
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?