Subject: kern/10406: pty does not work with SLIP line discipline
To: None <gnats-bugs@gnats.netbsd.org>
From: None <witek@pd37.warszawa.sdi.tpnet.pl>
List: netbsd-bugs
Date: 06/21/2000 05:06:16
>Number: 10406
>Category: kern
>Synopsis: pty does not work with SLIP line discipline
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jun 21 05:07:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Witold J. Wnuk
>Release: 1.4ZD
>Organization:
MIMUW
>Environment:
System: NetBSD grzyb.anal.net 1.4ZD NetBSD 1.4ZD (GRZYB) #45: Wed Jun 21 13:38:11 CEST 2000 witek@grzyb.anal.net:/raid/src/sys/arch/i386/compile/GRZYB i386
>Description:
pty code does not call l_start. In effect, disciplines like SLIP
and PPP do not work (correctly).
>How-To-Repeat:
Try to get simulated PDP11 to talk to host computer over SLIP.
>Fix:
Following patch works for me. It adds l_startup to ptcread and
moves few lines from ptcread to ptsstart for consistency with
other tty drivers.
Please check it is correct.
--- CUT ---
Index: tty_pty.c
===================================================================
RCS file: /lfs/cvsroot/syssrc/sys/kern/tty_pty.c,v
retrieving revision 1.43
diff -u -r1.43 tty_pty.c
--- tty_pty.c 2000/03/30 09:27:13 1.43
+++ tty_pty.c 2000/06/21 11:37:12
@@ -261,6 +261,13 @@
pti->pt_flags &= ~PF_STOPPED;
pti->pt_send = TIOCPKT_START;
}
+ if (tp->t_outq.c_cc <= tp->t_lowat) {
+ if (ISSET(tp->t_state, TS_ASLEEP)) {
+ CLR(tp->t_state, TS_ASLEEP);
+ wakeup((caddr_t)&tp->t_outq);
+ }
+ selwakeup(&tp->t_wsel);
+ }
ptcwakeup(tp, FREAD);
}
@@ -411,14 +418,8 @@
if (cc <= 0)
break;
error = uiomove(buf, cc, uio);
- }
- if (tp->t_outq.c_cc <= tp->t_lowat) {
- if (ISSET(tp->t_state, TS_ASLEEP)) {
- CLR(tp->t_state, TS_ASLEEP);
- wakeup((caddr_t)&tp->t_outq);
- }
- selwakeup(&tp->t_wsel);
}
+ (*linesw[tp->t_line].l_start)(tp);
return (error);
}
>Release-Note:
>Audit-Trail:
>Unformatted: