From: kettenis Date: Thu, 22 Jul 2010 21:40:46 +0000 (+0000) Subject: Give the drive a little bit more time to complete the STANDBY IMMED command. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6693db94ffe43ac143fe91f14260cf560f8b4e30;p=openbsd Give the drive a little bit more time to complete the STANDBY IMMED command. The ATA spec seems to suggest it may take up to 30s. This seems a little bit long. To quote Theo: "by that time some drives have probably parked their own heads in boredom". But it shouldn't hurt unless your drive is seriously broken. Makes some laptops suspend much better. ok deraadt@ --- diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index e8be252b23a..1f85ff6e461 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.86 2010/07/22 18:10:37 mlarkin Exp $ */ +/* $OpenBSD: wd.c,v 1.87 2010/07/22 21:40:46 kettenis Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -1231,7 +1231,7 @@ wd_standby(struct wd_softc *wd, int flags) } else { wdc_c.flags = AT_WAIT; } - wdc_c.timeout = 1000; /* 1s timeout */ + wdc_c.timeout = 30000; /* 30s timeout */ if (wdc_exec_command(wd->drvp, &wdc_c) != WDC_COMPLETE) { printf("%s: standby command didn't complete\n", wd->sc_dev.dv_xname);