Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2006 19:09:52 +0400
From:      Artem Ignatiev <zazubrik@mail.ru>
To:        freebsd-hackers@freebsd.org
Subject:   Buses, devices and modules
Message-ID:  <922B6543-53D0-4877-9E97-B9ED1CDACFA8@mail.ru>

next in thread | raw e-mail | index | archive | help
Hi all, I have a question regarding probe and attach routines.

I've got 2 modules: for bus (mybus.ko) and for device (mydev.ko) on  
that bus.

mydev.ko has
MODULE_DEPEND(mydev, mybus, 1, 1, 1);

When kldloading mydev.ko, mybus.ko is loading automatically, then it  
founds its device, attaches properly, and mydev.ko after that founds  
its own device, and attaches to the bus, and all works fine.

When I do 'echo mydev_load="YES" >>/boot/loader.conf', loader loads  
both mydev.ko and mybus.ko, and mybus.ko attaches properly, but  
mydev.ko don't attach to anything.

I suppose this happens because mydev happens to probe for devices  
before mybus creates them, and fails to find anything to attach to.

I'm looking for way to trigger the mydev driver to re-probe after the  
mybus driver actually creates the devices, or may be I'm missing  
something simple (like priority of module probing)?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?922B6543-53D0-4877-9E97-B9ED1CDACFA8>