NetBSD Problem Report #450

From gnats  Wed Aug 31 10:57:41 1994
Received: from wildcat.demon.co.uk (root@wildcat.demon.co.uk [158.152.43.69]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id KAA02124 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Wed, 31 Aug 1994 10:57:27 -0700
Message-Id: <199408302138.WAA00355@wildcat.demon.co.uk>
Date: Tue, 30 Aug 1994 22:38:15 +0100
From: Alasdair Baird <alasdair@wildcat.demon.co.uk>
Reply-To: alasdair@wildcat.demon.co.uk
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: mis-feature in i386/isa/com.c?
X-Send-Pr-Version: 3.2

>Number:         450
>Category:       port-i386
>Synopsis:       modem doesn't hang up
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 31 11:05:05 +0000 1994
>Closed-Date:    Wed Aug 31 18:14:20 +0000 1994
>Last-Modified:  Thu Jul 14 03:04:41 +0000 2005
>Originator:     Alasdair Baird
>Release:        current (29 Aug 94)
>Organization:
absolutely none whatsoever
>Environment:
System: NetBSD wildcat.demon.co.uk 1.0_BETA NetBSD 1.0_BETA (WILDCAT) #54: Tue Aug 30 21:50:09 BST 1994 root@wildcat.demon.co.uk:/usr/src/sys/arch/i386/compile/WILDCAT i386


>Description:
	The com driver used in NetBSD is "based on HP dca driver".  I
	have identified one change that has been made that I figure
	should be un-made; in comclose() the condition for dropping
	all modem control signals has been changed in such a fashion
	that when I do something such as kill off a pppd the modem
	does not immediately go on-hook.  (This is NOT a modem problem!)
	The change made bases the decision to hangup upon whether the
	soft carrier flag is set; I believe this is a misinterpretation
	of what soft carrier is for.  It is my firm belief that the
	reason for soft carrier is that typically after the computer
	asserts dtr the modem is pretty quiet (bar some rts/cts-ing),
	and doesn't show a cd until after a successful dialing; as the
	comopen() routine requires a carrier to be present to complete
	this would cause problems unless the fake software carrier is
	used.  This is the *only* reason for a software carrier---it has
	no purpose in comclose() I believe.  Certainly I can find no
	other serial driver using it in this fashion, so I can only
	presume this change was made to facilitate the fixing of someone
	else's modem problems (don't give them my address if this change
	change is made!).
>How-To-Repeat:
	Stick a modem on a "softcar" direct connect, run up a pppd and
	then "kill -HUP" it.  Listen to the modem (if it has a speaker)
	then being off-hook for a long while until it takes it upon
	itself eventually to hangup.
>Fix:
	Undo the change in comclose() to bring it back into line with
	the dca and other serial drivers:


*** /sys/arch/i386/isa/com.c	Wed Aug 24 22:35:08 1994
--- com.c	Tue Aug 30 21:46:56 1994
***************
*** 356,363 ****
  	{
  		bic(iobase + com_cfcr, CFCR_SBREAK);
  		outb(iobase + com_ier, 0);
! 		if (tp->t_cflag & HUPCL &&
! 		    (sc->sc_swflags & COM_SW_SOFTCAR) == 0)
  			/* XXX perhaps only clear DTR */
  			outb(iobase + com_mcr, 0);
  	}
--- 356,363 ----
  	{
  		bic(iobase + com_cfcr, CFCR_SBREAK);
  		outb(iobase + com_ier, 0);
! 		if (tp->t_cflag & HUPCL ||
! 		    tp->t_state & TS_WOPEN || (tp->t_state & TS_ISOPEN) == 0)
  			/* XXX perhaps only clear DTR */
  			outb(iobase + com_mcr, 0);
  	}

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Wed Aug 31 11:14:20 PDT 1994 
State-Changed-Why:  
Software carrier is not supposed to be used in this manner. 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.