]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: increase timeout in wait_drive_not_busy()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 20 Jun 2008 18:53:33 +0000 (20:53 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 20 Jun 2008 18:53:33 +0000 (20:53 +0200)
Some ATAPI devices take longer than the current max timeout value to
become ready (i.e. TEAC DV-W28ECW takes 6 ms) so increase the timeout
value to 10 ms.

This fixes kernel.org bugzilla bug #10887:
http://bugzilla.kernel.org/show_bug.cgi?id=10887

Reported-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-taskfile.c

index 0c908ca3ff79654ac3d0bf8fe500f32658d84016..ab545ffa15490367ed013bd9e04a674a1f2df76f 100644 (file)
@@ -225,10 +225,10 @@ static u8 wait_drive_not_busy(ide_drive_t *drive)
        u8 stat;
 
        /*
-        * Last sector was transfered, wait until drive is ready.
-        * This can take up to 10 usec, but we will wait max 1 ms.
+        * Last sector was transfered, wait until device is ready.  This can
+        * take up to 6 ms on some ATAPI devices, so we will wait max 10 ms.
         */
-       for (retries = 0; retries < 100; retries++) {
+       for (retries = 0; retries < 1000; retries++) {
                stat = ide_read_status(drive);
 
                if (stat & BUSY_STAT)