summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/tc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-02-03 19:40:42 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-02-03 19:40:42 +0000
commit022c063a204e86613ef52bc28b25378832f047bc (patch)
tree12282ae644f4eb733122885080f36dfb823b6711 /sys/arch/alpha/tc
parent95eefa8f8dea89bf92b5b36d9d7b1d259c99a842 (diff)
New timeouts.
Diffstat (limited to 'sys/arch/alpha/tc')
-rw-r--r--sys/arch/alpha/tc/asc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/alpha/tc/asc.c b/sys/arch/alpha/tc/asc.c
index 3401ad99a3e..3a5df7269c0 100644
--- a/sys/arch/alpha/tc/asc.c
+++ b/sys/arch/alpha/tc/asc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc.c,v 1.1 2000/07/05 21:50:38 ericj Exp $ */
+/* $OpenBSD: asc.c,v 1.2 2001/02/03 19:40:41 art Exp $ */
/* $NetBSD: esp.c,v 1.26 1996/12/05 01:39:40 cgd Exp $ */
#ifdef __sparc__
@@ -584,12 +584,12 @@ espinit(sc, doreset)
sc->sc_state = ESP_CLEANING;
if ((ecb = sc->sc_nexus) != NULL) {
ecb->xs->error = XS_DRIVER_STUFFUP;
- untimeout(esp_timeout, ecb);
+ timeout_del(&ecb->xs->stimeout);
esp_done(sc, ecb);
}
while ((ecb = sc->nexus_list.tqh_first) != NULL) {
ecb->xs->error = XS_DRIVER_STUFFUP;
- untimeout(esp_timeout, ecb);
+ timeout_del(&ecb->xs->stimeout);
esp_done(sc, ecb);
}
}
@@ -830,6 +830,7 @@ esp_scsi_cmd(xs)
/* Initialize ecb */
ecb->xs = xs;
ecb->timeout = xs->timeout;
+ timeout_set(&ecb->xs->stimeout, esp_timeout, ecb);
if (xs->flags & SCSI_RESET) {
ecb->flags |= ECB_RESET;
@@ -1918,7 +1919,8 @@ if (sc->sc_flags & ESP_ICCS) printf("[[esp: BUMMER]]");
/* On our first connection, schedule a timeout. */
if ((ecb->xs->flags & SCSI_POLL) == 0)
- timeout(esp_timeout, ecb, (ecb->timeout * hz) / 1000);
+ timeout_add(&ecb->xs->stimeout,
+ (ecb->timeout * hz) / 1000);
sc->sc_state = ESP_CONNECTED;
break;
@@ -2090,7 +2092,7 @@ reset:
return 1;
finish:
- untimeout(esp_timeout, ecb);
+ timeout_del(&ecb->xs->stimeout);
esp_done(sc, ecb);
goto out;
@@ -2125,8 +2127,7 @@ esp_abort(sc, ecb)
* Reschedule timeout. First, cancel a queued timeout (if any)
* in case someone decides to call esp_abort() from elsewhere.
*/
- untimeout(esp_timeout, ecb);
- timeout(esp_timeout, ecb, (ecb->timeout * hz) / 1000);
+ timeout_add(&ecb->xs->stimeout, (ecb->timeout * hz) / 1000);
} else {
esp_dequeue(sc, ecb);
TAILQ_INSERT_HEAD(&sc->ready_list, ecb, chain);