Thread (13 messages) flat view 13 messages, 4 authors, 2011-11-02

Re: BUG: hid-multitouch causes 10 second delay and error

From: Benjamin Tissoires <hidden>
Date: 2011-11-02 08:23:45

Hi Henrik

On Tue, Nov 1, 2011 at 16:33, Henrik Rydberg [off-list ref] wrote:
quoted
quoted
1. It still does not resolve the
hid-multitouch-gets-loaded-for-every-hid-device problem, and
Hmm, I thought it should work. What is the catch?
Everyone with an umatched hid device, even completely unrelated to
touch, will be surprised to find the hid-multitouch module loaded.
Well, this is a problem that can not be easily solved: IIRC, we can
not force the load of an external driver from within the kernel.
The best solution would be to merge hid-input and hid-multitouch.
Indeed both systems aim at handling generic devices.However, I'd
rather not doing it now as we are not as "good" as the Win 7 driver
(i.e. there are some fallback modes that allow every devices to be
handled even if they don't send clean hid reports).

And, even if hid-multitouch is loaded, only 2 or 3 lines of codes will
be executed to reject the driver in mt_probe, which won't be very time
consuming for end user.

For your second point:
quoted
quoted
2. It did not work after removing the tested device from the hid core
whitelist; the device quirk seemed to get lost in the process.
Didn't you forget to remove the following line?
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1230,7 +1230,6 @@ int hid_connect(struct hid_device *hdev,
unsigned int connect_mask)
               hdev->claimed |= HID_CLAIMED_INPUT;
       if (hdev->quirks & HID_QUIRK_MULTITOUCH) {
               /* this device should be handled by hid-multitouch, skip it */
-               hdev->quirks &= ~HID_QUIRK_MULTITOUCH;
               return -ENODEV;
       }


If not, that's maybe that you encountered the only case that is not
correctly handled:
if you register hid-multitouch before hid, then it will be the first
driver tested, and hid-input won't set the quirk correctly.
BTW, it's not a big deal, because if systems do have this behavior, we
can easily put the device from the user space by using
/sys/module/hid_multitouch/drivers/hid\:hid-multitouch/new_id

Cheers,
Benjamin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help