[ide] fix ide_get_error_location() for LBA28

Higher bits (16-23) of the address were ignored.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent b4232896
...@@ -238,9 +238,10 @@ u64 ide_get_error_location(ide_drive_t *drive, char *args) ...@@ -238,9 +238,10 @@ u64 ide_get_error_location(ide_drive_t *drive, char *args)
high = ide_read_24(drive); high = ide_read_24(drive);
} else { } else {
u8 cur = HWIF(drive)->INB(IDE_SELECT_REG); u8 cur = HWIF(drive)->INB(IDE_SELECT_REG);
if (cur & 0x40) if (cur & 0x40) {
high = cur & 0xf;
low = (hcyl << 16) | (lcyl << 8) | sect; low = (hcyl << 16) | (lcyl << 8) | sect;
else { } else {
low = hcyl * drive->head * drive->sect; low = hcyl * drive->head * drive->sect;
low += lcyl * drive->sect; low += lcyl * drive->sect;
low += sect - 1; low += sect - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment