NetBSD Problem Report #38763
From rosenfeld@grumpf.hope-2000.org Mon May 26 21:09:31 2008
Return-Path: <rosenfeld@grumpf.hope-2000.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 0E2AD63B8E3
for <gnats-bugs@gnats.NetBSD.org>; Mon, 26 May 2008 21:09:31 +0000 (UTC)
Message-Id: <200805262107.m4QL7IMo007459@broken.headcrashers.bnfh>
Date: Mon, 26 May 2008 23:07:18 +0200 (CEST)
From: rosenfeld@grumpf.hope-2000.org
Reply-To: rosenfeld@grumpf.hope-2000.org
To: gnats-bugs@gnats.NetBSD.org
Subject: "hanging in tty" bugfix breaks the build for vax (and probably others)
X-Send-Pr-Version: 3.95
>Number: 38763
>Category: kern
>Synopsis: "hanging in tty" bugfix breaks the build for vax (and probably others)
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: ad
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 26 21:10:00 +0000 2008
>Closed-Date: Tue May 27 14:13:55 +0000 2008
>Last-Modified: Tue May 27 14:15:02 +0000 2008
>Originator: rosenfeld@grumpf.hope-2000.org
>Release: NetBSD 4.99.63
>Organization:
>Environment:
System: NetBSD cheetah.headcrashers.bnfh 4.99.63 NetBSD 4.99.63 (GENERIC) #0: Sun May 25 22:00:14 CEST 2008 woodstoc@executor:/usr/vax/src/sys/arch/vax/compile/obj.vax/GENERIC vax
Architecture: vax
Machine: vax
>Description:
See http://mail-index.netbsd.org/source-changes/2008/05/25/msg195531.html
for the "hanging in tty" bugfix.
clwakeup() has been removed from src/sys/kern/tty_subr.c, but is still
called by some tty drivers, of which src/sys/dev/dec/dz.c breaks my vax
build.
Affected filed are arch/x68k/dev/com.c, dev/dec/dz.c, dev/qbus/dl.c and
dev/qbus/dhu.c.
>How-To-Repeat:
Try to build a vax kernel using dz.
>Fix:
Greg Oster suggested using cv_broadcast() as in src/sys/kern/tty.c
>Release-Note:
>Audit-Trail:
From: Havard Eidnes <he@NetBSD.org>
To: ad@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/38763
Date: Mon, 26 May 2008 23:42:04 +0200 (CEST)
> Module Name: src
> Committed By: ad
> Date: Sun May 25 19:22:21 UTC 2008
>
> Modified Files:
> src/sys/arch/amiga/dev: mfc.c msc.c
> src/sys/arch/sparc64/dev: sab.c
> src/sys/dev/dec: dz.c
> src/sys/dev/ic: cy.c
> src/sys/dev/ir: irframe_tty.c
> src/sys/dev/qbus: dhu.c
> src/sys/dev/sbus: spif.c
> src/sys/kern: tty.c tty_pty.c tty_subr.c
> src/sys/net: ppp_tty.c
> src/sys/sys: tty.h
>
> Log Message:
> Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()
> some time again.
This also removed clwakeup() from the interface, but it was left used
by some of the TTY drivers, as per PR#38763. Is this diff correct?
Index: dec/dz.c
===================================================================
RCS file: /u/nb/src/sys/dev/dec/dz.c,v
retrieving revision 1.36
diff -u -p -r1.36 dz.c
--- dec/dz.c 25 May 2008 19:22:21 -0000 1.36
+++ dec/dz.c 26 May 2008 21:32:15 -0000
@@ -271,7 +271,7 @@ dzrint(void *arg)
cn_check_magic(tp->t_dev, mcc, dz_cnm_state);
if (!(tp->t_state & TS_ISOPEN)) {
- clwakeup(&tp->t_rawq);
+ cv_broadcast(&tp->t_rawcv);
continue;
}
Index: qbus/dhu.c
===================================================================
RCS file: /u/nb/src/sys/dev/qbus/dhu.c,v
retrieving revision 1.53
diff -u -p -r1.53 dhu.c
--- qbus/dhu.c 25 May 2008 19:22:21 -0000 1.53
+++ qbus/dhu.c 26 May 2008 21:34:11 -0000
@@ -362,7 +362,7 @@ dhurint(void *arg)
}
if (!(tp->t_state & TS_ISOPEN)) {
- clwakeup(&tp->t_rawq);
+ cv_broadcast(&tp->t_rawcv);
continue;
}
Index: qbus/dl.c
===================================================================
RCS file: /u/nb/src/sys/dev/qbus/dl.c,v
retrieving revision 1.41
diff -u -p -r1.41 dl.c
--- qbus/dl.c 28 Apr 2008 20:23:56 -0000 1.41
+++ qbus/dl.c 26 May 2008 21:34:59 -0000
@@ -276,7 +276,7 @@ dlrint(void *arg)
cc = c & 0xFF;
if (!(tp->t_state & TS_ISOPEN)) {
- clwakeup(&tp->t_rawq);
+ cv_broadcast(&tp->t_rawcv);
return;
}
From: Havard Eidnes <he@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/38763
Date: Tue, 27 May 2008 10:47:02 +0200 (CEST)
Hi,
it appears this diff is also needed:
Index: sys/arch/x68k/dev/com.c
===================================================================
RCS file: /u/nb/src/sys/arch/x68k/dev/com.c,v
retrieving revision 1.51
diff -u -p -r1.51 com.c
--- sys/arch/x68k/dev/com.c 28 Apr 2008 20:23:39 -0000 1.51
+++ sys/arch/x68k/dev/com.c 27 May 2008 08:20:04 -0000
@@ -1066,7 +1066,7 @@ comintr(void *arg)
if (ISSET(lsr, LSR_TXRDY) && ISSET(tp->t_state, TS_BUSY)) {
CLR(tp->t_state, TS_BUSY | TS_FLUSH);
if (sc->sc_halt > 0)
- clwakeup(&tp->t_outq);
+ cv_broadcast(&tp->t_outcv);
(*tp->t_linesw->l_start)(tp);
}
Regards,
- Havard
Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@NetBSD.org
Responsible-Changed-When: Tue, 27 May 2008 14:10:06 +0000
Responsible-Changed-Why:
take
State-Changed-From-To: open->closed
State-Changed-By: ad@NetBSD.org
State-Changed-When: Tue, 27 May 2008 14:13:55 +0000
State-Changed-Why:
fixed, thanks
From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38763 CVS commit: src/sys
Date: Tue, 27 May 2008 14:13:41 +0000 (UTC)
Module Name: src
Committed By: ad
Date: Tue May 27 14:13:41 UTC 2008
Modified Files:
src/sys/arch/x68k/dev: com.c
src/sys/dev/dec: dz.c
src/sys/dev/qbus: dhu.c dl.c
Log Message:
PR kern/38763 "hanging in tty" bugfix breaks the build for vax (and
probably others)
To generate a diff of this commit:
cvs rdiff -r1.51 -r1.52 src/sys/arch/x68k/dev/com.c
cvs rdiff -r1.36 -r1.37 src/sys/dev/dec/dz.c
cvs rdiff -r1.53 -r1.54 src/sys/dev/qbus/dhu.c
cvs rdiff -r1.41 -r1.42 src/sys/dev/qbus/dl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.