summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2001-01-22 06:29:20 +0000
committerkrw <krw@openbsd.org>2001-01-22 06:29:20 +0000
commit3af13cbf13814e55db49f9ef21b64bc5c88c29c0 (patch)
treeb059de4b2040fe934d991665701d865e7d4146d4
parentput more manual pages in (diff)
downloadwireguard-openbsd-3af13cbf13814e55db49f9ef21b64bc5c88c29c0.tar.xz
wireguard-openbsd-3af13cbf13814e55db49f9ef21b64bc5c88c29c0.zip
Initialize xs->stimeout, even when polling
-rw-r--r--sys/dev/ic/adw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index 832f173052f..c7dfa33372c 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.13 2001/01/15 16:27:53 krw Exp $ */
+/* $OpenBSD: adw.c,v 1.14 2001/01/22 06:29:20 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -462,10 +462,10 @@ adw_queue_ccb(sc, ccb, retry)
TAILQ_REMOVE(&sc->sc_waiting_ccb, ccb, chain);
TAILQ_INSERT_TAIL(&sc->sc_pending_ccb, ccb, chain);
- if ((ccb->xs->flags & SCSI_POLL) == 0) {
- timeout_set(&ccb->xs->stimeout, adw_timeout, ccb);
+ /* ALWAYS initialize stimeout, lest it contain garbage! */
+ timeout_set(&ccb->xs->stimeout, adw_timeout, ccb);
+ if ((ccb->xs->flags & SCSI_POLL) == 0)
timeout_add(&ccb->xs->stimeout, (ccb->timeout * hz) / 1000);
- }
}
return(errcode);