NetBSD Problem Report #49836

From paul@whooppee.com  Sun Apr 12 22:39:25 2015
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 428E7A6562
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 12 Apr 2015 22:39:25 +0000 (UTC)
Message-Id: <20150412223923.D40CD6F96C@vps1.whooppee.com>
Date: Mon, 13 Apr 2015 06:39:23 +0800 (PHT)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@gnats.NetBSD.org
Subject: Circular module dependency
X-Send-Pr-Version: 3.95

>Number:         49836
>Category:       kern
>Synopsis:       circular module dependency
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pgoyette
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 12 22:40:00 +0000 2015
>Closed-Date:    Mon Jun 05 08:16:35 +0000 2017
>Last-Modified:  Mon Jun 05 08:16:35 +0000 2017
>Originator:     Paul Goyette
>Release:        NetBSD 7.99.9
>Organization:
-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------
>Environment:
System: NetBSD pokey.whooppee.com 7.99.9 NetBSD 7.99.9 (POKEY 2015-04-09 09:49:29) #0: Sat Apr 11 14:57:21 PHT 2015 paul@pokey.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/POKEY amd64
Architecture: x86_64
Machine: amd64
>Description:
	Module 'hdaudio' references symbol hdaudio_cd, which is defined 
	in module 'hdaudio_pci'.  However, module 'hdaudio_pci' has an
	explicit dependency on module 'hdaudio'.  Neither of these two
	modules can be loaded because requires the other.
>How-To-Repeat:
	Build a kernel without any audio or hdaudio stuff.  Build the
	corresponding mdoules.  Then, try to "modload hdaudio" and it
	will complain "linker error: symbol `hdaudio_cd' not found".

	The required symbol is defined in module hdaudo_pci, so try to
	'modload hdaudio_pci'.  It attempts to load 'hdaudio' because of  
	the explicit dependancy, and 'hdaudio' fails as above.
>Fix:
	Unknown.  But the various audio and hdaudio modules (and the
	corresponding {,hd}audiobus stuff) seems to need a significant 
	overhaul.  See following comments:

	http://mail-index.netbsd.org/current-users/2015/04/09/msg027084.html

>Release-Note:

>Audit-Trail:
From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49836 CVS commit: src/sys/dev
Date: Sun, 4 Jun 2017 23:34:55 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Sun Jun  4 23:34:55 UTC 2017

 Modified Files:
 	src/sys/dev/hdaudio: hdaudio.c
 	src/sys/dev/pci: hdaudio_pci.c

 Log Message:
 Move the hdaudio_cd out of the hdaudio_pci module and into the main
 hdaudio module.  Rearrange the inter-module dependencies accordingly.

 Should resolve (my) PR kern/49836

 XXX Pull-ups needed for netbsd-8 branch


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hdaudio/hdaudio.c
 cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/hdaudio_pci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Sun, 04 Jun 2017 23:39:55 +0000
Responsible-Changed-Why:
I did the work


State-Changed-From-To: open->pending-pullups
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sun, 04 Jun 2017 23:39:55 +0000
State-Changed-Why:
Commit done, waiting for pullup to netbsd-8


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49836 CVS commit: [netbsd-8] src/sys/dev
Date: Mon, 5 Jun 2017 08:13:05 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Jun  5 08:13:05 UTC 2017

 Modified Files:
 	src/sys/dev/hdaudio [netbsd-8]: hdaudio.c
 	src/sys/dev/pci [netbsd-8]: hdaudio_pci.c

 Log Message:
 Pull up following revision(s) (requested by pgoyette in ticket #6):
 	sys/dev/hdaudio/hdaudio.c: revision 1.5
 	sys/dev/pci/hdaudio_pci.c: revision 1.8
 Move the hdaudio_cd out of the hdaudio_pci module and into the main
 hdaudio module.  Rearrange the inter-module dependencies accordingly.
 Should resolve (my) PR kern/49836


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/dev/hdaudio/hdaudio.c
 cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/pci/hdaudio_pci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Mon, 05 Jun 2017 08:16:35 +0000
State-Changed-Why:

Pull-up #6 for NetBSD-8 has been completed.


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.