Subject: port-pmax/3514: 3min SCC does not properly track DCD
To: None <gnats-bugs@gnats.netbsd.org>
From: maximum entropy <entropy@ubik.bernstein.com>
List: netbsd-bugs
Date: 04/18/1997 22:02:42
>Number:         3514
>Category:       port-pmax
>Synopsis:       3min SCC does not properly track DCD
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 19:35:01 1997
>Last-Modified:
>Originator:     maximum entropy
>Organization:
	
>Release:        <NetBSD-current source date> Apr 10 1997
>Environment:
	
DS5000/120
System: NetBSD ubik.bernstein.com 1.2D NetBSD 1.2D (UBIK) #8: Thu Apr 10 10:27:44 EDT 1997 entropy@ubik.bernstein.com:/usr/src/sys/arch/pmax/compile/UBIK pmax


>Description:
	
TTYs connected to an SCC port do not properly track carrier detect.  I
consider this a serious problem -- consider a situation where you're
logged in and su'd to root, you lose carrier, and some evil person
dials in and gets the line you were on.

I noticed this problem because I was trying to set up a SLIP
connection via one of the ports on my 5000/120, and sliplogin was not
getting a SIGHUP when the line dropped.

The code in scc.c has some vague comments that seem to indicate this
code was commented out to fix a problem with console handling.
However, when I enabled the code, I was able to use a serial console
with no obvious problem.

>How-To-Repeat:
	
Set up a getty on a modem, log in on that port, drop carrier, reconnect
>Fix:
	

--- /usr/src/sys/arch/pmax/tc/scc.c-orig	Wed Oct 16 20:35:19 1996
+++ /usr/src/sys/arch/pmax/tc/scc.c	Thu Apr 10 04:11:55 1997
@@ -1448,14 +1448,12 @@
 	 * Is it related to  console handling?
 	 */
 #ifndef alpha
-#ifdef	notyet	/*XXX -does this help pmax console? */
 	if (car) {
 		/* carrier present */
 		if (!(tp->t_state & TS_CARR_ON))
 			(void)(*linesw[tp->t_line].l_modem)(tp, 1);
 	} else if (tp->t_state & TS_CARR_ON)
 		(void)(*linesw[tp->t_line].l_modem)(tp, 0);
-#endif /*notyet*/
 #endif /* !alpha */
 	splx(s);
 }


>Audit-Trail:
>Unformatted: