summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-07-22 21:40:47 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-07-22 21:40:47 +0000
commit367f611a49467eeab01859732cc81b2c3918a4ed (patch)
treeaca54ac92cb1415244a8cc4ab4e745284c45a803
parentb5837218ed6b795b599f483d6d6da442723a8aad (diff)
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@
-rw-r--r--sys/dev/ata/wd.c4
1 files 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);