diff options
author | 2000-07-07 19:00:47 +0000 | |
---|---|---|
committer | 2000-07-07 19:00:47 +0000 | |
commit | 37e1af6103285ee5876caa8fb337a1f4085a2506 (patch) | |
tree | 011ef61c312d4a59449310836c24a3985994e213 | |
parent | pass CFLAGS to build process, so that optimization happens; js3guj@gold.ocn.ne.jp (diff) | |
download | wireguard-openbsd-37e1af6103285ee5876caa8fb337a1f4085a2506.tar.xz wireguard-openbsd-37e1af6103285ee5876caa8fb337a1f4085a2506.zip |
Pick up change that went into NetBSD side- I pooched the timeout
calculation. Now it's better.
-rw-r--r-- | sys/dev/ic/isp_openbsd.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/ic/isp_openbsd.c b/sys/dev/ic/isp_openbsd.c index e882bb8ed01..900af61ac92 100644 --- a/sys/dev/ic/isp_openbsd.c +++ b/sys/dev/ic/isp_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_openbsd.c,v 1.10 2000/07/06 05:31:48 mjacob Exp $ */ +/* $OpenBSD: isp_openbsd.c,v 1.11 2000/07/07 19:00:47 mjacob Exp $ */ /* * Platform (OpenBSD) dependent common attachment code for Qlogic adapters. * @@ -59,7 +59,23 @@ static void isp_wdog __P((void *)); static void isp_requeue(void *); static void isp_internal_restart(void *); -#define _XT(xs) ((((xs)->timeout + 999)/1000) + (2 * hz)) +/* + * Set a timeout for the watchdogging of a command. + * + * The dimensional analysis is + * + * milliseconds * (seconds/millisecond) * (ticks/second) = ticks + * + * = + * + * (milliseconds / 1000) * hz = ticks + * + * + * For timeouts less than 1 second, we'll get zero. Because of this, and + * because we want to establish *our* timeout to be longer than what the + * firmware might do, we just add 3 seconds at the back end. + */ +#define _XT(xs) ((((xs)->timeout/1000) * hz) + (3 * hz)) struct cfdriver isp_cd = { NULL, "isp", DV_DULL |