From 0945aa322a54e4c29240036ad9165a92e76f8d71 Mon Sep 17 00:00:00 2001 From: Richard Wohlbold Date: Wed, 14 Jun 2017 11:25:40 +0200 Subject: [PATCH] Fixed error in ata.cpp Writing two times to the Low port instead of writing to the low and the high port --- src/drivers/ata.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/ata.cpp b/src/drivers/ata.cpp index 48f07e4..e9e6e6e 100644 --- a/src/drivers/ata.cpp +++ b/src/drivers/ata.cpp @@ -80,7 +80,7 @@ void AdvancedTechnologyAttachment::Read28(common::uint32_t sectorNum, int count) sectorCountPort.Write(1); lbaLowPort.Write( sectorNum & 0x000000FF ); lbaMidPort.Write( (sectorNum & 0x0000FF00) >> 8); - lbaLowPort.Write( (sectorNum & 0x00FF0000) >> 16 ); + lbaHiPort.Write( (sectorNum & 0x00FF0000) >> 16 ); commandPort.Write(0x20); uint8_t status = commandPort.Read(); @@ -129,7 +129,7 @@ void AdvancedTechnologyAttachment::Write28(common::uint32_t sectorNum, common::u sectorCountPort.Write(1); lbaLowPort.Write( sectorNum & 0x000000FF ); lbaMidPort.Write( (sectorNum & 0x0000FF00) >> 8); - lbaLowPort.Write( (sectorNum & 0x00FF0000) >> 16 ); + lbaHiPort.Write( (sectorNum & 0x00FF0000) >> 16 ); commandPort.Write(0x30); @@ -172,4 +172,4 @@ void AdvancedTechnologyAttachment::Flush() return; } } - \ No newline at end of file +