From 4132770850f9eab855a9df6b8a87be9539f16d9b Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Sat, 3 Feb 2001 05:56:15 +0000 Subject: new timeouts --- sys/dev/pci/if_ste.c | 12 +++++++----- sys/dev/pci/if_stereg.h | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'sys/dev/pci') 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 . All rights reserved. @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -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 . 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; -- cgit v1.2.3