summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-03 05:46:18 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-03 05:46:18 +0000
commit81857c69fe6a7d53619d4d4319143db1ce33b8e0 (patch)
tree3bd5bde64189f568f1ae9ba63333693ac0efee73
parent0dcb04f7d9fd4ecf5c18a030e344f8f39d6b6391 (diff)
new timeouts
-rw-r--r--sys/dev/pci/if_rl.c10
-rw-r--r--sys/dev/pci/if_rlreg.h3
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/pci/if_rl.c b/sys/dev/pci/if_rl.c
index 85c53d7c444..8f0cc8e9f37 100644
--- a/sys/dev/pci/if_rl.c
+++ b/sys/dev/pci/if_rl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rl.c,v 1.22 2000/10/16 17:08:08 aaron Exp $ */
+/* $OpenBSD: if_rl.c,v 1.23 2001/02/03 05:46:17 mickey Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -95,6 +95,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/device.h>
+#include <sys/timeout.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -1065,7 +1066,8 @@ void rl_init(xsc)
(void)splx(s);
- timeout(rl_tick, sc, hz);
+ timeout_set(&sc->sc_tick_tmo, rl_tick, sc);
+ timeout_add(&sc->sc_tick_tmo, hz);
return;
}
@@ -1195,7 +1197,7 @@ void rl_stop(sc)
ifp = &sc->arpcom.ac_if;
ifp->if_timer = 0;
- untimeout(rl_tick, sc);
+ timeout_del(&sc->sc_tick_tmo);
CSR_WRITE_1(sc, RL_COMMAND, 0x00);
CSR_WRITE_2(sc, RL_IMR, 0x0000);
@@ -1537,7 +1539,7 @@ rl_tick(v)
struct rl_softc *sc = v;
mii_tick(&sc->sc_mii);
- timeout(rl_tick, sc, hz);
+ timeout_add(&sc->sc_tick_tmo, hz);
}
struct cfattach rl_ca = {
diff --git a/sys/dev/pci/if_rlreg.h b/sys/dev/pci/if_rlreg.h
index 7ae3f82a4ef..510ffaf7079 100644
--- a/sys/dev/pci/if_rlreg.h
+++ b/sys/dev/pci/if_rlreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rlreg.h,v 1.10 1999/12/14 22:34:45 jason Exp $ */
+/* $OpenBSD: if_rlreg.h,v 1.11 2001/02/03 05:46:17 mickey Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -367,6 +367,7 @@ struct rl_softc {
u_int8_t rl_type;
int rl_txthresh;
struct rl_chain_data rl_cdata;
+ struct timeout sc_tick_tmo;
};
/*