summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-holtek-mouse.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-20HID: holtek: fix mouse probingBenjamin Tissoires1-0/+15
An overlook from the previous commit: we don't even parse or start the device, meaning that the device is not presented to user space. Fixes: 93020953d0fa ("HID: check for valid USB device for many HID drivers") Cc: stable@vger.kernel.org Link: https://bugs.archlinux.org/task/73048 Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341 Link: https://lore.kernel.org/r/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2021-12-02HID: check for valid USB device for many HID driversGreg Kroah-Hartman1-0/+9
Many HID drivers assume that the HID device assigned to them is a USB device as that was the only way HID devices used to be able to be created in Linux. However, with the additional ways that HID devices can be created for many different bus types, that is no longer true, so properly check that we have a USB device associated with the HID device before allowing a driver that makes this assumption to claim it. Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Michael Zaidman <michael.zaidman@gmail.com> Cc: Stefan Achatz <erazor_de@users.sourceforge.net> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: linux-input@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> [bentiss: amended for thrustmater.c hunk to apply] Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20211201183503.2373082-3-gregkh@linuxfoundation.org
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner1-4/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08HID: Add Holtek USB ID 04d9:a0c2 ETEKCITY ScrollJohn DeSilva1-0/+4
The report descriptor for the HOLTEK USB ID 04d9:a0c2 (ETEKCITY Scroll T-140 Gaming Mouse) is set to a very large amount of consumer usages (2^16), exceeding HID_MAX_USAGES. Added id, bindings and comments for the mouse, added to hid_have_special_driver, and reduced the usage and logical maximums to 0x2fff, consistent with the other mice in the category. Tested on the hardware. Signed-off-by: John C. DeSilva <desilvjo@umich.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-01-17HID: hid-holtek-mouse: add new a070 mouseKharlamov Alexey1-0/+3
Added support of RITMIX ROM-316 mouse to hid-holtek-mouse workaround module Signed-off-by: Alexey Kharlamov <derlafff@ya.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-25HID: add support for LEETGION Hellion Gaming MouseAnders F. U. Kiær1-0/+4
Added id, bindings and comments for Holtek USB ID 04d9:a072 LEETGION Hellion Gaming mouse to use the same corrections of the report descriptor as Holtek 04d9:a067. As the mouse exceed HID_MAX_USAGES at the same offsets in the reported descriptor. Tested on the hardware. Signed-off-by: Anders F. U. Kiær <ablacksheep@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-02HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGliderAnders F. U. Kiær1-0/+4
Added id, bindings and comments for Holtek USB ID 04d9:a081 SHARKOON DarkGlider Gaming mouse to use the same corrections of the report descriptor as Holtek 04d9:a04a. As the mouse exceed HID_MAX_USAGES at the same offsets in the reported descriptor. Tested on the hardware. Signed-off-by: Anders F. U. Kiær <ablacksheep@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-05-29HID: holtek-mouse: use module_hid_driver() to simplify the codeWei Yongjun1-12/+1
module_hid_driver() makes the code simpler by eliminating boilerplate code. Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-05-28HID: Add support for Holtek gaming mouse 04d9:a04aChristian Ohm1-6/+22
This mouse is sold as Tracer Sniper TRM-503, NOVA Gaming Slider X200 and Zalman ZM-GM1, and reports too high usage maximum and logical maximum (like 04d9:a067, but its report descriptor is different). This patch adds its USB ID and fixes the report descriptor in the same way. Note: I don't actually have such a mouse to test, I took the report descriptor posted at https://bugzilla.novell.com/show_bug.cgi?id=774676, compared it to the one from 04d9:a067 and changed the offsets accordingly (all numbers minus 9, since it is 9 bytes shorter, and the difference is before the values that need changing). That Surely Works™. Signed-off-by: Christian Ohm <chr.ohm@gmx.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-05-28HID: Add driver for Holtek gaming mouse 04d9:a067Christian Ohm1-0/+72
This mouse is sold as Sharkoon Drakonia and Perixx MX-2000 and reports a too high usage maximum and logical maximum. This driver fixes the report descriptor so those values don't exceed HID_MAX_USAGES. Signed-off-by: Christian Ohm <chr.ohm@gmx.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>