]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
libata: change drive ready wait after hard reset to 5s
authorStuart Hayes <stuart_hayes@dell.com>
Wed, 4 Mar 2009 19:59:46 +0000 (11:59 -0800)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 5 Mar 2009 12:24:42 +0000 (07:24 -0500)
This fixes problems during resume with drives that take longer than 1s to
be ready.  The ATA-6 spec appears to allow 5 seconds for a drive to be
ready.

On one affected system, this patch changes "PM: resume devices took..."
message from 17 seconds to 4 seconds, and gets rid of a lot of ugly
timeout/error messages.

Without this patch, the libata code moves on after 1s, tries to send a
soft reset (which the drive doesn't see because it isn't ready) which also
times out, then an IDENTIFY command is sent to the drive which times out,
and finally the error handler will try to send another hard reset which
will finally get things working.

Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
include/linux/libata.h

index 5d87bc09a1f5bcef65f97a4c06599c8e9f7295b1..dd818c7decd7e39a64ec28ff3a79a8b828ca9c43 100644 (file)
@@ -275,7 +275,7 @@ enum {
         * advised to wait only for the following duration before
         * doing SRST.
         */
-       ATA_TMOUT_PMP_SRST_WAIT = 1000,
+       ATA_TMOUT_PMP_SRST_WAIT = 5000,
 
        /* ATA bus states */
        BUS_UNKNOWN             = 0,