From 280e105f418b8fc9f19c18d76e76810d7605ab25 Mon Sep 17 00:00:00 2001 From: kjc Date: Fri, 9 Oct 1998 11:48:22 +0000 Subject: fix a bug which could lock up a transmitter. don't use the entire buffer space. if WRTX becomes equal to RDTX, the transmitter stops assuming the buffer is empty. --- sys/dev/en/midway.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/en') diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c index 91b17b6..2e22fd1 100644 --- a/sys/dev/en/midway.c +++ b/sys/dev/en/midway.c @@ -2119,7 +2119,11 @@ again: goto dequeue_drop; } - if (launch.need > sc->txslot[chan].bfree) { + /* + * note: don't use the entire buffer space. if WRTX becomes equal + * to RDTX, the transmitter stops assuming the buffer is empty! --kjc + */ + if (launch.need >= sc->txslot[chan].bfree) { EN_COUNT(sc->txoutspace); #ifdef EN_DEBUG printf("%s: tx%d: out of transmit space\n", sc->sc_dev.dv_xname, chan); -- cgit v1.1