summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-08-08 21:01:14 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-08-08 21:01:14 +0000
commit39ce9246791af0055ef0ec94cf71d4d722108ff1 (patch)
treefccdbf59b7e3036b397029bf728549167da5b77f
parent1cb889e80dbef97f48b4969feec35ecea8df5d2f (diff)
New timeouts.
-rw-r--r--sys/arch/mvme68k/dev/if_ie.c10
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c8
-rw-r--r--sys/arch/sun3/dev/if_ie.c8
3 files changed, 17 insertions, 9 deletions
diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c
index 4f74ffb0358..8dcd3dc76ba 100644
--- a/sys/arch/mvme68k/dev/if_ie.c
+++ b/sys/arch/mvme68k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.14 2001/06/10 14:54:42 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.15 2001/08/08 21:01:05 miod Exp $ */
/*-
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -1423,7 +1423,10 @@ 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;
+#if 0
+ struct timeout chan_tmo;
extern int hz;
+#endif
scb->ie_command = (u_short)cmd;
@@ -1442,7 +1445,8 @@ command_and_wait(sc, cmd, pcmd, mask)
* According to the packet driver, the minimum timeout should
* be .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);
#endif
/*
@@ -1456,7 +1460,7 @@ command_and_wait(sc, cmd, pcmd, mask)
if ((cc->ie_cmd_status & mask) || timedout)
break;
#if 0
- untimeout(chan_attn_timeout, (caddr_t)&timedout);
+ timeout_del(&chan_tmo);
#endif
return timedout;
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index b1c7d9a4368..05b495581ef 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.11 2001/06/08 08:09:13 art Exp $ */
+/* $OpenBSD: if_ie.c,v 1.12 2001/08/08 21:01:10 miod Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -1370,6 +1370,7 @@ command_and_wait(sc, cmd, pcmd, mask)
volatile struct ie_sys_ctl_block *scb = sc->scb;
volatile int timedout = 0;
#if 0
+ struct timeout chan_tmo;
extern int hz;
#endif
@@ -1390,7 +1391,8 @@ command_and_wait(sc, cmd, pcmd, mask)
* According to the packet driver, the minimum timeout should
* be .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, (caddr_t)&timedout, 2 * hz / 5);
#endif
/*
@@ -1404,7 +1406,7 @@ command_and_wait(sc, cmd, pcmd, mask)
if ((cc->ie_cmd_status & mask) || timedout)
break;
#if 0
- untimeout(chan_attn_timeout, (caddr_t)&timedout);
+ timeout_del(&chan_tmo);
#endif
return timedout;
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 {