Mikko Rapeli wrote:
diff -ru linux-2.6.22.1/drivers/ide/ide-disk.c linux-2.6.22.1.new/drivers/ide/ide-disk.c
--- linux-2.6.22.1/drivers/ide/ide-disk.c 2007-07-10 21:56:30.000000000 +0300
+++ linux-2.6.22.1.new/drivers/ide/ide-disk.c 2007-08-01 22:59:47.000000000 +0300
@@ -502,6 +502,17 @@
capacity, sectors_to_MB(capacity),
set_max, sectors_to_MB(set_max));
+ if ((set_max % 2)
I hope gcc will convert this to (set_max & 1) but it wouldn't hurt to code
this explicitly.
&& (set_max == capacity + 1)) {
Wait, isn't set_max an address of a last sector, and isn't capacity a
sector count? Shouldn't it be (set_max == capacity)?
+ printk(KERN_INFO "Old drive detected, keeping current capacity.\n");
+ return;
+ }
+
if (lba48)
set_max = idedisk_set_max_address_ext(drive, set_max);
else
MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html