2/8 Backport recent 2.6 IDE updates to 2.4.x
PATCH 1/1 2/8 Backport recent 2.6 IDE updates to 2.4.x
This patch fixes some accounting problems where values were unconditionally incremented,
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
drivers/ide/ide-disk.c +4 -3
@@ -1029,8 +1029,8 @@ | ((args.tfRegister[ IDE_HCYL_OFFSET] ) << 16) | ((args.tfRegister[IDE_LCYL_OFFSET ] ) <<8 ) | ((args.tfRegister[IDE_SECTOR_OFFSET ] )); + addr++;/* since the return value is (maxlba - 1), we add 1 */ } - addr++;/* since the return value is (maxlba - 1), we add 1 */ return addr; }
@@ -1057,8 +1057,8 @@ ((args.tfRegister[IDE_LCYL_OFFSET ])<<8 ) | (args.tfRegister[IDE_SECTOR_OFFSET ]); addr = ((__u64 )high <<24 ) | low; + addr++;/* since the return value is (maxlba - 1), we add 1 */ } - addr++;/* since the return value is (maxlba - 1), we add 1 */ return addr; }
@@ -1089,8 +1089,8 @@ | ((args.tfRegister[ IDE_HCYL_OFFSET] ) << 16) | ((args.tfRegister[IDE_LCYL_OFFSET ] ) <<8 ) | ((args.tfRegister[IDE_SECTOR_OFFSET ] )); + addr_set++; } - addr_set++;return addr_set; }
@@ -1124,6 +1124,7 @@ ((args.tfRegister[IDE_LCYL_OFFSET ])<<8 ) | (args.tfRegister[IDE_SECTOR_OFFSET ]); addr_set = ((__u64 )high <<24 ) | low; + addr_set++; }return addr_set; }