diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-07-21 15:52:11 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-07-21 15:52:11 +0000 |
commit | 120b5e87b31cf3a2eceace158d775a3b4f350d50 (patch) | |
tree | 7d785b6708b6a1545f862ba3011e314f86c904e2 /sys/dev | |
parent | b210500edbb39b7ba582d49dd14ac07445ee3615 (diff) |
convert to new timeouts; art@ ok
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/dc.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/dcreg.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 9aa9fa81166..2c51a4f1c9c 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.4 2000/06/12 16:49:24 mickey Exp $ */ +/* $OpenBSD: dc.c,v 1.5 2000/07/21 15:52:10 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -120,6 +120,7 @@ #include <sys/malloc.h> #include <sys/kernel.h> #include <sys/device.h> +#include <sys/timeout.h> #include <net/if.h> #include <net/if_dl.h> @@ -1909,7 +1910,7 @@ void dc_tick(xsc) } } - timeout(dc_tick, sc, hz); + timeout_add(&sc->dc_tick_tmo, hz); splx(s); @@ -2309,7 +2310,8 @@ void dc_init(xsc) (void)splx(s); - timeout(dc_tick, sc, hz); + timeout_set(&sc->dc_tick_tmo, dc_tick, sc); + timeout_add(&sc->dc_tick_tmo, hz); return; } @@ -2482,7 +2484,7 @@ void dc_stop(sc) ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; - untimeout(dc_tick, sc); + timeout_del(&sc->dc_tick_tmo); DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_RX_ON|DC_NETCFG_TX_ON)); CSR_WRITE_4(sc, DC_IMR, 0x00000000); diff --git a/sys/dev/ic/dcreg.h b/sys/dev/ic/dcreg.h index 559925a5664..80ed1e77eab 100644 --- a/sys/dev/ic/dcreg.h +++ b/sys/dev/ic/dcreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dcreg.h,v 1.5 2000/06/12 16:46:53 mickey Exp $ */ +/* $OpenBSD: dcreg.h,v 1.6 2000/07/21 15:52:10 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -660,6 +660,7 @@ struct dc_softc { struct dc_chain_data dc_cdata; u_int32_t dc_csid; u_int dc_revision; + struct timeout dc_tick_tmo; }; #define DC_TX_POLL 0x00000001 |