From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Thu, 21 Nov 2002 20:45:58 +0000 Subject: Re: help for loading pwc module (solved) Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Beffe wrote: > So i simply had to change line 122 in hotplug.functions from > > if [ "$LISTER" = "" ]; then > > to > if [ "$LISTER" = "" -o "$DRIVERS" = "" ]; then > > to let it execute usb_map_modules which finds the pwc module. I just checked in a similar patch to hotplug.functions, so at least the fix is in CVS now. > Another question: > in usb.agent you first call load_drivers with modules.usbmap, then you > call load_drivers with usb.handmap and last you call it with > usb.usermap, regardless if the prior call did already load a module. Right. Some devices need more than one module, and in fact the modules are all just _candidates_ to bind to the device. The shell script can't assume that loading the first module was enough. > Also, if load_modules has found a module, first it tries to load the > kernel module and then it executes the userscript. > In my opinion, if i have a userscript i would like to have it precedence > before the kernel module. That means that first load_drivers has to be > called with the usermap and it has to try to execute the userscript > before loading a kernel driver. That couldn't work ... remember that when the driver has already been loaded (either statically or dynamically linked), the kernel already gave it a chance to bind to the device. The only sequencing that can be established in all cases is kernel first, then userspace. > Also if there has been a driver found and loaded, why not just stop but > trying to find one or two more times a driver again? See above: when two drivers are candidates, you can't know that the first one will always bind to the device. > In my case, where usbmodules takes some 5 seconds on the webcam before > it cancels, this means about 15 seconds slowdown at boot time. Just disable "usbmodules" then ... "cd /sbin; mv usbmodules usbmodules-". Sounds like for you, it's not adding any value. Though I'm not sure why it'd be having any problems reading config descriptors. - Dave ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel