NetBSD Problem Report #4123

Received: (qmail 9256 invoked from network); 19 Sep 1997 05:24:42 -0000
Message-Id: <199709190524.BAA00724@kolvir.arlington.ma.us>
Date: Fri, 19 Sep 1997 01:24:19 -0400 (EDT)
From: John Kohl <jtk@kolvir.arlington.ma.us>
Reply-To: jtk@kolvir.arlington.ma.us
To: gnats-bugs@gnats.netbsd.org
Subject: ISA com driver no longer groks B0 as hangup
X-Send-Pr-Version: 3.95

>Number:         4123
>Category:       kern
>Synopsis:       ISA com driver no longer groks B0 as hangup
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kleink
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 18 22:35:01 +0000 1997
>Closed-Date:    
>Last-Modified:  Thu Feb 11 12:40:38 +0000 1999
>Originator:     John Kohl
>Release:        NetBSD-current, 1997/09/18
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:

System: NetBSD kolvir.arlington.ma.us 1.2G NetBSD 1.2G (KOLVIR) #22: Fri Sep 19 01:09:15 EDT 1997 jtk@kolvir.arlington.ma.us:/u4/sandbox/src/sys/arch/i386/compile/KOLVIR i386


>Description:
	The latest changes to the com driver to handle multiple
frequency multipliers seems to have broken the POSIX requirement that a
baud rate of B0 mean "hang up".  comparam() rejects a termios with a
speed of B0.

>How-To-Repeat:

#include <termios.h>

main()
{
    struct termios t;

    tcgetattr(0, &t);
    cfsetispeed(&t, 0);
    cfsetospeed(&t, B0);
    if (tcsetattr(0, TCSANOW, &t) == -1)
	perror("tcsetattr");
}

>Fix:
	There's an #if 0 in comrate() which when converted to #if 1
seems to do the trick.  I'm not sure if that's quite right, though ...
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->kleink 
Responsible-Changed-By: jtk 
Responsible-Changed-When: Thu Feb 11 04:40:07 PST 1999 
Responsible-Changed-Why:  
assigning to Klaus for standards comments 

From: "Charles M. Hannum" <root@ihack.net>
To: jtk@kolvir.arlington.ma.us
Cc: kleink@netbsd.org, gnats-bugs@gnats.netbsd.org
Subject: Re: kern/4123
Date: Wed, 28 Apr 1999 19:11:26 -0400 (EDT)

 I thought I had already appended this to the PR.

 One might assume that since I specifically turned that code off, that
 just turning it back on is not the right thing to do.

 As it turns out, there are multiple problems with it:

 * Turning on DTR on a baud rate change is clearly wrong; the `else'
   clause *must* be omitted.

 * The interaction between B0 and TIOCSDTR/TIOCCDTR is not well
   defined.

 * It's not clear whether `hang up' in the POSIX text means to cycle
   DTR, or to just leave it turned off.

 * What happens to the rest of the settings?  It's obviously not
   correct to *just* set the baud rate registers to some random value.
   Does hanging up mean that we should stop receiving data?  Stop
   sending?  Both?  The code doesn't deal with this.

 I asked Klaus to define the semantics for me more precisely so that I
 could implement it, but I don't think this ever happened.

>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.