NetBSD Problem Report #1241

From gnats  Wed Jul 19 00:42:31 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id AAA29259 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Wed, 19 Jul 1995 00:42:30 -0400
Message-Id: <199507181617.RAA13077@gluon.city.ac.uk>
Date: Tue, 18 Jul 1995 17:17:02 +0100
From: abs@mono.city.ac.uk
To: gnats-bugs@NetBSD.ORG
Subject: /sys/arch/sparc/dev/amd7930.c breaks if DEBUG defined
X-Send-Pr-Version: 3.2

>Number:         1241
>Category:       port-sparc
>Synopsis:       /sys/arch/sparc/dev/amd7930.c breaks if DEBUG defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 19 00:50:03 +0000 1995
>Closed-Date:    Wed Jul 19 20:09:40 +0000 1995
>Last-Modified:  Wed Jul 19 20:10:21 +0000 1995
>Originator:     David Brownlee
>Release:        Fri Jul 14 08:15:59 1995
>Organization:
Monochrome
>Environment:
sparc, 1.0A, current
System: NetBSD gluon.city.ac.uk 1.0A NetBSD 1.0A (GLUON) #1: monoadm@gluon.city.ac.uk:/mono/u1/NetBSD/src/sys/arch/sparc/compile/GLUON sparc

>Description:
	Compiling /sys/arch/sparc/dev/amd7930.c with DEBUG defined results
	in a kernel that cannot link because it cannot find Dprintf...

>How-To-Repeat:
	Define DEBUG in the conf file & try to build a kernel..
>Fix:
>Release-Note:
>Audit-Trail:

From: Mike Long <mike.long@analog.com>
To: gnats-bugs@NetBSD.ORG
Cc: abs@mono.city.ac.uk, gnats-admin@sun-lamp.pc.cs.cmu.edu,
        netbsd-bugs@NetBSD.ORG
Subject: Re: port-sparc/1241: /sys/arch/sparc/dev/amd7930.c breaks if DEBUG defined
Date: Wed, 19 Jul 95 12:49:25 EDT

 >>Number:         1241
 >>Category:       port-sparc
 >>Synopsis:       /sys/arch/sparc/dev/amd7930.c breaks if DEBUG defined
 >>Description:
 >	Compiling /sys/arch/sparc/dev/amd7930.c with DEBUG defined results
 >	in a kernel that cannot link because it cannot find Dprintf...
 >
 >>How-To-Repeat:
 >	Define DEBUG in the conf file & try to build a kernel..
 >>Fix:

 As an immediate fix, change all instances of DEBUG in amd7930.c to
 AUDIO_DEBUG.  Add

 options AUDIO_DEBUG

 to your kernel config file if you want to see lots of spew from the
 audio subsystem.

 The Dprintf() function is defined in /sys/dev/audio.c.  It appears to
 be very similar to the log() function in /sys/kern/subr_prf.c.  I will
 take a closer look.
 -- 
 Mike Long <mike.long@analog.com>           http://www.shore.net/~mikel
 VLSI Design Engineer         finger mikel@shore.net for PGP public key
 Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
 Norwood, MA 02062 USA                assert(*this!=opinionof(Analog));

