summaryrefslogtreecommitdiffstats
path: root/sys/net/if_sl.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-09-10 12:22:59 +0000
committerbde <bde@FreeBSD.org>1995-09-10 12:22:59 +0000
commit167f3fbb0412d6adb73a5941db3245b893b987dd (patch)
tree8db42b6e047bacf170ff51002dcaf2514b04d197 /sys/net/if_sl.c
parent13843b0bec4c3f2f8b760bbfab827254811e6ebf (diff)
downloadFreeBSD-src-167f3fbb0412d6adb73a5941db3245b893b987dd.zip
FreeBSD-src-167f3fbb0412d6adb73a5941db3245b893b987dd.tar.gz
Call output process in slstart() whether or not there is any output. As
in pppstart(), the output process may be overloaded to handle hardware flow control and hardware output completions. Don't wait for output to drain in slclose(). Discard output immediately. New output is not prevented while processes are waiting for output to drain (this is a bug), so the wait was sometimes forever. Infinite waits are also possible when CCTS_OFLOW is enabled and CTS is down. Infinite waits were also caused by the above bug in slstart(). Start changing new init stuff yet again: rename unused arg `dummy'. Reviewed by: davidg
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r--sys/net/if_sl.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index d91cd2f..7167335 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.29 1995/08/30 00:33:20 bde Exp $
+ * $Id: if_sl.c,v 1.30 1995/09/09 18:10:24 davidg Exp $
*/
/*
@@ -199,8 +199,8 @@ static struct linesw slipdisc =
* Called from boot code to establish sl interfaces.
*/
static void
-slattach(udata)
- void *udata;
+slattach(dummy)
+ void *dummy;
{
register struct sl_softc *sc;
register int i = 0;
@@ -315,8 +315,7 @@ slclose(tp,flag)
register struct sl_softc *sc;
int s;
- if (ttywflush(tp))
- ttyflush(tp, FREAD | FWRITE);
+ ttyflush(tp, FREAD | FWRITE);
/*
* XXX the placement of the following spl is misleading. tty
* interrupts must be blocked across line discipline switches
@@ -496,17 +495,19 @@ slstart(tp)
for (;;) {
/*
- * If there is more in the output queue, just send it now.
- * We are being called in lieu of ttstart and must do what
- * it would.
+ * Call output process whether or not there is more in the
+ * output queue. We are being called in lieu of ttstart
+ * and must do what it would.
*/
+ (*tp->t_oproc)(tp);
+
if (tp->t_outq.c_cc != 0) {
if (sc != NULL)
sc->sc_flags &= ~SC_OUTWAIT;
- (*tp->t_oproc)(tp);
if (tp->t_outq.c_cc > SLIP_HIWAT)
return 0;
}
+
/*
* This happens briefly when the line shuts down.
*/
OpenPOWER on IntegriCloud