diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-03 05:56:15 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-03 05:56:15 +0000 |
commit | 4132770850f9eab855a9df6b8a87be9539f16d9b (patch) | |
tree | f539f8b6f84bf547291db6cc5a532cb53a7c0818 /sys/dev | |
parent | 3475f58efe2baf5af013637895c21f954477325c (diff) |
new timeouts
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_ste.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_stereg.h | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index 51d86110cdc..7b9e5471954 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.8 2000/10/16 17:08:08 aaron Exp $ */ +/* $OpenBSD: if_ste.c,v 1.9 2001/02/03 05:56:14 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -44,6 +44,7 @@ #include <sys/errno.h> #include <sys/malloc.h> #include <sys/kernel.h> +#include <sys/timeout.h> #include <net/if.h> #include <net/if_dl.h> @@ -590,7 +591,7 @@ int ste_intr(xsc) ste_txeoc(sc); if (status & STE_ISR_STATS_OFLOW) { - untimeout(ste_stats_update, sc); + timeout_del(&sc->sc_stats_tmo); ste_stats_update(sc); } @@ -824,7 +825,7 @@ void ste_stats_update(xsc) ste_start(ifp); } - timeout(ste_stats_update, sc, hz); + timeout_add(&sc->sc_stats_tmo, hz); splx(s); return; @@ -1226,7 +1227,8 @@ void ste_init(xsc) splx(s); - timeout(ste_stats_update, sc, hz); + timeout_set(&sc->sc_stats_tmo, ste_stats_update, sc); + timeout_add(&sc->sc_stats_tmo, hz); return; } @@ -1239,7 +1241,7 @@ void ste_stop(sc) ifp = &sc->arpcom.ac_if; - untimeout(ste_stats_update, sc); + timeout_del(&sc->sc_stats_tmo); CSR_WRITE_2(sc, STE_IMR, 0); STE_SETBIT2(sc, STE_MACCTL1, STE_MACCTL1_TX_DISABLE); diff --git a/sys/dev/pci/if_stereg.h b/sys/dev/pci/if_stereg.h index ba3de64597d..6940b29a005 100644 --- a/sys/dev/pci/if_stereg.h +++ b/sys/dev/pci/if_stereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stereg.h,v 1.3 1999/12/08 00:29:26 aaron Exp $ */ +/* $OpenBSD: if_stereg.h,v 1.4 2001/02/03 05:56:14 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -503,6 +503,7 @@ struct ste_softc { struct device sc_dev; void *sc_ih; struct arpcom arpcom; + struct timeout sc_stats_tmo; mii_data_t sc_mii; bus_space_tag_t ste_btag; bus_space_handle_t ste_bhandle; |