Skip to contentSkip to conversation

2.6.9 ide-probe and indentical old disks.

PATCH In review Paul Gortmaker 2 participants 2 messages Dec 16, 2004 – Dec 17, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.6.9 ide-probe and indentical old disks.

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.

drivers/ide/ide-probe.c renamed from drivers/ide/ide-probe.c~ +2 -0
@@ -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) &&
#1 lore raw
Quoted 5 lines · Paul Gortmaker

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.

Already fixed