From 6693db94ffe43ac143fe91f14260cf560f8b4e30 Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 22 Jul 2010 21:40:46 +0000 Subject: [PATCH] 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@ --- sys/dev/ata/wd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.20.1