Skip to contentSkip to conversation

hotplug, usbmouse and hid modules with an USB mouse

DISCUSSION Greg KH 1 participant 1 message May 20, 2004

lore
Share & tools
lore

Greg KH

author
#0 lore raw
Quoted 22 lines · Aurelien Jarno

[Please CC me for the answers as I am not subscribed to the list. Thanks!]

Hi all!

Somebody reported me a problem about hotplug when used with an USB mouse. An USB mouse is supported by the kernel by two different modules, usbmouse or hid. The usbmouse module is a very simplified one which don't have all the functionalities of the hid module. However it is smaller and may be the only solution for some mouses.

hotplug uses usbmodules to know the modules to load for a specific device. For such a mouse, it returns both usbmouse and hid, which is true as both of them support the device. However, the order of the two modules depends on the devices and more precisely on its descriptors.

With some devices the usbmouse is loaded before the hid one, resulting in some functions not available. I don't thing the problem comes from usbmodules, as its purpose is to list all the modules supported by a device, not to choose the best one! I think it is the job of hotplug.

Quoted 6 lines

I have attached a patch to the current version (2004_03_29), to make hotplug load the hid module instead of the usbmouse module if the device supports both. BTW, it also do the same for the usbkbd module.

Could you please give me some comments about that, and if you think it is the right solution to fix the problem?

You should never build the usbmouse or usbkbd driver unless you _really_ know what you are doing (see the help entries for those modules.) So in real life your system should never have both modules on them at the same time, so your patch really isn't needed.

thanks,

greg k-h

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel