summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cy/cy.c32
-rw-r--r--sys/dev/cy/cy_isa.c32
-rw-r--r--sys/dev/rc/rc.c20
-rw-r--r--sys/dev/sio/sio.c32
4 files changed, 22 insertions, 94 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index bd8d7a49..7852317 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.12 1995/07/29 04:05:53 bde Exp $
+ * $Id: cy.c,v 1.13 1995/07/29 08:33:06 bde Exp $
*/
#include "cy.h"
@@ -1599,31 +1599,6 @@ repeat:
if (incc <= 0 || !(tp->t_state & TS_ISOPEN))
continue;
/*
- * XXX only do this when we bypass ttyinput.
- */
- if (tp->t_rawq.c_cc + incc >= RB_I_HIGH_WATER
- && (com->state & CS_RTS_IFLOW || tp->t_iflag & IXOFF)
- && !(tp->t_state & TS_TBLOCK)
- /*
- * XXX - need flow control for all line disciplines.
- * Only have it in standard one now.
- */
- && linesw[tp->t_line].l_rint == ttyinput) {
- int putc_status = 0;
-
- if ((tp->t_iflag & IXOFF
- && tp->t_cc[VSTOP] != _POSIX_VDISABLE
- && (putc_status = putc(tp->t_cc[VSTOP],
- &tp->t_outq)) == 0)
- || com->state & CS_RTS_IFLOW) {
- tp->t_state |= TS_TBLOCK;
- ttstart(tp);
- if (putc_status != 0)
- /* Try again later. */
- tp->t_state &= ~TS_TBLOCK;
- }
- }
- /*
* Avoid the grotesquely inefficient lineswitch routine
* (ttyinput) in "raw" mode. It usually takes about 450
* instructions (that's without canonical processing or echo!).
@@ -1631,6 +1606,11 @@ repeat:
* call overhead).
*/
if (tp->t_state & TS_CAN_BYPASS_L_RINT) {
+ if (tp->t_rawq.c_cc + incc >= RB_I_HIGH_WATER
+ && (com->state & CS_RTS_IFLOW
+ || tp->t_iflag & IXOFF)
+ && !(tp->t_state & TS_TBLOCK))
+ ttyblock(tp);
tk_nin += incc;
tk_rawcc += incc;
tp->t_rawcc += incc;
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index bd8d7a49..7852317 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.12 1995/07/29 04:05:53 bde Exp $
+ * $Id: cy.c,v 1.13 1995/07/29 08:33:06 bde Exp $
*/
#include "cy.h"
@@ -1599,31 +1599,6 @@ repeat:
if (incc <= 0 || !(tp->t_state & TS_ISOPEN))
continue;
/*
- * XXX only do this when we bypass ttyinput.
- */
- if (tp->t_rawq.c_cc + incc >= RB_I_HIGH_WATER
- && (com->state & CS_RTS_IFLOW || tp->t_iflag & IXOFF)
- && !(tp->t_state & TS_TBLOCK)
- /*
- * XXX - need flow control for all line disciplines.
- * Only have it in standard one now.
- */
- && linesw[tp->t_line].l_rint == ttyinput) {
- int putc_status = 0;
-
- if ((tp->t_iflag & IXOFF
- && tp->t_cc[VSTOP] != _POSIX_VDISABLE
- && (putc_status = putc(tp->t_cc[VSTOP],
- &tp->t_outq)) == 0)
- || com->state & CS_RTS_IFLOW) {
- tp->t_state |= TS_TBLOCK;
- ttstart(tp);
- if (putc_status != 0)
- /* Try again later. */
- tp->t_state &= ~TS_TBLOCK;
- }
- }
- /*
* Avoid the grotesquely inefficient lineswitch routine
* (ttyinput) in "raw" mode. It usually takes about 450
* instructions (that's without canonical processing or echo!).
@@ -1631,6 +1606,11 @@ repeat:
* call overhead).
*/
if (tp->t_state & TS_CAN_BYPASS_L_RINT) {
+ if (tp->t_rawq.c_cc + incc >= RB_I_HIGH_WATER
+ && (com->state & CS_RTS_IFLOW
+ || tp->t_iflag & IXOFF)
+ && !(tp->t_state & TS_TBLOCK))
+ ttyblock(tp);
tk_nin += incc;
tk_rawcc += incc;
tp->t_rawcc += incc;
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index ec93d68..1e9f666 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -664,24 +664,12 @@ repeat:
if (icnt <= 0 || !(tp->t_state & TS_ISOPEN))
goto done1;
- if ( linesw[tp->t_line].l_rint == ttyinput
- && ((rc->rc_flags & RC_RTSFLOW) || (tp->t_iflag & IXOFF))
- && !(tp->t_state & TS_TBLOCK)
- && (tp->t_rawq.c_cc + icnt) > RB_I_HIGH_WATER) {
- int queue_full = 0;
-
- if ((tp->t_iflag & IXOFF) &&
- tp->t_cc[VSTOP] != _POSIX_VDISABLE &&
- (queue_full = putc(tp->t_cc[VSTOP], &tp->t_outq)) == 0 ||
- (rc->rc_flags & RC_RTSFLOW)) {
- tp->t_state |= TS_TBLOCK;
- ttstart(tp);
- if (queue_full) /* try again */
- tp->t_state &= ~TS_TBLOCK;
- }
- }
if ( (tp->t_state & TS_CAN_BYPASS_L_RINT)
&& !(tp->t_state & TS_LOCAL)) {
+ if ((tp->t_rawq.c_cc + icnt) >= RB_I_HIGH_WATER
+ && ((rc->rc_flags & RC_RTSFLOW) || (tp->t_iflag & IXOFF))
+ && !(tp->t_state & TS_TBLOCK))
+ ttyblock(tp);
tk_nin += icnt;
tk_rawcc += icnt;
tp->t_rawcc += icnt;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index a428eeb..97f9dd7 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: sio.c,v 1.106 1995/07/29 04:05:57 bde Exp $
+ * $Id: sio.c,v 1.107 1995/07/29 08:33:13 bde Exp $
*/
#include "sio.h"
@@ -1548,31 +1548,6 @@ repeat:
if (incc <= 0 || !(tp->t_state & TS_ISOPEN))
continue;
/*
- * XXX only do this when we bypass ttyinput.
- */
- if (tp->t_rawq.c_cc + incc >= RB_I_HIGH_WATER
- && (com->state & CS_RTS_IFLOW || tp->t_iflag & IXOFF)
- && !(tp->t_state & TS_TBLOCK)
- /*
- * XXX - need flow control for all line disciplines.
- * Only have it in standard one now.
- */
- && linesw[tp->t_line].l_rint == ttyinput) {
- int putc_status = 0;
-
- if ((tp->t_iflag & IXOFF
- && tp->t_cc[VSTOP] != _POSIX_VDISABLE
- && (putc_status = putc(tp->t_cc[VSTOP],
- &tp->t_outq)) == 0)
- || com->state & CS_RTS_IFLOW) {
- tp->t_state |= TS_TBLOCK;
- ttstart(tp);
- if (putc_status != 0)
- /* Try again later. */
- tp->t_state &= ~TS_TBLOCK;
- }
- }
- /*
* Avoid the grotesquely inefficient lineswitch routine
* (ttyinput) in "raw" mode. It usually takes about 450
* instructions (that's without canonical processing or echo!).
@@ -1580,6 +1555,11 @@ repeat:
* call overhead).
*/
if (tp->t_state & TS_CAN_BYPASS_L_RINT) {
+ if (tp->t_rawq.c_cc + incc >= RB_I_HIGH_WATER
+ && (com->state & CS_RTS_IFLOW
+ || tp->t_iflag & IXOFF)
+ && !(tp->t_state & TS_TBLOCK))
+ ttyblock(tp);
tk_nin += incc;
tk_rawcc += incc;
tp->t_rawcc += incc;
OpenPOWER on IntegriCloud