From: Rolf Grossmann <grossman@informatik.tu-muenchen.de>
To: abs@mono.city.ac.uk
Cc: gnats-bugs@netbsd.org
Subject: Re: port-sparc/1241: /sys/arch/sparc/dev/amd7930.c breaks if DEBUG defined
Date: Wed, 19 Jul 1995 19:21:18 +0200

 Hi,

 on Tue, 18 Jul 1995 17:17:02 +0100 abs wrote 
 concerning "port-sparc/1241: /sys/arch/sparc/dev/amd7930.c breaks if DEBUG 
 defined" something like this:

 >>Description:
 > 	Compiling /sys/arch/sparc/dev/amd7930.c with DEBUG defined results
 > 	in a kernel that cannot link because it cannot find Dprintf...

 This is, because the definition of this function changed in /sys/dev/audio.c
 to depend on the definition of AUDIO_DEBUG. You have to change all
 occurrences of #ifdef DEBUG to #ifdef AUDIO_DEBUG. You can use the
 following patch to do that.

 >>Fix:

 diff -c -r1.1.1.3 amd7930.c
 *** amd7930.c	1995/07/07 18:50:07	1.1.1.3
 --- amd7930.c	1995/07/09 20:51:33
 ***************
 *** 49,55 ****
   #include <dev/ic/am7930reg.h>
   #include <sparc/dev/amd7930var.h>

 ! #ifdef DEBUG
   extern void Dprintf __P((const char *, ...));

   int     amd7930debug = 0;
 --- 49,55 ----
   #include <dev/ic/am7930reg.h>
   #include <sparc/dev/amd7930var.h>

 ! #ifdef AUDIO_DEBUG
   extern void Dprintf __P((const char *, ...));

   int     amd7930debug = 0;
 ***************
 *** 631,637 ****
   {
   	register struct amd7930_softc *sc = addr;

 ! #ifdef DEBUG
   	if (amd7930debug > 1)
   		Dprintf("sa_start_output: cc=%d 0x%x (0x%x)\n", cc, intr, arg);
   #endif
 --- 631,637 ----
   {
   	register struct amd7930_softc *sc = addr;

 ! #ifdef AUDIO_DEBUG
   	if (amd7930debug > 1)
   		Dprintf("sa_start_output: cc=%d 0x%x (0x%x)\n", cc, intr, arg);
   #endif
 ***************
 *** 663,669 ****
   {
   	register struct amd7930_softc *sc = addr;

 ! #ifdef DEBUG
   	if (amd7930debug > 1)
   		Dprintf("sa_start_input: cc=%d 0x%x (0x%x)\n", cc, intr, arg);
   #endif
 --- 663,669 ----
   {
   	register struct amd7930_softc *sc = addr;

 ! #ifdef AUDIO_DEBUG
   	if (amd7930debug > 1)
   		Dprintf("sa_start_input: cc=%d 0x%x (0x%x)\n", cc, intr, arg);
   #endif
 ***************
 *** 891,897 ****
   		*d = amd->bbrb;
   		au->au_rdata++;
   		if (d == e) {
 ! #ifdef DEBUG
   		        if (amd7930debug > 1)
                   		Dprintf("amd7930hwintr: swintr(r) requested");
   #endif
 --- 891,897 ----
   		*d = amd->bbrb;
   		au->au_rdata++;
   		if (d == e) {
 ! #ifdef AUDIO_DEBUG
   		        if (amd7930debug > 1)
                   		Dprintf("amd7930hwintr: swintr(r) requested");
   #endif
 ***************
 *** 906,912 ****
   		amd->bbtb = *d;
   		au->au_pdata++;
   		if (d == e) {
 ! #ifdef DEBUG
   		        if (amd7930debug > 1)
                   		Dprintf("amd7930hwintr: swintr(p) requested");
   #endif
 --- 906,912 ----
   		amd->bbtb = *d;
   		au->au_pdata++;
   		if (d == e) {
 ! #ifdef AUDIO_DEBUG
   		        if (amd7930debug > 1)
                   		Dprintf("amd7930hwintr: swintr(p) requested");
   #endif
 ***************
 *** 926,932 ****
   	register struct auio *au;
   	register int s, ret = 0;

 ! #ifdef DEBUG
   	if (amd7930debug > 1)
   		Dprintf("audiointr: sc=0x%x\n",sc);
   #endif
 --- 926,932 ----
   	register struct auio *au;
   	register int s, ret = 0;

 ! #ifdef AUDIO_DEBUG
   	if (amd7930debug > 1)
   		Dprintf("audiointr: sc=0x%x\n",sc);
   #endif
State-Changed-From-To: open->closed 
State-Changed-By: brezak 
State-Changed-When: Wed Jul 19 16:09:40 EDT 1995 
State-Changed-Why:  
Change DEBUG --> AUDIO_DEBUG in amd7930.c to match changes in dev/audio.c. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.