summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-03 05:52:28 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-03 05:52:28 +0000
commit3475f58efe2baf5af013637895c21f954477325c (patch)
tree02597e5166473aac622e49dc09ebe408c5131eaf /sys/dev
parent81857c69fe6a7d53619d4d4319143db1ce33b8e0 (diff)
new timeouts
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_tl.c15
-rw-r--r--sys/dev/pci/if_tlreg.h3
2 files changed, 11 insertions, 7 deletions
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index 15e01aca1da..20c568085c2 100644
--- a/sys/dev/pci/if_tl.c
+++ b/sys/dev/pci/if_tl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tl.c,v 1.15 2001/01/25 03:50:51 todd Exp $ */
+/* $OpenBSD: if_tl.c,v 1.16 2001/02/03 05:52:27 mickey Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -190,6 +190,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/device.h>
+#include <sys/timeout.h>
#include <net/if.h>
@@ -1849,7 +1850,7 @@ void tl_stats_update(xsc)
tl_rx_overrun(tl_stats);
ifp->if_oerrors += tl_tx_underrun(tl_stats);
- timeout(tl_stats_update, sc, hz);
+ timeout_add(&sc->tl_stats_tmo, hz);
return;
}
@@ -2144,8 +2145,10 @@ void tl_init(xsc)
(void)splx(s);
/* Start the stats update counter */
- timeout(tl_stats_update, sc, hz);
- timeout(tl_wait_up, sc, 2 * hz);
+ timeout_set(&sc->tl_stats_tmo, tl_stats_update, sc);
+ timeout_add(&sc->tl_stats_tmo, hz);
+ timeout_set(&sc->tl_wait_tmo, tl_wait_up, sc);
+ timeout_add(&sc->tl_wait_tmo, 2 * hz);
return;
}
@@ -2336,8 +2339,8 @@ void tl_stop(sc)
ifp = &sc->arpcom.ac_if;
/* Stop the stats updater. */
- untimeout(tl_stats_update, sc);
- untimeout(tl_wait_up, sc);
+ timeout_del(&sc->tl_stats_tmo);
+ timeout_del(&sc->tl_wait_tmo);
/* Stop the transmitter */
CMD_CLR(sc, TL_CMD_RT);
diff --git a/sys/dev/pci/if_tlreg.h b/sys/dev/pci/if_tlreg.h
index 0da151792ca..087c1e9728f 100644
--- a/sys/dev/pci/if_tlreg.h
+++ b/sys/dev/pci/if_tlreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tlreg.h,v 1.5 2000/11/14 03:56:32 jason Exp $ */
+/* $OpenBSD: if_tlreg.h,v 1.6 2001/02/03 05:52:27 mickey Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -115,6 +115,7 @@ struct tl_softc {
void * sc_ih; /* interrupt handler cookie */
struct arpcom arpcom; /* interface info */
struct ifmedia ifmedia; /* media info */
+ struct timeout tl_stats_tmo, tl_wait_tmo;
bus_space_handle_t tl_bhandle;
bus_space_tag_t tl_btag;
struct tl_type *tl_dinfo; /* ThunderLAN adapter info */