Change the logic of the interrupt/poll loop. It no longer loops until

it empties all of the 256 byte incoming fifo, as it can spend more time
processing one port than intended, especially if data is streaming in
at 115.2K.  The port fifo will be emptied and dumped into the tty system
and left until next time.  I've been running this for quite some time on
one of my systems here.
Also, if the tty layer is blocked or full it lets the hardware assert the
flow control rather than loosing the data.
This commit is contained in:
Peter Wemm 1996-05-05 17:35:19 +00:00
parent 34914e50d4
commit 3461d589f2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15640
2 changed files with 30 additions and 8 deletions

View File

@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
* $Id: si.c,v 1.37 1996/03/28 14:28:51 scrappy Exp $
* $Id: si.c,v 1.38 1996/05/05 17:09:04 peter Exp $
*/
#ifndef lint
@ -1890,17 +1890,28 @@ siintr(int unit)
goto end_rx;
}
/*
* If the tty input buffers are blocked, stop emptying
* the incoming buffers and let the auto flow control
* assert..
*/
if (tp->t_state & TS_TBLOCK) {
goto end_rx;
}
/*
* Process read characters if not skipped above
*/
c = ccbp->hi_rxipos - ccbp->hi_rxopos;
op = ccbp->hi_rxopos;
ip = ccbp->hi_rxipos;
c = ip - op;
if (c == 0) {
goto end_rx;
}
op = ccbp->hi_rxopos;
ip = ccbp->hi_rxipos;
n = c & 0xff;
if (n > 250)
n = 250;
DPRINT((pp, DBG_INTR, "n = %d, op = %d, ip = %d\n",
n, op, ip));

View File

@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
* $Id: si.c,v 1.37 1996/03/28 14:28:51 scrappy Exp $
* $Id: si.c,v 1.38 1996/05/05 17:09:04 peter Exp $
*/
#ifndef lint
@ -1890,17 +1890,28 @@ siintr(int unit)
goto end_rx;
}
/*
* If the tty input buffers are blocked, stop emptying
* the incoming buffers and let the auto flow control
* assert..
*/
if (tp->t_state & TS_TBLOCK) {
goto end_rx;
}
/*
* Process read characters if not skipped above
*/
c = ccbp->hi_rxipos - ccbp->hi_rxopos;
op = ccbp->hi_rxopos;
ip = ccbp->hi_rxipos;
c = ip - op;
if (c == 0) {
goto end_rx;
}
op = ccbp->hi_rxopos;
ip = ccbp->hi_rxipos;
n = c & 0xff;
if (n > 250)
n = 250;
DPRINT((pp, DBG_INTR, "n = %d, op = %d, ip = %d\n",
n, op, ip));