diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-01-22 06:29:21 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-01-22 06:29:21 +0000 |
commit | f419b091e2e4e6d35a4d4488d6065686e31ed59d (patch) | |
tree | cf370fabc31294c2a08fa5e13839685f3b8c1fc0 /sys/dev | |
parent | faef4d639781b4b15e4f6ce0f45944e0000154cf (diff) |
Initialize xs->stimeout, even when polling
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/adw.c | 8 |
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); |