@@ -80,17 +80,75 @@ newtype_enum! {
8080#[ derive( Debug , Copy , Clone ) ]
8181#[ repr( C ) ]
8282pub struct ScsiIoScsiRequestPacket {
83+ /// The timeout, in 100 ns units, for the execution of this SCSI Request Packet.
84+ ///
85+ /// A `timeout` value of 0 indicates that the function will wait indefinitely for
86+ /// the execution to complete. If the execution time exceeds the specified `timeout`
87+ /// (greater than 0), the function will return `EFI_TIMEOUT`.
8388 pub timeout : u64 ,
89+
90+ /// A pointer to the data buffer for reading from the device in read and bidirectional commands.
91+ ///
92+ /// - For write and non-data commands where `in_transfer_length` is 0, this field is optional and may be `NULL`.
93+ /// - If not `NULL`, the buffer must meet the alignment requirement specified by the `IoAlign` field
94+ /// in the `EFI_EXT_SCSI_PASS_THRU_MODE` structure.
8495 pub in_data_buffer : * mut c_void ,
96+
97+ /// A pointer to the data buffer for writing to the device in write and bidirectional commands.
98+ ///
99+ /// - For read and non-data commands where `out_transfer_length` is 0, this field is optional and may be `NULL`.
100+ /// - If not `NULL`, the buffer must meet the alignment requirement specified by the `IoAlign` field
101+ /// in the `EFI_EXT_SCSI_PASS_THRU_MODE` structure.
85102 pub out_data_buffer : * mut c_void ,
103+
104+ /// A pointer to the sense data generated during execution of the SCSI Request Packet.
105+ ///
106+ /// - If `sense_data_length` is 0, this field is optional and may be `NULL`.
107+ /// - It is recommended to allocate a buffer of at least 252 bytes to ensure the entire sense data can be captured.
108+ /// - If not `NULL`, the buffer must meet the alignment requirement specified by the `IoAlign` field
109+ /// in the `EFI_EXT_SCSI_PASS_THRU_MODE` structure.
86110 pub sense_data : * mut c_void ,
111+
112+ /// A pointer to the Command Data Block (CDB) buffer to be sent to the SCSI device.
113+ ///
114+ /// The CDB contains the SCSI command to be executed by the device.
87115 pub cdb : * mut c_void ,
116+
117+ /// The input size (in bytes) of the `in_data_buffer`, and the number of bytes transferred on output.
118+ ///
119+ /// - On input: Specifies the size of `in_data_buffer`.
120+ /// - On output: Specifies the number of bytes successfully transferred.
121+ /// - If the size exceeds the controller's capability, no data is transferred, the field is updated
122+ /// with the number of transferable bytes, and `EFI_BAD_BUFFER_SIZE` is returned.
88123 pub in_transfer_length : u32 ,
124+
125+ /// The input size (in bytes) of the `out_data_buffer`, and the number of bytes transferred on output.
126+ ///
127+ /// - On input: Specifies the size of `out_data_buffer`.
128+ /// - On output: Specifies the number of bytes successfully transferred.
129+ /// - If the size exceeds the controller's capability, no data is transferred, the field is updated
130+ /// with the number of transferable bytes, and `EFI_BAD_BUFFER_SIZE` is returned.
89131 pub out_transfer_length : u32 ,
132+
133+ /// The length (in bytes) of the Command Data Block (CDB).
134+ ///
135+ /// Standard values for CDB length are typically 6, 10, 12, or 16 bytes. Other values are possible
136+ /// for variable-length CDBs.
90137 pub cdb_length : u8 ,
138+
139+ /// The direction of data transfer for the SCSI Request Packet.
91140 pub data_direction : ScsiIoDataDirection ,
141+
142+ /// The status of the host adapter when the SCSI Request Packet was executed.
92143 pub host_adapter_status : ScsiIoHostAdapterStatus ,
144+
145+ /// The status of the target device when the SCSI Request Packet was executed.
93146 pub target_status : ScsiIoTargetStatus ,
147+
148+ /// The size (in bytes) of the `sense_data` buffer on input, and the number of bytes written on output.
149+ ///
150+ /// - On input: Specifies the size of the `sense_data` buffer.
151+ /// - On output: Specifies the number of bytes written to the buffer.
94152 pub sense_data_length : u8 ,
95153}
96154
0 commit comments