diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1993-11-08 19:36:32 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1993-11-08 19:36:32 +0000 |
commit | fe04cbf968abda7b78178d835850893427d5a8f5 (patch) | |
tree | aade1862b13eee1c74e60118fd12d323cdbd7869 | |
parent | d88c633bcadb4b68116e5445ce94c651ae6465ad (diff) | |
download | src-fe04cbf968abda7b78178d835850893427d5a8f5.tar.gz src-fe04cbf968abda7b78178d835850893427d5a8f5.zip |
Add missing read flush code to siostop
Notes
Notes:
svn path=/head/; revision=733
-rw-r--r-- | sys/dev/sio/sio.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/sio.c | 6 | ||||
-rw-r--r-- | sys/isa/sio.c | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 055a5e807d54..3dc4e2d46681 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id$ + * $Id: sio.c,v 1.12 1993/10/16 13:46:18 rgrimes Exp $ */ #include "sio.h" @@ -1471,6 +1471,10 @@ siostop(tp, rw) if (rw & FWRITE) comflush(com); disable_intr(); + if (rw & FREAD) { + com_events -= (com->iptr - com->ibuf); + com->iptr = com->ibuf; + } if (tp->t_state & TS_TTSTOP) com->state &= ~CS_TTGO; else diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 055a5e807d54..3dc4e2d46681 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$ + * $Id: sio.c,v 1.12 1993/10/16 13:46:18 rgrimes Exp $ */ #include "sio.h" @@ -1471,6 +1471,10 @@ siostop(tp, rw) if (rw & FWRITE) comflush(com); disable_intr(); + if (rw & FREAD) { + com_events -= (com->iptr - com->ibuf); + com->iptr = com->ibuf; + } if (tp->t_state & TS_TTSTOP) com->state &= ~CS_TTGO; else diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 055a5e807d54..3dc4e2d46681 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$ + * $Id: sio.c,v 1.12 1993/10/16 13:46:18 rgrimes Exp $ */ #include "sio.h" @@ -1471,6 +1471,10 @@ siostop(tp, rw) if (rw & FWRITE) comflush(com); disable_intr(); + if (rw & FREAD) { + com_events -= (com->iptr - com->ibuf); + com->iptr = com->ibuf; + } if (tp->t_state & TS_TTSTOP) com->state &= ~CS_TTGO; else |