1 From b2d8dd6455350d10e35533fe209e7c11170f8deb Mon Sep 17 00:00:00 2001
2 From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
3 Date: Mon, 20 Dec 2021 10:51:20 +0100
4 Subject: [PATCH] HID: holtek: fix mouse probing
6 An overlook from the previous commit: we don't even parse or start the
7 device, meaning that the device is not presented to user space.
9 Fixes: 93020953d0fa ("HID: check for valid USB device for many HID drivers")
10 Cc: stable@vger.kernel.org
11 Link: https://bugs.archlinux.org/task/73048
12 Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341
13 Link: https://lore.kernel.org/r/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/
14 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
15 For: https://bugs.archlinux.org/task/73048
17 drivers/hid/hid-holtek-mouse.c | 15 +++++++++++++++
18 1 file changed, 15 insertions(+)
20 diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
21 index b7172c48ef9f08..7c907939bfae1d 100644
22 --- a/drivers/hid/hid-holtek-mouse.c
23 +++ b/drivers/hid/hid-holtek-mouse.c
24 @@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
25 static int holtek_mouse_probe(struct hid_device *hdev,
26 const struct hid_device_id *id)
30 if (!hid_is_usb(hdev))
33 + ret = hid_parse(hdev);
35 + hid_err(hdev, "hid parse failed: %d\n", ret);
39 + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
41 + hid_err(hdev, "hw start failed: %d\n", ret);