summaryrefslogtreecommitdiff
path: root/sys/dev/ic/elink3.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-11-09 18:06:40 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-11-09 18:06:40 +0000
commit1a139c1fb2780b10f476b5a20860688dad3b6f5b (patch)
tree101405b941d33992cfb7cf93c7847ee350da1e2e /sys/dev/ic/elink3.c
parentfd80bd85aae74b486ef6875e2553afa55b9499e0 (diff)
new timeouts; aaron@ ok
Diffstat (limited to 'sys/dev/ic/elink3.c')
-rw-r--r--sys/dev/ic/elink3.c12
1 files changed, 7 insertions, 5 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);
}