#[repr(C)]pub struct ScsiIoScsiRequestPacket {
pub timeout: u64,
pub in_data_buffer: *mut c_void,
pub out_data_buffer: *mut c_void,
pub sense_data: *mut c_void,
pub cdb: *mut c_void,
pub in_transfer_length: u32,
pub out_transfer_length: u32,
pub cdb_length: u8,
pub data_direction: ScsiIoDataDirection,
pub host_adapter_status: ScsiIoHostAdapterStatus,
pub target_status: ScsiIoTargetStatus,
pub sense_data_length: u8,
}
Fields§
§timeout: u64
The timeout, in 100 ns units, for the execution of this SCSI Request Packet.
A timeout
value of 0 indicates that the function will wait indefinitely for
the execution to complete. If the execution time exceeds the specified timeout
(greater than 0), the function will return EFI_TIMEOUT
.
in_data_buffer: *mut c_void
A pointer to the data buffer for reading from the device in read and bidirectional commands.
- For write and non-data commands where
in_transfer_length
is 0, this field is optional and may beNULL
. - If not
NULL
, the buffer must meet the alignment requirement specified by theIoAlign
field in theEFI_EXT_SCSI_PASS_THRU_MODE
structure.
out_data_buffer: *mut c_void
A pointer to the data buffer for writing to the device in write and bidirectional commands.
- For read and non-data commands where
out_transfer_length
is 0, this field is optional and may beNULL
. - If not
NULL
, the buffer must meet the alignment requirement specified by theIoAlign
field in theEFI_EXT_SCSI_PASS_THRU_MODE
structure.
sense_data: *mut c_void
A pointer to the sense data generated during execution of the SCSI Request Packet.
- If
sense_data_length
is 0, this field is optional and may beNULL
. - It is recommended to allocate a buffer of at least 252 bytes to ensure the entire sense data can be captured.
- If not
NULL
, the buffer must meet the alignment requirement specified by theIoAlign
field in theEFI_EXT_SCSI_PASS_THRU_MODE
structure.
cdb: *mut c_void
A pointer to the Command Data Block (CDB) buffer to be sent to the SCSI device.
The CDB contains the SCSI command to be executed by the device.
in_transfer_length: u32
The input size (in bytes) of the in_data_buffer
, and the number of bytes transferred on output.
- On input: Specifies the size of
in_data_buffer
. - On output: Specifies the number of bytes successfully transferred.
- If the size exceeds the controller’s capability, no data is transferred, the field is updated
with the number of transferable bytes, and
EFI_BAD_BUFFER_SIZE
is returned.
out_transfer_length: u32
The input size (in bytes) of the out_data_buffer
, and the number of bytes transferred on output.
- On input: Specifies the size of
out_data_buffer
. - On output: Specifies the number of bytes successfully transferred.
- If the size exceeds the controller’s capability, no data is transferred, the field is updated
with the number of transferable bytes, and
EFI_BAD_BUFFER_SIZE
is returned.
cdb_length: u8
The length (in bytes) of the Command Data Block (CDB).
Standard values for CDB length are typically 6, 10, 12, or 16 bytes. Other values are possible for variable-length CDBs.
data_direction: ScsiIoDataDirection
The direction of data transfer for the SCSI Request Packet.
host_adapter_status: ScsiIoHostAdapterStatus
The status of the host adapter when the SCSI Request Packet was executed.
target_status: ScsiIoTargetStatus
The status of the target device when the SCSI Request Packet was executed.
sense_data_length: u8
The size (in bytes) of the sense_data
buffer on input, and the number of bytes written on output.
- On input: Specifies the size of the
sense_data
buffer. - On output: Specifies the number of bytes written to the buffer.
Trait Implementations§
Source§impl Clone for ScsiIoScsiRequestPacket
impl Clone for ScsiIoScsiRequestPacket
Source§fn clone(&self) -> ScsiIoScsiRequestPacket
fn clone(&self) -> ScsiIoScsiRequestPacket
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more