Fix scsi send_packet to parse words a little endian
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
parent
5368c5a4a2
commit
6984ca0592
@ -117,7 +117,7 @@ impl ATABus {
|
||||
}
|
||||
|
||||
let mut secondary_bus = ATABus::new(ATA_BUS_SECONDARY);
|
||||
|
||||
|
||||
unsafe {
|
||||
secondary_bus.dcr.write(ATA_SRST);
|
||||
primary_bus.dcr.write(ATA_INTERRUPT_DISABLE);
|
||||
@ -190,7 +190,7 @@ impl ATABus {
|
||||
self.wait_packet_request();
|
||||
|
||||
for i in (0..raw_packet.len()).step_by(2) {
|
||||
let word = u16::from_be_bytes(raw_packet[i..i+2].try_into().unwrap());
|
||||
let word = u16::from_le_bytes(raw_packet[i..i+2].try_into().unwrap());
|
||||
unsafe {
|
||||
self.data.write(word);
|
||||
}
|
||||
@ -251,4 +251,4 @@ impl SCSIPacket {
|
||||
fn serialize(&self) -> heapless::Vec<u8, 12> {
|
||||
to_vec(&self).unwrap()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user