From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 21 12:22:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E10ED1065672 for ; Thu, 21 Jun 2012 12:22:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B80B98FC14 for ; Thu, 21 Jun 2012 12:22:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 18808B987; Thu, 21 Jun 2012 08:22:07 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 21 Jun 2012 08:12:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120620204441.GA63638@jail.io> In-Reply-To: <20120620204441.GA63638@jail.io> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206210812.41137.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 21 Jun 2012 08:22:07 -0400 (EDT) Cc: Ruslan Bukin Subject: Re: newbus / snd_hdspe(4) trouble X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 12:22:08 -0000 On Wednesday, June 20, 2012 4:44:41 pm Ruslan Bukin wrote: > Hi. > > I have the problem with different behavior of snd_hdspe(4) sound card > driver initialization. > > If I load the driver by hand using kldload everything works fine, > but in case of loading driver at boot time (loader.conf) or compile > in kernel the driver can't initialize propertly. > > The snd_hdspe(4) driver is designed to create a pcm child device per > each pair of sound channels. > > The problem is that snd_hdspe loaded normally, but pcm child devices > are not appears. hdspe_pcm_probe() in driver is not called at all. > However snd_hdspe_pcm driver exists in kldstat -v after boot: > 5 1 0xffffffff81377000 a2c8 snd_hdspe.ko (/boot/kernel/snd_hdspe.ko) > Contains modules: > Id Name > 7 hdspe/snd_hdspe_pcm > 6 pci/snd_hdspe > > and I have checked, device_add_child() returns not NULL. > > I played with MODULE_DEPEND as done in snd_hda(4) but no luck. > What can I do to debug the problem? The snd_hdspe driver probably needs to use DRIVER_MODULE_ORDERED() to ensure the other modules in its kld are registered with new-bus before it tries to attach to devices. -- John Baldwin