Struct ScsiIoScsiRequestPacket

Source
#[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 be NULL.
  • If not NULL, the buffer must meet the alignment requirement specified by the IoAlign field in the EFI_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 be NULL.
  • If not NULL, the buffer must meet the alignment requirement specified by the IoAlign field in the EFI_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 be NULL.
  • 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 the IoAlign field in the EFI_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

Source§

fn clone(&self) -> ScsiIoScsiRequestPacket

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScsiIoScsiRequestPacket

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ScsiIoScsiRequestPacket

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.