
From: Marcello Maggioni <hayarms@gmail.com>

Problem: Some drives (NEC 3500 , TDK 1616N , Mad-dog MD-16XDVD9, RICOH
MP5163DA , Memorex DVD9 drive and IO-DATA's too for sure) , if a CD/DVD is
inserted into the tray when the system is booted and if before the OS
bootup the BIOS checked for the presence of a bootable CD/DVD into the
drive , during the IDE probe phase the drive may result busy and remain so
for the next 25/30 seconds .  This cause the drive to be skipped during the
booting phase and not begin usable until the next reboot (if the reboot
goes well and the drive doesn't timeout again ).

Solution: Rising the timeout time from 10 seconds to 35 seconds (during
these 35 seconds every drive should wake up for sure according to the tests
I've done).

Alan said: "Looks good to me although you should probably also apply the
patches to not probe secondary ISA IDE slots on PCI boards at the same time or
one or two folks may now get a 2 minute boot."

Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/ide/ide-probe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/ide/ide-probe.c~timeout-at-boottime-with-nec3500a-and-others-when-inserted-a-cd-in-it drivers/ide/ide-probe.c
--- 25/drivers/ide/ide-probe.c~timeout-at-boottime-with-nec3500a-and-others-when-inserted-a-cd-in-it	2005-05-23 19:41:20.000000000 -0700
+++ 25-akpm/drivers/ide/ide-probe.c	2005-05-23 19:41:20.000000000 -0700
@@ -697,13 +697,13 @@ static int wait_hwif_ready(ide_hwif_t *h
 	SELECT_DRIVE(&hwif->drives[0]);
 	hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
 	mdelay(2);
-	rc = ide_wait_not_busy(hwif, 10000);
+	rc = ide_wait_not_busy(hwif, 35000);
 	if (rc)
 		return rc;
 	SELECT_DRIVE(&hwif->drives[1]);
 	hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
 	mdelay(2);
-	rc = ide_wait_not_busy(hwif, 10000);
+	rc = ide_wait_not_busy(hwif, 35000);
 
 	/* Exit function with master reselected (let's be sane) */
 	SELECT_DRIVE(&hwif->drives[0]);
_
