[PATCH] 2.6.9 ide-probe and indentical old disks.

From: Paul Gortmaker
Date: Thu Dec 16 2004 - 18:33:55 EST



It seems that some old disks don't have a serial number, but ide-probe
now compares serial numbers to determine if a slave disk is just a
ghost image of the primary. This breaks old hardware that has two
identical model disks which don't report serial numbers. The fix seems
as simple as checking for zero length serial numbers before comparing.

Signed-off-by: Paul Gortmaker <p_gortmaker@xxxxxxxxx>



--- linux-386/drivers/ide/ide-probe.c~ Mon Oct 18 17:56:33 2004
+++ linux-386/drivers/ide/ide-probe.c Thu Dec 9 14:15:56 2004
@@ -740,6 +740,8 @@ static void probe_hwif(ide_hwif_t *hwif)
if (strcmp(hwif->drives[0].id->model, drive->id->model) == 0 &&
/* Don't do this for noprobe or non ATA */
strcmp(drive->id->model, "UNKNOWN") &&
+ /* Or for old drives without a serial # */
+ strlen(drive->id->serial_no) &&
/* And beware of confused Maxtor drives that go "M0000000000"
"The SN# is garbage in the ID block..." [Eric] */
strncmp(drive->id->serial_no, "M0000000000000000000", 20) &&



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/