[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: newbus / snd_hdspe(4) trouble
From:       Ruslan Bukin <br () bsdpad ! com>
Date:       2012-06-22 16:44:25
Message-ID: 20120622164425.GA13364 () jail ! io
[Download RAW message or body]

On Fri, Jun 22, 2012 at 10:23:46AM -0400, John Baldwin wrote:
> On Friday, June 22, 2012 5:11:46 am Ruslan Bukin wrote:
> > On Thu, Jun 21, 2012 at 08:12:41AM -0400, John Baldwin wrote:
> > > 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.
> > 
> > I have changed, but no success.
> > 
> > hdspe.c:
> > DRIVER_MODULE_ORDERED(snd_hdspe, pci, hdspe_driver, pcm_devclass, 0, 0, SI_ORDER_SECOND);
> 
> Try making this one use SI_ORDER_ANY.

Also no success.

-Ruslan
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic