NetBSD Problem Report #10406

Received: (qmail 3142 invoked from network); 21 Jun 2000 12:06:41 -0000
Message-Id: <20000621120613.48334EB@grzyb.pd37.warszawa.sdi.tpnet.pl>
Date: Wed, 21 Jun 2000 14:06:13 +0200 (CEST)
From: witek@pd37.warszawa.sdi.tpnet.pl
Sender: witek@grzyb.pd37.warszawa.sdi.tpnet.pl
Reply-To: witek@pd37.warszawa.sdi.tpnet.pl
To: gnats-bugs@gnats.netbsd.org
Subject: pty does not work with SLIP line discipline
X-Send-Pr-Version: 3.95

>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 12:07:00 +0000 2000
>Closed-Date:    
>Last-Modified:  Sun Nov 22 20:40:04 +0000 2009
>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:
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: PR/10406
Date: Sun, 22 Nov 2009 20:37:21 +0000

 Code hasn't been changed!

 But, for the record:
 1) The first change is in ptsstart().
 2) The second in ptcread().
 3) The moved code is now a call to ttypull();

 	David

 -- 
 David Laight: david@l8s.co.uk

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.