aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorAditya Garg <gargaditya08@live.com>2025-04-10 12:59:27 +0530
committerJiri Kosina <jkosina@suse.com>2025-04-24 11:32:51 +0200
commita058002358b7aaf14674b2a0daa5194bfa5720a1 (patch)
tree6f2524092b2bad90b31ce2dfa019febff6bcc053 /drivers/hid
parentHID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() (diff)
downloadlinux-rng-a058002358b7aaf14674b2a0daa5194bfa5720a1.tar.xz
linux-rng-a058002358b7aaf14674b2a0daa5194bfa5720a1.zip
HID: quirks: Add HID_QUIRK_IGNORE_MOUSE quirk
Some USB HID mice have drivers both in HID as well as a separate USB driver. The already existing hid_mouse_ignore_list in hid-quirks manages this, but is not yet configurable by usbhid.quirks, unlike all others like hid_ignore_list. Thus in some HID devices, where the vendor provides USB drivers only for the mouse and lets keyboard handled by the generic hid drivers, presence of such a quirk prevents the user from compiling hid core again to add the device to the table. Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-quirks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 646171598e41..e36cbe78d67e 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -1061,7 +1061,7 @@ bool hid_ignore(struct hid_device *hdev)
}
if (hdev->type == HID_TYPE_USBMOUSE &&
- hid_match_id(hdev, hid_mouse_ignore_list))
+ hdev->quirks & HID_QUIRK_IGNORE_MOUSE)
return true;
return !!hid_match_id(hdev, hid_ignore_list);
@@ -1265,6 +1265,9 @@ static unsigned long hid_gets_squirk(const struct hid_device *hdev)
if (hid_match_id(hdev, hid_ignore_list))
quirks |= HID_QUIRK_IGNORE;
+ if (hid_match_id(hdev, hid_mouse_ignore_list))
+ quirks |= HID_QUIRK_IGNORE_MOUSE;
+
if (hid_match_id(hdev, hid_have_special_driver))
quirks |= HID_QUIRK_HAVE_SPECIAL_DRIVER;