File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ impl AtaPassThru {
4242 /// The [`AtaPassThruMode`] structure containing configuration details of the protocol.
4343 #[ must_use]
4444 pub fn mode ( & self ) -> AtaPassThruMode {
45- unsafe { ( * self . 0 . mode ) . clone ( ) }
45+ let mut mode = unsafe { ( * self . 0 . mode ) . clone ( ) } ;
46+ mode. io_align = mode. io_align . max ( 1 ) ; // 0 and 1 is the same, says UEFI spec
47+ mode
4648 }
4749
4850 /// Retrieves the I/O buffer alignment required by this SCSI channel.
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ impl NvmePassThru {
4949 /// An instance of [`NvmePassThruMode`] describing the NVMe controller's capabilities.
5050 #[ must_use]
5151 pub fn mode ( & self ) -> NvmePassThruMode {
52- unsafe { ( * self . 0 . mode ) . clone ( ) }
52+ let mut mode = unsafe { ( * self . 0 . mode ) . clone ( ) } ;
53+ mode. io_align = mode. io_align . max ( 1 ) ; // 0 and 1 is the same, says UEFI spec
54+ mode
5355 }
5456
5557 /// Retrieves the alignment requirements for I/O buffers.
You can’t perform that action at this time.
0 commit comments