NetBSD Problem Report #41448
From martin@duskware.de Sun May 17 11:31:34 2009
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3C70063BAB3
for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 May 2009 11:31:34 +0000 (UTC)
Message-Id: <20090517113130.B59A933A85@mail.duskware.de>
Date: Sun, 17 May 2009 13:31:25 +0200 (CEST)
From: martin@duskware.de
Reply-To: martin@duskware.de
To: gnats-bugs@gnats.NetBSD.org
Subject: harmony(4) is not understanding my hardware
X-Send-Pr-Version: 3.95
>Number: 41448
>Category: port-hp700
>Synopsis: harmony(4) is not understanding my hardware
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-hp700-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 17 11:35:00 +0000 2009
>Closed-Date: Mon Mar 05 09:49:41 +0000 2012
>Last-Modified: Mon Mar 05 09:49:41 +0000 2012
>Originator: Martin Husemann
>Release: NetBSD 5.99.11
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD moondance.duskware.de 5.99.11 NetBSD 5.99.11 (MOONDANCE) #16: Sat May 16 23:26:21 CEST 2009 martin@night-porter.duskware.de:/usr/src/sys/arch/hp700/compile/MOONDANCE hp700
Architecture: hppa
Machine: hp700
>Description:
On a HP9000/715/50 (Scorpio) system, harmony(4) attaches like:
harmony0 at gsc0 hpa 0xf1000000 path 2/0/8 irq 13 ipl 6: rev 0
audio0 at harmony0: full duplex
The machine has problems rebooting, which nick tracked down to unbound
polling in harmon_commit_settings. Further investigation (where my hardware
seems to react differently to Nick's) shows that the chip never becomes
ready (clears CNTL_C) after writing to the control register.
Reset works, initializing the gain register too, but as soon as the chip
is configured by setting the control register, it needs a hard reset.
While investigating I noted there are three unbound loops in harmony(4):
one waiting for playback/recording to finish after disabling interrupts
before resetting the chip - this loop should never cause problems on
working systems (only a page full of samples to play/record), but in
my failure case runs infinite too. Maybe a uptime based timeout should
be used here?
The other two loops are waiting for the control bit to clear. The first
(right afer resetting the codec) always is imediately done (unless the
chip is in my special failure mode, in which case it never clears), the
second takes around 300 - 400 useconds (again, unless in my failure mode,
when it never terminates).
In passing I note there are comments like
/* XXX leave these bits alone or the chip will not come out of CNTL */
in harmony_set_gainctl, which might refer to something caused by the
same underlying problem - or not. Writing or not writing the gainctl
register does not make a difference in my case.
>How-To-Repeat:
Not sure what make my hardware special, maybe it is just broken?
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/41448 CVS commit: src/sys/arch/hp700/gsc
Date: Fri, 4 Feb 2011 07:44:53 +0000
Module Name: src
Committed By: skrll
Date: Fri Feb 4 07:44:53 UTC 2011
Modified Files:
src/sys/arch/hp700/gsc: harmony.c
Log Message:
Commit a hack workaround for PR 41448.
Not sure if this has any negative effects, but I'd rather have a system
that reboots than has working audio.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hp700/gsc/harmony.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/41448 CVS commit: src/sys/arch/hp700/gsc
Date: Fri, 4 Feb 2011 11:00:31 +0000
Module Name: src
Committed By: skrll
Date: Fri Feb 4 11:00:31 UTC 2011
Modified Files:
src/sys/arch/hp700/gsc: harmony.c
Log Message:
A better workaround hack for PR 41448
Bound the wait loop
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp700/gsc/harmony.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Fri, 30 Dec 2011 14:38:13 +0000
State-Changed-Why:
Can you try again with -current. That is, is the workaround good
enough or does your harmony(4) not work after reboot?
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: skrll@NetBSD.org
Subject: Re: port-hp700/41448 (harmony(4) is not understanding my hardware)
Date: Wed, 11 Jan 2012 20:40:30 +0100
On Fri, Dec 30, 2011 at 02:38:14PM +0000, skrll@NetBSD.org wrote:
> Can you try again with -current. That is, is the workaround good
> enough or does your harmony(4) not work after reboot?
Sorry, still hangs on reboot.
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: skrll@NetBSD.org
Subject: Re: port-hp700/41448 (harmony(4) is not understanding my hardware)
Date: Thu, 12 Jan 2012 22:09:08 +0100
No idea what I tested yesterday, but a -current kernel reboots just fine.
However, after reboot playing audio does not work, it hangs at
harmony_commit_settings() at netbsd:harmony_commit_settings+0x88
(can get to ddb just fine).
Martin
State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 05 Mar 2012 09:49:41 +0000
State-Changed-Why:
We assume my hardware is broken.
>Unformatted:
(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.