summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-08-08 21:15:43 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-08-08 21:15:43 +0000
commit12e85eee298cce876b06ef553c034508489cf39f (patch)
treea5652d5089dc28a319ade20f59e95672c24729e0 /sys
parente820d07c43e86ba980cac671cf07f003ef5ba2fe (diff)
New timeouts. I've been running this since almost a whole year.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/ncr5380sbc.c7
-rw-r--r--sys/dev/ic/ncr5380var.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/ncr5380sbc.c b/sys/dev/ic/ncr5380sbc.c
index e6758678970..2f92efb7420 100644
--- a/sys/dev/ic/ncr5380sbc.c
+++ b/sys/dev/ic/ncr5380sbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr5380sbc.c,v 1.10 2001/06/24 20:59:39 fgsch Exp $ */
+/* $OpenBSD: ncr5380sbc.c,v 1.11 2001/08/08 21:15:42 miod Exp $ */
/* $NetBSD: ncr5380sbc.c,v 1.13 1996/10/13 01:37:25 christos Exp $ */
/*
@@ -802,7 +802,7 @@ finish:
/* Clear our pointers to the request. */
sc->sc_current = NULL;
sc->sc_matrix[sr->sr_target][sr->sr_lun] = NULL;
- untimeout(ncr5380_cmd_timeout, sr);
+ timeout_del(&sc->sc_timeout);
/* Make the request free. */
sr->sr_xs = NULL;
@@ -1041,7 +1041,8 @@ next_job:
if ((sr->sr_flags & SR_IMMED) == 0) {
i = (xs->timeout * hz) / 1000;
NCR_TRACE("sched: set timeout=%d\n", i);
- timeout(ncr5380_cmd_timeout, sr, i);
+ timeout_set(&sc->sc_timeout, ncr5380_cmd_timeout, sr);
+ timeout_add(&sc->sc_timeout, i);
}
have_nexus:
diff --git a/sys/dev/ic/ncr5380var.h b/sys/dev/ic/ncr5380var.h
index 31f8416463c..03e9a5be64e 100644
--- a/sys/dev/ic/ncr5380var.h
+++ b/sys/dev/ic/ncr5380var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr5380var.h,v 1.5 1997/09/11 01:07:13 kstailey Exp $ */
+/* $OpenBSD: ncr5380var.h,v 1.6 2001/08/08 21:15:42 miod Exp $ */
/* $NetBSD: ncr5380var.h,v 1.6 1996/05/10 18:04:06 gwr Exp $ */
/*
@@ -167,6 +167,7 @@ struct ncr5380_softc {
u_char sc_imess[NCR_MAX_MSG_LEN];
u_char *sc_imp; /* Incoming message pointer */
+ struct timeout sc_timeout;
};
void ncr5380_init __P((struct ncr5380_softc *));