summaryrefslogtreecommitdiffstats
path: root/sys/isa/sio.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-03-29 20:20:01 +0000
committerache <ache@FreeBSD.org>1995-03-29 20:20:01 +0000
commite7aa4fbd2c82c3f5d8a645605709c4809027a60f (patch)
treebc7be4efa68881f8c53c2d2519cb9bb93e43028c /sys/isa/sio.c
parentc2410908fed42dabda27863fea6e6b0792ceb4b9 (diff)
downloadFreeBSD-src-e7aa4fbd2c82c3f5d8a645605709c4809027a60f.zip
FreeBSD-src-e7aa4fbd2c82c3f5d8a645605709c4809027a60f.tar.gz
Fix serial error recording using new TTY_BI & TTY_OE
Diffstat (limited to 'sys/isa/sio.c')
-rw-r--r--sys/isa/sio.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 859164d..a29b704 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.77 1995/03/28 19:22:11 ache Exp $
+ * $Id: sio.c,v 1.78 1995/03/29 19:05:13 ache Exp $
*/
#include "sio.h"
@@ -1098,16 +1098,13 @@ 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);
+ if (line_status & (LSR_PE|LSR_FE|LSR_BI)) {
/*
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))
+ if ( (line_status & (LSR_PE|LSR_FE))
&& (com->tp->t_iflag & IGNPAR)
|| (line_status & LSR_BI)
&& (com->tp->t_iflag & IGNBRK))
@@ -1141,6 +1138,8 @@ if (com->iptr - com->ibuf == 8)
&& com->state & CS_RTS_IFLOW)
outb(com->modem_ctl_port,
com->mcr_image &= ~MCR_RTS);
+ if (line_status & LSR_OE)
+ CE_RECORD(com, CE_OVERRUN);
}
cont:
/*
@@ -1570,8 +1569,7 @@ repeat:
/* Zero PE & FE chars per POSIX spec. and 4.4 ttyinput() */
while (cnt--) {
if ( (scan[CE_INPUT_OFFSET] & LSR_FE)
- /* Assume TTY_OE mapped to TTY_PE */
- || (scan[CE_INPUT_OFFSET] & (LSR_PE|LSR_OE))
+ || (scan[CE_INPUT_OFFSET] & LSR_PE)
&& (tp->t_iflag & INPCK))
scan[0] = 0;
scan++;
@@ -1599,10 +1597,8 @@ repeat:
recv_data = (u_char) *buf++;
if (line_status
& (LSR_BI | LSR_FE | LSR_OE | LSR_PE)) {
- /* char must be 0 to detect */
- /* break in ttyinput() */
if (line_status & LSR_BI)
- recv_data = TTY_BI;
+ recv_data |= TTY_BI;
if (line_status & LSR_FE)
recv_data |= TTY_FE;
if (line_status & LSR_OE)
OpenPOWER on IntegriCloud