summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-11-30 15:29:31 +0000
committerbde <bde@FreeBSD.org>1996-11-30 15:29:31 +0000
commit87d2c32cebe5c2ed26d29f4d8c4e7972205b0ee5 (patch)
tree18a3f0dbdaa0a91740c929d5e2d6eb4ffa5b7da5 /sys/i386/isa
parente7c48f38709dc93cc82ecf0c18723dff1081d3a2 (diff)
downloadFreeBSD-src-87d2c32cebe5c2ed26d29f4d8c4e7972205b0ee5.zip
FreeBSD-src-87d2c32cebe5c2ed26d29f4d8c4e7972205b0ee5.tar.gz
Reset h/w fifos (if any) in siostop(). Now ttyflush() works fairly well
with sio devices (not perfectly, since there is no way to flush the tx holding register on 8250-16450's. I'm not sure if resetting the fifos flushes the tx shift register). Reminded by: NIST-PCTS
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/sio.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index d4125c3..0b70455 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.151 1996/11/30 15:03:05 bde Exp $
+ * $Id: sio.c,v 1.152 1996/11/30 15:19:19 bde Exp $
*/
#include "opt_comconsole.h"
@@ -2123,6 +2123,10 @@ siostop(tp, rw)
return;
disable_intr();
if (rw & FWRITE) {
+ if (com->hasfifo)
+ /* XXX does this flush everything? */
+ outb(com->iobase + com_fifo,
+ FIFO_XMT_RST | com->fifo_image);
com->obufs[0].l_queued = FALSE;
com->obufs[1].l_queued = FALSE;
if (com->state & CS_ODONE)
@@ -2131,13 +2135,15 @@ siostop(tp, rw)
com->tp->t_state &= ~TS_BUSY;
}
if (rw & FREAD) {
+ if (com->hasfifo)
+ /* XXX does this flush everything? */
+ outb(com->iobase + com_fifo,
+ FIFO_RCV_RST | com->fifo_image);
com_events -= (com->iptr - com->ibuf);
com->iptr = com->ibuf;
}
enable_intr();
comstart(tp);
-
- /* XXX should clear h/w fifos too. */
}
static struct tty *
OpenPOWER on IntegriCloud