diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-11-09 18:06:40 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-11-09 18:06:40 +0000 |
commit | 1a139c1fb2780b10f476b5a20860688dad3b6f5b (patch) | |
tree | 101405b941d33992cfb7cf93c7847ee350da1e2e /sys/dev/ic | |
parent | fd80bd85aae74b486ef6875e2553afa55b9499e0 (diff) |
new timeouts; aaron@ ok
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/elink3.c | 12 | ||||
-rw-r--r-- | sys/dev/ic/elink3var.h | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 06c90426d9e..cde33457cc4 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.45 2000/10/16 17:08:07 aaron Exp $ */ +/* $OpenBSD: elink3.c,v 1.46 2000/11/09 18:06:38 mickey Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -335,11 +335,13 @@ epconfig(sc, chipset, enaddr) break; default: - printf("wrote %d to TX_AVAIL_THRESH, read back %d. " + printf("wrote %x to TX_AVAIL_THRESH, read back %x. " "Interface disabled\n", EP_THRESH_DISABLE, (int) i); return; } + timeout_set(&sc->sc_epmbuffill_tmo, epmbuffill, sc); + /* * Ensure Tx-available interrupts are enabled for * start the interface. @@ -1403,7 +1405,7 @@ epget(sc, totlen) } else { /* If the queue is no longer full, refill. */ if (sc->last_mb == sc->next_mb) - timeout(epmbuffill, sc, 1); + timeout_add(&sc->sc_epmbuffill_tmo, 1); /* Convert one of our saved mbuf's. */ sc->next_mb = (sc->next_mb + 1) % MAX_MBS; m->m_data = m->m_pktdat; @@ -1753,7 +1755,7 @@ epmbuffill(v) sc->last_mb = i; /* If the queue was not filled, try again. */ if (sc->last_mb != sc->next_mb) - timeout(epmbuffill, sc, 1); + timeout_add(&sc->sc_epmbuffill_tmo, 1); splx(s); } @@ -1771,7 +1773,7 @@ epmbufempty(sc) } } sc->last_mb = sc->next_mb = 0; - untimeout(epmbuffill, sc); + timeout_del(&sc->sc_epmbuffill_tmo); splx(s); } diff --git a/sys/dev/ic/elink3var.h b/sys/dev/ic/elink3var.h index 063a8875b1f..99225578ab7 100644 --- a/sys/dev/ic/elink3var.h +++ b/sys/dev/ic/elink3var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3var.h,v 1.15 2000/09/15 22:28:51 aaron Exp $ */ +/* $OpenBSD: elink3var.h,v 1.16 2000/11/09 18:06:39 mickey Exp $ */ /* $NetBSD: elink3var.h,v 1.12 1997/03/30 22:47:11 jonathan Exp $ */ /* @@ -37,6 +37,7 @@ struct ep_softc { struct device sc_dev; void *sc_ih; + struct timeout sc_epmbuffill_tmo; struct arpcom sc_arpcom; /* Ethernet common part */ struct mii_data sc_mii; /* MII/media control */ |