Subject: com 1.59 code
To: None <port-i386@NetBSD.ORG>
From: Robert Dobbs <banshee@gabriella.resort.com>
List: port-i386
Date: 06/28/1995 01:18:16
Jun 28 00:13:36 atrium /netbsd: com0: 0 silo overflows, 236 ibuf overflows
Jun 28 00:14:51 atrium /netbsd: com0: 0 silo overflows, 32 ibuf overflows

from my reading of this com code, incoming characters are packed into
a buffer as fast as they can be read.  when more than 3/4 of the buffer
size is full, RTS is turned off preventing data Xfer from the modem.

every so often (1 second?) compoll is called, which dumps the buffer
into the recieve tty q: (*linesw[tp->t_line].l_rint)(c, tp)

interrupts from incoming data will cause a jump out of compoll to fill
the buffer further.

an int indicating the send FIFO is empty calls comstart which then loads
the send FIFO with as much data as it will take.


It seems to me that in compoll() if the data > highwater, it should 
disable ints until the data is below highwater.  I suspect the high #
of overflows above is caused by a mostly full buffer not getting a 
chance to empty before it gets hit with a new int.  This is a problem
on slow cpus with high speed modems.

I don't know that this REALLY matters because you're probally going
to drop bytes either way.

What results are other people having with the 1.59 com driver?

-j