NetBSD Problem Report #4123

Received: (qmail 9256 invoked from network); 19 Sep 1997 05:24:42 -0000
Message-Id: <>
Date: Fri, 19 Sep 1997 01:24:19 -0400 (EDT)
From: John Kohl <>
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
>Last-Modified:  Thu Feb 11 12:40:38 +0000 1999
>Originator:     John Kohl
>Release:        NetBSD-current, 1997/09/18
NetBSD Kernel Hackers `R` Us

System: NetBSD 1.2G NetBSD 1.2G (KOLVIR) #22: Fri Sep 19 01:09:15 EDT 1997 i386

	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.


#include <termios.h>

    struct termios t;

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

	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 ...
Responsible-Changed-From-To: kern-bug-people->kleink 
Responsible-Changed-By: jtk 
Responsible-Changed-When: Thu Feb 11 04:40:07 PST 1999 
assigning to Klaus for standards comments 

From: "Charles M. Hannum" <>
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

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


NetBSD Home
NetBSD PR Database Search

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