summaryrefslogtreecommitdiff
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-07-07 10:43:47 +0000
committerkn <kn@cvs.openbsd.org>2019-07-07 10:43:47 +0000
commit8eedfca03302e3dd6935b0edee927dc13c41d7dc (patch)
tree0c156fa3ea18e90c0cf4d609f844f211a3ad2f08 /sys/dev/ata
parente9645b5b61df0fd69fceb3be77381a6329d66796 (diff)
Use timeout_add_msec(9)
RECOVERYTIME is twice per second, so sleep for 500 milliseconds and reflect the unit to be clear. OK patrick
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/wd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index aa095ac1109..eb308fef6ad 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.125 2017/12/30 23:08:29 guenther Exp $ */
+/* $OpenBSD: wd.c,v 1.126 2019/07/07 10:43:46 kn Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -94,7 +94,7 @@
#define WDIORETRIES_SINGLE 4 /* number of retries before single-sector */
#define WDIORETRIES 5 /* number of retries before giving up */
-#define RECOVERYTIME hz/2 /* time to wait before retrying a cmd */
+#define RECOVERYTIME_MSEC 500 /* time to wait before retrying a cmd */
#define DEBUG_INTR 0x01
#define DEBUG_XFERS 0x02
@@ -555,7 +555,8 @@ retry:
wd->sc_wdc_bio.blkdone, wd->sc_dk.dk_label);
if (wd->retries++ < WDIORETRIES) {
printf(", retrying\n");
- timeout_add(&wd->sc_restart_timeout, RECOVERYTIME);
+ timeout_add_msec(&wd->sc_restart_timeout,
+ RECOVERYTIME_MSEC);
return;
}
printf("\n");