From: Alan Cox Some devices don't decode master/slave - notably PCMCIA adapters. Unfortunately for us some also do, which makes it hard to guess if we should probe the slave. This patch fixes the problem by probing the slave and then using the model and serial information to spot undecoded pairs. An additional check is done to catch pairs of pre ATA devices just in case. Signed-off-by: Andrew Morton --- 25-akpm/drivers/ide/ide-probe.c | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -puN drivers/ide/ide-probe.c~fix-ide-probe-double-detection drivers/ide/ide-probe.c --- 25/drivers/ide/ide-probe.c~fix-ide-probe-double-detection Tue Jul 27 15:56:18 2004 +++ 25-akpm/drivers/ide/ide-probe.c Tue Jul 27 15:56:19 2004 @@ -749,6 +749,16 @@ static void probe_hwif(ide_hwif_t *hwif) ide_drive_t *drive = &hwif->drives[unit]; drive->dn = (hwif->channel ? 2 : 0) + unit; (void) probe_for_drive(drive); + if (drive->present && hwif->present && unit == 1) + { + if(strcmp(hwif->drives[0].id->model, drive->id->model) == 0 && + strcmp(drive->id->model, "UNKNOWN") && /* Don't do this for non ATA or for noprobe */ + strncmp(hwif->drives[0].id->serial_no, drive->id->serial_no, 20) == 0) + { + printk(KERN_WARNING "ide-probe: ignoring undecoded slave\n"); + drive->present = 0; + } + } if (drive->present && !hwif->present) { hwif->present = 1; if (hwif->chipset != ide_4drives || _