diff options
author | peter <peter@FreeBSD.org> | 1996-05-05 17:35:19 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-05-05 17:35:19 +0000 |
commit | 535c447feae73d7f12f66ce75a0f8037b1a56d8f (patch) | |
tree | 36004e0ce832bfe93e23df91eb9c6c564dc9aa76 /sys/dev | |
parent | 9785128d44ffe2d45a73db37a7fbcf2ae751baa6 (diff) | |
download | FreeBSD-src-535c447feae73d7f12f66ce75a0f8037b1a56d8f.zip FreeBSD-src-535c447feae73d7f12f66ce75a0f8037b1a56d8f.tar.gz |
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.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/si/si.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index e60a087..a607fdd 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -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 @@ -1891,16 +1891,27 @@ siintr(int unit) } /* - * Process read characters if not skipped above + * If the tty input buffers are blocked, stop emptying + * the incoming buffers and let the auto flow control + * assert.. */ - c = ccbp->hi_rxipos - ccbp->hi_rxopos; - if (c == 0) { + if (tp->t_state & TS_TBLOCK) { goto end_rx; } + /* + * Process read characters if not skipped above + */ op = ccbp->hi_rxopos; ip = ccbp->hi_rxipos; + c = ip - op; + if (c == 0) { + goto end_rx; + } + n = c & 0xff; + if (n > 250) + n = 250; DPRINT((pp, DBG_INTR, "n = %d, op = %d, ip = %d\n", n, op, ip)); |