From 39ce9246791af0055ef0ec94cf71d4d722108ff1 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 8 Aug 2001 21:01:14 +0000 Subject: New timeouts. --- sys/arch/sun3/dev/if_ie.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/arch/sun3') diff --git a/sys/arch/sun3/dev/if_ie.c b/sys/arch/sun3/dev/if_ie.c index b4dc881f3af..05695c65edb 100644 --- a/sys/arch/sun3/dev/if_ie.c +++ b/sys/arch/sun3/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.13 2001/02/20 19:39:34 mickey Exp $ */ +/* $OpenBSD: if_ie.c,v 1.14 2001/08/08 21:01:13 miod Exp $ */ /* $NetBSD: if_ie.c,v 1.15 1996/10/30 00:24:33 gwr Exp $ */ /*- @@ -1215,6 +1215,7 @@ command_and_wait(sc, cmd, pcmd, mask) volatile struct ie_cmd_common *cc = pcmd; volatile struct ie_sys_ctl_block *scb = sc->scb; volatile int timedout = 0; + struct timeout chan_tmo; extern int hz; scb->ie_command = (u_short)cmd; @@ -1234,7 +1235,8 @@ command_and_wait(sc, cmd, pcmd, mask) * .369 seconds, which we round up to .4. */ - timeout(chan_attn_timeout, (caddr_t)&timedout, 2 * hz / 5); + timeout_set(&chan_tmo, chan_attn_timeout, (caddr_t)&timedout); + timeout_add(&chan_tmo, 2 * hz / 5); /* * Now spin-lock waiting for status. This is not a very nice @@ -1247,7 +1249,7 @@ command_and_wait(sc, cmd, pcmd, mask) if ((cc->ie_cmd_status & mask) || timedout) break; - untimeout(chan_attn_timeout, (caddr_t)&timedout); + timeout_del(&chan_tmo); return timedout; } else { -- cgit v1.2.3