when transmitting we cannot totally fill the circular buffer (i.e.

we can't use up all of the remaining sc->txslot[chan].bfree free
bytes) because that would cause the circular buffer read pointer
to become equal to the write pointer, thus signaling 'empty buffer'
to the hardware and stopping the transmitter.  spotted and fixed
by Kenjiro Cho <kjc@csl.sony.co.jp>
This commit is contained in:
chuck 1998-10-20 17:53:54 +00:00
parent 1070537dd5
commit ce89209d42
1 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: midway.c,v 1.36 1998/08/20 11:42:13 pk Exp $ */
/* $NetBSD: midway.c,v 1.37 1998/10/20 17:53:54 chuck Exp $ */
/* (sync'd to midway.c 1.68) */
/*
@ -1864,7 +1864,14 @@ again:
goto dequeue_drop;
}
if (launch.need > sc->txslot[chan].bfree) {
/*
* note: note that we cannot totally fill the circular buffer (i.e.
* we can't use up all of the remaining sc->txslot[chan].bfree free
* bytes) because that would cause the circular buffer read pointer
* to become equal to the write pointer, thus signaling 'empty buffer'
* to the hardware and stopping the transmitter.
*/
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);