* hotplug, usbmouse and hid modules with an USB mouse
@ 2004-04-20 1:14 Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2004-04-20 1:14 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]
[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.
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?
Cheers,
Aurelien
--
.''`. Aurelien Jarno GPG: 1024D/F1BCDB73
: :' : Debian GNU/Linux developer | Electrical Engineering Student
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
[-- Attachment #2: hotplug.hid_usbmouse.patch --]
[-- Type: text/plain, Size: 751 bytes --]
diff -urN hotplug-2004_03_29.orig/etc/hotplug/hotplug.functions hotplug-2004_03_29/etc/hotplug/hotplug.functions
--- hotplug-2004_03_29.orig/etc/hotplug/hotplug.functions 2004-03-29 21:25:59.000000000 +0200
+++ hotplug-2004_03_29/etc/hotplug/hotplug.functions 2004-04-20 02:56:27.000000000 +0200
@@ -119,6 +119,12 @@
return
fi
+ # The hid module replaces the usbmouse and usbkbd modules that have
+ # less possibilities.
+ if echo "$DRIVERS" | grep -q "hid" > /dev/null ; then
+ DRIVERS=`echo $DRIVERS | sed -e 's/usbkbd//g;s/usbmouse//g'`
+ fi
+
# Note that DRIVERS aren't all going to be modules.
# For USB, some user-mode drivers or setup scripts may be listed.
debug_mesg Setup $DRIVERS for $DESCRIPTION
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: hotplug, usbmouse and hid modules with an USB mouse
@ 2004-05-20 17:57 Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2004-05-20 17:57 UTC (permalink / raw)
To: linux-hotplug
On Tue, Apr 20, 2004 at 03:14:16AM +0200, Aurelien Jarno wrote:
> [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.
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-20 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-20 1:14 hotplug, usbmouse and hid modules with an USB mouse Aurelien Jarno
-- strict thread matches above, loose matches on Subject: below --
2004-05-20 17:57 Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).