#[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: u64The 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_voidA pointer to the data buffer for reading from the device in read and bidirectional commands.
- For write and non-data commands where
in_transfer_lengthis 0, this field is optional and may beNULL. - If not
NULL, the buffer must meet the alignment requirement specified by theIoAlignfield in theEFI_EXT_SCSI_PASS_THRU_MODEstructure.
out_data_buffer: *mut c_voidA pointer to the data buffer for writing to the device in write and bidirectional commands.
- For read and non-data commands where
out_transfer_lengthis 0, this field is optional and may beNULL. - If not
NULL, the buffer must meet the alignment requirement specified by theIoAlignfield in theEFI_EXT_SCSI_PASS_THRU_MODEstructure.
sense_data: *mut c_voidA pointer to the sense data generated during execution of the SCSI Request Packet.
- If
sense_data_lengthis 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 theIoAlignfield in theEFI_EXT_SCSI_PASS_THRU_MODEstructure.
cdb: *mut c_voidA 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: u32The 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_SIZEis returned.
out_transfer_length: u32The 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_SIZEis returned.
cdb_length: u8The 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: ScsiIoDataDirectionThe direction of data transfer for the SCSI Request Packet.
host_adapter_status: ScsiIoHostAdapterStatusThe status of the host adapter when the SCSI Request Packet was executed.
target_status: ScsiIoTargetStatusThe status of the target device when the SCSI Request Packet was executed.
sense_data_length: u8The 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_databuffer. - 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 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ScsiIoScsiRequestPacket
Auto Trait Implementations§
impl !Send for ScsiIoScsiRequestPacket
impl !Sync for ScsiIoScsiRequestPacket
impl Freeze for ScsiIoScsiRequestPacket
impl RefUnwindSafe for ScsiIoScsiRequestPacket
impl Unpin for ScsiIoScsiRequestPacket
impl UnsafeUnpin for ScsiIoScsiRequestPacket
impl UnwindSafe for ScsiIoScsiRequestPacket
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)