diff -rauN linux-2.4.19-rc1/drivers/ide/ide-cd.c linux-2.4.19-rc1-idefix/drivers/ide/ide-cd.c --- linux-2.4.19-rc1/drivers/ide/ide-cd.c Fri Jul 12 17:58:14 2002 +++ linux-2.4.19-rc1-idefix/drivers/ide/ide-cd.c Fri Jul 19 17:43:58 2002 @@ -3057,6 +3057,8 @@ struct cdrom_info *info; int failed = 0; + byte stat; + MOD_INC_USE_COUNT; while ((drive = ide_scan_devices (ide_cdrom, ide_cdrom_driver.name, NULL, failed++)) != NULL) { /* skip drives that we were told to ignore */ @@ -3070,6 +3072,17 @@ printk("ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name); continue; } + + /* ide-cd probe workaround by Kristian Peters */ + stat = GET_STAT(); + ide_dump_status (drive, "drive status", stat); + + if (stat & BUSY_STAT) { + printk("ide-cd: Probing for drive %s failed. Device is busy !\n", drive->name); + continue; /* 208 = 0xd0 (BUSY), 192 = 0xc0 (BUSY) */ + } + /* end */ + info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL); if (info == NULL) { printk ("%s: Can't allocate a cdrom structure\n", drive->name);