Skip to contentSkip to conversation

help for loading pwc module (solved)

DISCUSSION David Brownell 1 participant 1 message Nov 21, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Beffe

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.

Quoted 4 lines

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.

Quoted 6 lines

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.

Quoted 2 lines

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.

Quoted 2 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel