diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index e60a0872ed73..a607fdda00ce 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 @@ -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)); diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c index e60a0872ed73..a607fdda00ce 100644 --- a/sys/i386/isa/si.c +++ b/sys/i386/isa/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 @@ -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));