From a24a8769bf564a02a3b8f43e2b6347f28a7688be Mon Sep 17 00:00:00 2001 From: Toguy <35764192+ToguyC@users.noreply.github.com> Date: Sun, 14 Aug 2022 18:23:22 +0200 Subject: [PATCH] ATA: Sata LBA2 wrong address According to [this osdev page](https://wiki.osdev.org/ATA_PIO_Mode#Detecting_device_types), the address for the CH register (LBA2) for the SATA drives should be 0xC3 instead of 0x3C. --- src/sys/ata.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys/ata.rs b/src/sys/ata.rs index db10147b..41149169 100644 --- a/src/sys/ata.rs +++ b/src/sys/ata.rs @@ -244,7 +244,7 @@ impl Bus { match (self.lba1(), self.lba2()) { (0x00, 0x00) => Ok(IdentifyResponse::Ata([(); 256].map(|_| { self.read_data() }))), (0x14, 0xEB) => Ok(IdentifyResponse::Atapi), - (0x3C, 0x3C) => Ok(IdentifyResponse::Sata), + (0x3C, 0xC3) => Ok(IdentifyResponse::Sata), (_, _) => Err(()), } }