summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-03-28 19:22:11 +0000
committerache <ache@FreeBSD.org>1995-03-28 19:22:11 +0000
commitd5876fb8d36941499ec8a133d8d90b940dd37e2f (patch)
tree3a17798d611125495a8f3db0860cebc1fbb08d4f /sys/isa
parent8be68caab2a1a9a91f87b52e695f64cf0bc3e0a3 (diff)
downloadFreeBSD-src-d5876fb8d36941499ec8a133d8d90b940dd37e2f.zip
FreeBSD-src-d5876fb8d36941499ec8a133d8d90b940dd37e2f.tar.gz
Move discard check up and do it only for error status
(per Bruce suggestion). It speedup things for a little. Remove l_start optimization, call l_start always (per Bruce suggestion)
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/sio.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index c0a232f..66e06cb 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.75 1995/03/28 11:13:44 ache Exp $
+ * $Id: sio.c,v 1.76 1995/03/28 12:26:40 ache Exp $
*/
#include "sio.h"
@@ -1100,6 +1100,21 @@ siointr1(com)
recv_data = 0;
else
recv_data = inb(com->data_port);
+ if (line_status & (LSR_PE|LSR_OE|LSR_FE|LSR_BI)) {
+ if (line_status & LSR_OE)
+ CE_RECORD(com, CE_OVERRUN);
+ /*
+ Don't store PE if IGNPAR and BI if IGNBRK,
+ this hack allows "raw" tty optimization
+ works even if IGN* is set.
+ Assume TTY_OE mapped to TTY_PE
+ */
+ if ( (line_status & (LSR_PE|LSR_OE|LSR_FE))
+ && (com->tp->t_iflag & IGNPAR)
+ || (line_status & LSR_BI)
+ && (com->tp->t_iflag & IGNBRK))
+ goto cont;
+ }
++com->bytes_in;
if (com->hotchar != 0 && recv_data == com->hotchar)
setsofttty();
@@ -1121,29 +1136,15 @@ siointr1(com)
if (com->iptr - com->ibuf == 8)
setsofttty();
#endif
- /*
- Don't store PE if IGNPAR and BI if IGNBRK,
- this hack allows "raw" tty optimization
- works even if IGN* is set.
- Assume TTY_OE mapped to TTY_PE
- */
- if ( (!(line_status & (LSR_PE|LSR_OE|LSR_FE))
- || !(com->tp->t_iflag & IGNPAR))
- && (!(line_status & LSR_BI)
- || !(com->tp->t_iflag & IGNBRK))) {
- ioptr[0] = recv_data;
- ioptr[CE_INPUT_OFFSET] = line_status;
- com->iptr = ++ioptr;
- }
+ ioptr[0] = recv_data;
+ ioptr[CE_INPUT_OFFSET] = line_status;
+ com->iptr = ++ioptr;
if (ioptr == com->ihighwater
&& com->state & CS_RTS_IFLOW)
outb(com->modem_ctl_port,
com->mcr_image &= ~MCR_RTS);
- /* XXX - move this out of isr */
- if (line_status & LSR_OE)
- CE_RECORD(com, CE_OVERRUN);
}
-
+ cont:
/*
* "& 0x7F" is to avoid the gcc-1.40 generating a slow
* jump from the top of the loop to here
@@ -1525,10 +1526,7 @@ repeat:
}
if (com->state & CS_ODONE) {
comflush(com);
- if (linesw[tp->t_line].l_start != ttstart)
- (*linesw[tp->t_line].l_start)(tp);
- else
- comstart(tp);
+ (*linesw[tp->t_line].l_start)(tp);
}
if (incc <= 0 || !(tp->t_state & TS_ISOPEN))
continue;
OpenPOWER on IntegriCloud