All of lore.kernel.org
 help / color / mirror / Atom feed
* FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
@ 2021-12-17  7:00 Thorsten Leemhuis
  2021-12-17  7:17 ` Greg KH
  2021-12-17  8:13 ` Benjamin Tissoires
  0 siblings, 2 replies; 8+ messages in thread
From: Thorsten Leemhuis @ 2021-12-17  7:00 UTC (permalink / raw)
  To: stable, Greg KH; +Cc: tlinux, linux-input, regressions, linux-usb

Hi, this is your Linux kernel regression tracker speaking.

I noticed a bugreport from Tomasz C. (CCed) that sounds a lot like a
regression between v5.15.7..v5.15.8 and likely better dealt with by email:

To quote from: https://bugzilla.kernel.org/show_bug.cgi?id=215341

> After updating kernel from 5.15.7 to 5.15.8 on ArchLinux distribution, Holtek USB mouse stopped working.
> Exact model:
> 04d9:a067 Holtek Semiconductor, Inc. USB Gaming Mouse
> 
> The dmesg output for this device from kernel version 5.15.8:
> 
> [    2.501958] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> [    2.624369] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> [    2.624376] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [    2.624379] usb 2-1.2.3: Product: USB Gaming Mouse
> [    2.624382] usb 2-1.2.3: Manufacturer: Holtek
> 
> After disconnecting and connecting the USB:
> 
> [   71.976731] usb 2-1.2.3: USB disconnect, device number 6
> [   75.013021] usb 2-1.2.3: new full-speed USB device number 8 using ehci-pci
> [   75.135865] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> [   75.135873] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [   75.135877] usb 2-1.2.3: Product: USB Gaming Mouse
> [   75.135880] usb 2-1.2.3: Manufacturer: Holtek
> 
> 
> On kernel version 5.15.7:
> 
> [    2.280515] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> [    2.379777] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> [    2.379784] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [    2.379787] usb 2-1.2.3: Product: USB Gaming Mouse
> [    2.379790] usb 2-1.2.3: Manufacturer: Holtek
> [    2.398578] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:04D9:A067.0005/input/input11
> [    2.450977] holtek_mouse 0003:04D9:A067.0005: input,hidraw4: USB HID v1.10 Keyboard [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input0
> [    2.451013] holtek_mouse 0003:04D9:A067.0006: Fixing up report descriptor
> [    2.452189] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.1/0003:04D9:A067.0006/input/input12
> [    2.468510] usb 2-1.2.4: new high-speed USB device number 7 using ehci-pci
> [    2.503913] holtek_mouse 0003:04D9:A067.0006: input,hiddev96,hidraw5: USB HID v1.10 Mouse [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input1
> [    2.504105] holtek_mouse 0003:04D9:A067.0007: hiddev97,hidraw6: USB HID v1.10 Device [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input2
> 
> Rolling back the kernel to version 5.15.7 solves the problem.

[TLDR for the rest of the mail: adding this regression to regzbot; most
text you find below is compiled from a few templates paragraphs some of
you might have seen already.]

To be sure this issue doesn't fall through the cracks unnoticed, I'm
adding it to regzbot, my Linux kernel regression tracking bot:

#regzbot introduced v5.15.7..v5.15.8
#regzbot title usb: Holtek mouse stopped working

Reminder: when fixing the issue, please add a 'Link:' tag with the URL
to this report and the bugzilla ticket, then regzbot will automatically
mark the regression as resolved once the fix lands in the appropriate
tree. For more details about regzbot see footer.

Ciao, Thorsten (wearing his 'Linux kernel regression tracker' hat).

P.S.: As a Linux kernel regression tracker I'm getting a lot of reports
on my table. I can only look briefly into most of them. Unfortunately
therefore I sometimes will get things wrong or miss something important.
I hope that's not the case here; if you think it is, don't hesitate to
tell me about it in a public reply. That's in everyone's interest, as
what I wrote above might be misleading to everyone reading this; any
suggestion I gave thus might sent someone reading this down the wrong
rabbit hole, which none of us wants.

BTW, I have no personal interest in this issue, which is tracked using
regzbot, my Linux kernel regression tracking bot
(https://linux-regtracking.leemhuis.info/regzbot/). I'm only posting
this mail to get things rolling again and hence don't need to be CC on
all further activities wrt to this regression.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-17  7:00 FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8 Thorsten Leemhuis
@ 2021-12-17  7:17 ` Greg KH
  2021-12-17  8:13 ` Benjamin Tissoires
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-12-17  7:17 UTC (permalink / raw)
  To: Thorsten Leemhuis, stable, tlinux, linux-input, regressions, linux-usb

On Fri, Dec 17, 2021 at 08:00:10AM +0100, Thorsten Leemhuis wrote:
> Hi, this is your Linux kernel regression tracker speaking.
> 
> I noticed a bugreport from Tomasz C. (CCed) that sounds a lot like a
> regression between v5.15.7..v5.15.8 and likely better dealt with by email:
> 
> To quote from: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> 
> > After updating kernel from 5.15.7 to 5.15.8 on ArchLinux distribution, Holtek USB mouse stopped working.
> > Exact model:
> > 04d9:a067 Holtek Semiconductor, Inc. USB Gaming Mouse
> > 
> > The dmesg output for this device from kernel version 5.15.8:
> > 
> > [    2.501958] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> > [    2.624369] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > [    2.624376] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > [    2.624379] usb 2-1.2.3: Product: USB Gaming Mouse
> > [    2.624382] usb 2-1.2.3: Manufacturer: Holtek
> > 
> > After disconnecting and connecting the USB:
> > 
> > [   71.976731] usb 2-1.2.3: USB disconnect, device number 6
> > [   75.013021] usb 2-1.2.3: new full-speed USB device number 8 using ehci-pci
> > [   75.135865] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > [   75.135873] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > [   75.135877] usb 2-1.2.3: Product: USB Gaming Mouse
> > [   75.135880] usb 2-1.2.3: Manufacturer: Holtek
> > 
> > 
> > On kernel version 5.15.7:
> > 
> > [    2.280515] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> > [    2.379777] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > [    2.379784] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > [    2.379787] usb 2-1.2.3: Product: USB Gaming Mouse
> > [    2.379790] usb 2-1.2.3: Manufacturer: Holtek
> > [    2.398578] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:04D9:A067.0005/input/input11
> > [    2.450977] holtek_mouse 0003:04D9:A067.0005: input,hidraw4: USB HID v1.10 Keyboard [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input0
> > [    2.451013] holtek_mouse 0003:04D9:A067.0006: Fixing up report descriptor
> > [    2.452189] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.1/0003:04D9:A067.0006/input/input12
> > [    2.468510] usb 2-1.2.4: new high-speed USB device number 7 using ehci-pci
> > [    2.503913] holtek_mouse 0003:04D9:A067.0006: input,hiddev96,hidraw5: USB HID v1.10 Mouse [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input1
> > [    2.504105] holtek_mouse 0003:04D9:A067.0007: hiddev97,hidraw6: USB HID v1.10 Device [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input2
> > 
> > Rolling back the kernel to version 5.15.7 solves the problem.

Ah, this looks like my HID changes probably broke something here :(

If the person reporting this could run 'git bisect' between these two
kernel versions, to find the offending patch, that would be great!

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-17  7:00 FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8 Thorsten Leemhuis
  2021-12-17  7:17 ` Greg KH
@ 2021-12-17  8:13 ` Benjamin Tissoires
  2021-12-17  8:26   ` Greg KH
  2021-12-17  8:37   ` Thorsten Leemhuis
  1 sibling, 2 replies; 8+ messages in thread
From: Benjamin Tissoires @ 2021-12-17  8:13 UTC (permalink / raw)
  To: Thorsten Leemhuis, stable, Greg KH
  Cc: tlinux, linux-input, regressions, linux-usb

Hi,

On 12/17/21 08:00, Thorsten Leemhuis wrote:
> Hi, this is your Linux kernel regression tracker speaking.
> 
> I noticed a bugreport from Tomasz C. (CCed) that sounds a lot like a
> regression between v5.15.7..v5.15.8 and likely better dealt with by email:
> 
> To quote from: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> 
>> After updating kernel from 5.15.7 to 5.15.8 on ArchLinux distribution, Holtek USB mouse stopped working.
>> Exact model:
>> 04d9:a067 Holtek Semiconductor, Inc. USB Gaming Mouse
>>
>> The dmesg output for this device from kernel version 5.15.8:
>>
>> [    2.501958] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
>> [    2.624369] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
>> [    2.624376] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>> [    2.624379] usb 2-1.2.3: Product: USB Gaming Mouse
>> [    2.624382] usb 2-1.2.3: Manufacturer: Holtek
>>
>> After disconnecting and connecting the USB:
>>
>> [   71.976731] usb 2-1.2.3: USB disconnect, device number 6
>> [   75.013021] usb 2-1.2.3: new full-speed USB device number 8 using ehci-pci
>> [   75.135865] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
>> [   75.135873] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>> [   75.135877] usb 2-1.2.3: Product: USB Gaming Mouse
>> [   75.135880] usb 2-1.2.3: Manufacturer: Holtek
>>
>>
>> On kernel version 5.15.7:
>>
>> [    2.280515] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
>> [    2.379777] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
>> [    2.379784] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>> [    2.379787] usb 2-1.2.3: Product: USB Gaming Mouse
>> [    2.379790] usb 2-1.2.3: Manufacturer: Holtek
>> [    2.398578] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:04D9:A067.0005/input/input11
>> [    2.450977] holtek_mouse 0003:04D9:A067.0005: input,hidraw4: USB HID v1.10 Keyboard [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input0
>> [    2.451013] holtek_mouse 0003:04D9:A067.0006: Fixing up report descriptor
>> [    2.452189] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.1/0003:04D9:A067.0006/input/input12
>> [    2.468510] usb 2-1.2.4: new high-speed USB device number 7 using ehci-pci
>> [    2.503913] holtek_mouse 0003:04D9:A067.0006: input,hiddev96,hidraw5: USB HID v1.10 Mouse [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input1
>> [    2.504105] holtek_mouse 0003:04D9:A067.0007: hiddev97,hidraw6: USB HID v1.10 Device [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input2
>>
>> Rolling back the kernel to version 5.15.7 solves the problem.

Oops, sorry. An overlook from a precedent commit.

Can you confirm the following patch works? (and also tell me if the
links I put are sufficient for regzbot)
---
rom 8f38596f2620c4b22ff9e2622917ac2b69aa8320 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Fri, 17 Dec 2021 09:03:32 +0100
Subject: [PATCH] HID: holtek: fix mouse probing

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")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341
Link: https://lore.kernel.org/regressions/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
  drivers/hid/hid-holtek-mouse.c | 15 +++++++++++++++
  1 file changed, 15 insertions(+)

diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
index b7172c48ef9f..7c907939bfae 100644
--- a/drivers/hid/hid-holtek-mouse.c
+++ b/drivers/hid/hid-holtek-mouse.c
@@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
  static int holtek_mouse_probe(struct hid_device *hdev,
  			      const struct hid_device_id *id)
  {
+	int ret;
+
  	if (!hid_is_usb(hdev))
  		return -EINVAL;
+
+	ret = hid_parse(hdev);
+	if (ret) {
+		hid_err(hdev, "hid parse failed: %d\n", ret);
+		return ret;
+	}
+
+	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
+	if (ret) {
+		hid_err(hdev, "hw start failed: %d\n", ret);
+		return ret;
+	}
+
  	return 0;
  }
  
-- 
2.31.1
---

Cheers,
Benjamin

> 
> [TLDR for the rest of the mail: adding this regression to regzbot; most
> text you find below is compiled from a few templates paragraphs some of
> you might have seen already.]
> 
> To be sure this issue doesn't fall through the cracks unnoticed, I'm
> adding it to regzbot, my Linux kernel regression tracking bot:
> 
> #regzbot introduced v5.15.7..v5.15.8
> #regzbot title usb: Holtek mouse stopped working
> 
> Reminder: when fixing the issue, please add a 'Link:' tag with the URL
> to this report and the bugzilla ticket, then regzbot will automatically
> mark the regression as resolved once the fix lands in the appropriate
> tree. For more details about regzbot see footer.
> 
> Ciao, Thorsten (wearing his 'Linux kernel regression tracker' hat).
> 
> P.S.: As a Linux kernel regression tracker I'm getting a lot of reports
> on my table. I can only look briefly into most of them. Unfortunately
> therefore I sometimes will get things wrong or miss something important.
> I hope that's not the case here; if you think it is, don't hesitate to
> tell me about it in a public reply. That's in everyone's interest, as
> what I wrote above might be misleading to everyone reading this; any
> suggestion I gave thus might sent someone reading this down the wrong
> rabbit hole, which none of us wants.
> 
> BTW, I have no personal interest in this issue, which is tracked using
> regzbot, my Linux kernel regression tracking bot
> (https://linux-regtracking.leemhuis.info/regzbot/). I'm only posting
> this mail to get things rolling again and hence don't need to be CC on
> all further activities wrt to this regression.
> 
> 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-17  8:13 ` Benjamin Tissoires
@ 2021-12-17  8:26   ` Greg KH
  2021-12-17  8:29     ` Benjamin Tissoires
  2021-12-17  8:37   ` Thorsten Leemhuis
  1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2021-12-17  8:26 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Thorsten Leemhuis, stable, tlinux, linux-input, regressions, linux-usb

On Fri, Dec 17, 2021 at 09:13:15AM +0100, Benjamin Tissoires wrote:
> Hi,
> 
> On 12/17/21 08:00, Thorsten Leemhuis wrote:
> > Hi, this is your Linux kernel regression tracker speaking.
> > 
> > I noticed a bugreport from Tomasz C. (CCed) that sounds a lot like a
> > regression between v5.15.7..v5.15.8 and likely better dealt with by email:
> > 
> > To quote from: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> > 
> > > After updating kernel from 5.15.7 to 5.15.8 on ArchLinux distribution, Holtek USB mouse stopped working.
> > > Exact model:
> > > 04d9:a067 Holtek Semiconductor, Inc. USB Gaming Mouse
> > > 
> > > The dmesg output for this device from kernel version 5.15.8:
> > > 
> > > [    2.501958] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> > > [    2.624369] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > > [    2.624376] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > > [    2.624379] usb 2-1.2.3: Product: USB Gaming Mouse
> > > [    2.624382] usb 2-1.2.3: Manufacturer: Holtek
> > > 
> > > After disconnecting and connecting the USB:
> > > 
> > > [   71.976731] usb 2-1.2.3: USB disconnect, device number 6
> > > [   75.013021] usb 2-1.2.3: new full-speed USB device number 8 using ehci-pci
> > > [   75.135865] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > > [   75.135873] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > > [   75.135877] usb 2-1.2.3: Product: USB Gaming Mouse
> > > [   75.135880] usb 2-1.2.3: Manufacturer: Holtek
> > > 
> > > 
> > > On kernel version 5.15.7:
> > > 
> > > [    2.280515] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> > > [    2.379777] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > > [    2.379784] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > > [    2.379787] usb 2-1.2.3: Product: USB Gaming Mouse
> > > [    2.379790] usb 2-1.2.3: Manufacturer: Holtek
> > > [    2.398578] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:04D9:A067.0005/input/input11
> > > [    2.450977] holtek_mouse 0003:04D9:A067.0005: input,hidraw4: USB HID v1.10 Keyboard [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input0
> > > [    2.451013] holtek_mouse 0003:04D9:A067.0006: Fixing up report descriptor
> > > [    2.452189] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.1/0003:04D9:A067.0006/input/input12
> > > [    2.468510] usb 2-1.2.4: new high-speed USB device number 7 using ehci-pci
> > > [    2.503913] holtek_mouse 0003:04D9:A067.0006: input,hiddev96,hidraw5: USB HID v1.10 Mouse [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input1
> > > [    2.504105] holtek_mouse 0003:04D9:A067.0007: hiddev97,hidraw6: USB HID v1.10 Device [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input2
> > > 
> > > Rolling back the kernel to version 5.15.7 solves the problem.
> 
> Oops, sorry. An overlook from a precedent commit.
> 
> Can you confirm the following patch works? (and also tell me if the
> links I put are sufficient for regzbot)
> ---
> rom 8f38596f2620c4b22ff9e2622917ac2b69aa8320 Mon Sep 17 00:00:00 2001
> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Date: Fri, 17 Dec 2021 09:03:32 +0100
> Subject: [PATCH] HID: holtek: fix mouse probing
> 
> 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")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> Link: https://lore.kernel.org/regressions/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>  drivers/hid/hid-holtek-mouse.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
> index b7172c48ef9f..7c907939bfae 100644
> --- a/drivers/hid/hid-holtek-mouse.c
> +++ b/drivers/hid/hid-holtek-mouse.c
> @@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
>  static int holtek_mouse_probe(struct hid_device *hdev,
>  			      const struct hid_device_id *id)
>  {
> +	int ret;
> +
>  	if (!hid_is_usb(hdev))
>  		return -EINVAL;
> +
> +	ret = hid_parse(hdev);
> +	if (ret) {
> +		hid_err(hdev, "hid parse failed: %d\n", ret);
> +		return ret;
> +	}
> +
> +	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
> +	if (ret) {
> +		hid_err(hdev, "hw start failed: %d\n", ret);
> +		return ret;
> +	}
> +
>  	return 0;
>  }
> -- 
> 2.31.1

Ugh, my fault, you did warn me about the probe function, I should have
noticed this was required, sorry about that.

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-17  8:26   ` Greg KH
@ 2021-12-17  8:29     ` Benjamin Tissoires
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Tissoires @ 2021-12-17  8:29 UTC (permalink / raw)
  To: Greg KH
  Cc: Thorsten Leemhuis, stable, tlinux, open list:HID CORE LAYER,
	regressions, linux-usb

On Fri, Dec 17, 2021 at 9:26 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Dec 17, 2021 at 09:13:15AM +0100, Benjamin Tissoires wrote:
> > Hi,
> >
> > On 12/17/21 08:00, Thorsten Leemhuis wrote:
> > > Hi, this is your Linux kernel regression tracker speaking.
> > >
> > > I noticed a bugreport from Tomasz C. (CCed) that sounds a lot like a
> > > regression between v5.15.7..v5.15.8 and likely better dealt with by email:
> > >
> > > To quote from: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> > >
> > > > After updating kernel from 5.15.7 to 5.15.8 on ArchLinux distribution, Holtek USB mouse stopped working.
> > > > Exact model:
> > > > 04d9:a067 Holtek Semiconductor, Inc. USB Gaming Mouse
> > > >
> > > > The dmesg output for this device from kernel version 5.15.8:
> > > >
> > > > [    2.501958] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> > > > [    2.624369] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > > > [    2.624376] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > > > [    2.624379] usb 2-1.2.3: Product: USB Gaming Mouse
> > > > [    2.624382] usb 2-1.2.3: Manufacturer: Holtek
> > > >
> > > > After disconnecting and connecting the USB:
> > > >
> > > > [   71.976731] usb 2-1.2.3: USB disconnect, device number 6
> > > > [   75.013021] usb 2-1.2.3: new full-speed USB device number 8 using ehci-pci
> > > > [   75.135865] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > > > [   75.135873] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > > > [   75.135877] usb 2-1.2.3: Product: USB Gaming Mouse
> > > > [   75.135880] usb 2-1.2.3: Manufacturer: Holtek
> > > >
> > > >
> > > > On kernel version 5.15.7:
> > > >
> > > > [    2.280515] usb 2-1.2.3: new full-speed USB device number 6 using ehci-pci
> > > > [    2.379777] usb 2-1.2.3: New USB device found, idVendor=04d9, idProduct=a067, bcdDevice= 1.16
> > > > [    2.379784] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > > > [    2.379787] usb 2-1.2.3: Product: USB Gaming Mouse
> > > > [    2.379790] usb 2-1.2.3: Manufacturer: Holtek
> > > > [    2.398578] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:04D9:A067.0005/input/input11
> > > > [    2.450977] holtek_mouse 0003:04D9:A067.0005: input,hidraw4: USB HID v1.10 Keyboard [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input0
> > > > [    2.451013] holtek_mouse 0003:04D9:A067.0006: Fixing up report descriptor
> > > > [    2.452189] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.1/0003:04D9:A067.0006/input/input12
> > > > [    2.468510] usb 2-1.2.4: new high-speed USB device number 7 using ehci-pci
> > > > [    2.503913] holtek_mouse 0003:04D9:A067.0006: input,hiddev96,hidraw5: USB HID v1.10 Mouse [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input1
> > > > [    2.504105] holtek_mouse 0003:04D9:A067.0007: hiddev97,hidraw6: USB HID v1.10 Device [Holtek USB Gaming Mouse] on usb-0000:00:1d.0-1.2.3/input2
> > > >
> > > > Rolling back the kernel to version 5.15.7 solves the problem.
> >
> > Oops, sorry. An overlook from a precedent commit.
> >
> > Can you confirm the following patch works? (and also tell me if the
> > links I put are sufficient for regzbot)
> > ---
> > rom 8f38596f2620c4b22ff9e2622917ac2b69aa8320 Mon Sep 17 00:00:00 2001
> > From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > Date: Fri, 17 Dec 2021 09:03:32 +0100
> > Subject: [PATCH] HID: holtek: fix mouse probing
> >
> > 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")
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> > Link: https://lore.kernel.org/regressions/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > ---
> >  drivers/hid/hid-holtek-mouse.c | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
> > index b7172c48ef9f..7c907939bfae 100644
> > --- a/drivers/hid/hid-holtek-mouse.c
> > +++ b/drivers/hid/hid-holtek-mouse.c
> > @@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
> >  static int holtek_mouse_probe(struct hid_device *hdev,
> >                             const struct hid_device_id *id)
> >  {
> > +     int ret;
> > +
> >       if (!hid_is_usb(hdev))
> >               return -EINVAL;
> > +
> > +     ret = hid_parse(hdev);
> > +     if (ret) {
> > +             hid_err(hdev, "hid parse failed: %d\n", ret);
> > +             return ret;
> > +     }
> > +
> > +     ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
> > +     if (ret) {
> > +             hid_err(hdev, "hw start failed: %d\n", ret);
> > +             return ret;
> > +     }
> > +
> >       return 0;
> >  }
> > --
> > 2.31.1
>
> Ugh, my fault, you did warn me about the probe function, I should have
> noticed this was required, sorry about that.
>

Well, honestly, I should have detected it when reviewing. So we both
share the blame :)

Cheers,
Benjamin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-17  8:13 ` Benjamin Tissoires
  2021-12-17  8:26   ` Greg KH
@ 2021-12-17  8:37   ` Thorsten Leemhuis
  2021-12-18 20:39     ` Tomasz C.
  1 sibling, 1 reply; 8+ messages in thread
From: Thorsten Leemhuis @ 2021-12-17  8:37 UTC (permalink / raw)
  To: Benjamin Tissoires, stable, Greg KH
  Cc: tlinux, linux-input, regressions, linux-usb

On 17.12.21 09:13, Benjamin Tissoires wrote:
> Hi,
> 
> On 12/17/21 08:00, Thorsten Leemhuis wrote:
>> Hi, this is your Linux kernel regression tracker speaking.
>>
>> I noticed a bugreport from Tomasz C. (CCed) that sounds a lot like a
>> regression between v5.15.7..v5.15.8 and likely better dealt with by
>> email:
>>
>> To quote from: https://bugzilla.kernel.org/show_bug.cgi?id=215341
>>
>>> After updating kernel from 5.15.7 to 5.15.8 on ArchLinux
>>> distribution, Holtek USB mouse stopped working.
>>> Exact model:
>>> 04d9:a067 Holtek Semiconductor, Inc. USB Gaming Mouse
>>>
>>> The dmesg output for this device from kernel version 5.15.8:
>>>
>>> [    2.501958] usb 2-1.2.3: new full-speed USB device number 6 using
>>> ehci-pci
>>> [    2.624369] usb 2-1.2.3: New USB device found, idVendor=04d9,
>>> idProduct=a067, bcdDevice= 1.16
>>> [    2.624376] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2,
>>> SerialNumber=0
>>> [    2.624379] usb 2-1.2.3: Product: USB Gaming Mouse
>>> [    2.624382] usb 2-1.2.3: Manufacturer: Holtek
>>>
>>> After disconnecting and connecting the USB:
>>>
>>> [   71.976731] usb 2-1.2.3: USB disconnect, device number 6
>>> [   75.013021] usb 2-1.2.3: new full-speed USB device number 8 using
>>> ehci-pci
>>> [   75.135865] usb 2-1.2.3: New USB device found, idVendor=04d9,
>>> idProduct=a067, bcdDevice= 1.16
>>> [   75.135873] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2,
>>> SerialNumber=0
>>> [   75.135877] usb 2-1.2.3: Product: USB Gaming Mouse
>>> [   75.135880] usb 2-1.2.3: Manufacturer: Holtek
>>>
>>>
>>> On kernel version 5.15.7:
>>>
>>> [    2.280515] usb 2-1.2.3: new full-speed USB device number 6 using
>>> ehci-pci
>>> [    2.379777] usb 2-1.2.3: New USB device found, idVendor=04d9,
>>> idProduct=a067, bcdDevice= 1.16
>>> [    2.379784] usb 2-1.2.3: New USB device strings: Mfr=1, Product=2,
>>> SerialNumber=0
>>> [    2.379787] usb 2-1.2.3: Product: USB Gaming Mouse
>>> [    2.379790] usb 2-1.2.3: Manufacturer: Holtek
>>> [    2.398578] input: Holtek USB Gaming Mouse as
>>> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:04D9:A067.0005/input/input11
>>>
>>> [    2.450977] holtek_mouse 0003:04D9:A067.0005: input,hidraw4: USB
>>> HID v1.10 Keyboard [Holtek USB Gaming Mouse] on
>>> usb-0000:00:1d.0-1.2.3/input0
>>> [    2.451013] holtek_mouse 0003:04D9:A067.0006: Fixing up report
>>> descriptor
>>> [    2.452189] input: Holtek USB Gaming Mouse as
>>> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.1/0003:04D9:A067.0006/input/input12
>>>
>>> [    2.468510] usb 2-1.2.4: new high-speed USB device number 7 using
>>> ehci-pci
>>> [    2.503913] holtek_mouse 0003:04D9:A067.0006:
>>> input,hiddev96,hidraw5: USB HID v1.10 Mouse [Holtek USB Gaming Mouse]
>>> on usb-0000:00:1d.0-1.2.3/input1
>>> [    2.504105] holtek_mouse 0003:04D9:A067.0007: hiddev97,hidraw6:
>>> USB HID v1.10 Device [Holtek USB Gaming Mouse] on
>>> usb-0000:00:1d.0-1.2.3/input2
>>>
>>> Rolling back the kernel to version 5.15.7 solves the problem.
> 
> Oops, sorry. An overlook from a precedent commit.
> 
> Can you confirm the following patch works?

Tomasz, could you give it a try please?

> (and also tell me if the
> links I put are sufficient for regzbot)

They should be, many thx for placing them. But FWIW, by ...

> ---
> rom 8f38596f2620c4b22ff9e2622917ac2b69aa8320 Mon Sep 17 00:00:00 2001
> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Date: Fri, 17 Dec 2021 09:03:32 +0100
> Subject: [PATCH] HID: holtek: fix mouse probing
> 
> 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")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341
> Link:
> https://lore.kernel.org/regressions/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/

...kernel standards you should use the kernel.org redirector here
instead by doing a a s!regressions!r! (regzbot doesn't care; I'll
improve my text templates to make this more obvious).

Ciao, Thorsten

> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>  drivers/hid/hid-holtek-mouse.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/hid/hid-holtek-mouse.c
> b/drivers/hid/hid-holtek-mouse.c
> index b7172c48ef9f..7c907939bfae 100644
> --- a/drivers/hid/hid-holtek-mouse.c
> +++ b/drivers/hid/hid-holtek-mouse.c
> @@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct
> hid_device *hdev, __u8 *rdesc,
>  static int holtek_mouse_probe(struct hid_device *hdev,
>                    const struct hid_device_id *id)
>  {
> +    int ret;
> +
>      if (!hid_is_usb(hdev))
>          return -EINVAL;
> +
> +    ret = hid_parse(hdev);
> +    if (ret) {
> +        hid_err(hdev, "hid parse failed: %d\n", ret);
> +        return ret;
> +    }
> +
> +    ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
> +    if (ret) {
> +        hid_err(hdev, "hw start failed: %d\n", ret);
> +        return ret;
> +    }
> +
>      return 0;
>  }
>  

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-17  8:37   ` Thorsten Leemhuis
@ 2021-12-18 20:39     ` Tomasz C.
  2021-12-20 14:09       ` Benjamin Tissoires
  0 siblings, 1 reply; 8+ messages in thread
From: Tomasz C. @ 2021-12-18 20:39 UTC (permalink / raw)
  To: Benjamin Tissoires, stable, Greg KH, Thorsten Leemhuis
  Cc: tlinux, linux-input, regressions, linux-usb

Hello,

I haven't had time to test it yet. But I see that another ArchLinux user has 
compiled kernel 5.15.10 with this patch and confirms that the mouse works.
Details on:
https://bugs.archlinux.org/task/73048#comment204441

Is this enough for you as a test?

-- 
Tomasz Cebula
Dnia piątek, 17 grudnia 2021 09:37:11 CET Thorsten Leemhuis pisze:

> Tomasz, could you give it a try please?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8
  2021-12-18 20:39     ` Tomasz C.
@ 2021-12-20 14:09       ` Benjamin Tissoires
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Tissoires @ 2021-12-20 14:09 UTC (permalink / raw)
  To: Tomasz C.
  Cc: stable, Greg KH, Thorsten Leemhuis, open list:HID CORE LAYER,
	regressions, linux-usb

On Sat, Dec 18, 2021 at 9:39 PM Tomasz C. <tlinux@cebula.eu.org> wrote:
>
> Hello,
>
> I haven't had time to test it yet. But I see that another ArchLinux user has
> compiled kernel 5.15.10 with this patch and confirms that the mouse works.
> Details on:
> https://bugs.archlinux.org/task/73048#comment204441
>
> Is this enough for you as a test?

Yep, thanks a lot.

I have now pushed this to hid.git for-5.16/upstream-fixes with the
updated link, cc-ed stable and also added that archlinux bug.

Cheers,
Benjamin

>
> --
> Tomasz Cebula
> Dnia piątek, 17 grudnia 2021 09:37:11 CET Thorsten Leemhuis pisze:
>
> > Tomasz, could you give it a try please?
>
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-20 14:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17  7:00 FWD: Holtek mouse stopped working after kernel upgrade from 5.15.7 to 5.15.8 Thorsten Leemhuis
2021-12-17  7:17 ` Greg KH
2021-12-17  8:13 ` Benjamin Tissoires
2021-12-17  8:26   ` Greg KH
2021-12-17  8:29     ` Benjamin Tissoires
2021-12-17  8:37   ` Thorsten Leemhuis
2021-12-18 20:39     ` Tomasz C.
2021-12-20 14:09       ` Benjamin Tissoires

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.