bug fix to restore access to low order LBA
PATCH 1/1 bug fix to restore access to low order LBA
I discovered this after running a custom kernel with support for ATA read verify command, when I encountered sector errors and saw them reported in syslog and on an ATA analyzer but when I tried to read the LBA registers I got zero... problem was this one liner, which applies to 2.6.8-rc2 as well as 2.6.7, and I've also included a 2.4.26 version.
Thanks,
BR
drivers/ide/ide.c +3 -0
@@ -409,6 +409,9 @@u32 low =read_24 (drive); hwif->OUTB (drive->ctl|0x80 ,IDE_CONTROL_REG ); high =read_24 (drive); +/* Restore access to low order LBA */ +OUT_BYTE (drive->ctl&0x7F , +IDE_CONTROL_REG ); sectors = ((u64 )high <<24 ) | low; printk(", LBAsect=%llu, high=%d, low=%d",
drivers/ide/ide.c +3 -0
@@ -409,6 +409,9 @@u32 low =ide_read_24 (drive); hwif->OUTB (drive->ctl|0x80 ,IDE_CONTROL_REG ); high =ide_read_24 (drive); +/* Restore access to low order LBA */ + hwif->OUTB (drive->ctl&0x7F , +IDE_CONTROL_REG ); sectors = ((u64 )high <<24 ) | low; printk(", LBAsect=%llu, high=%d, low=%d",