]> git.itanic.dy.fi Git - linux-stable/commit
HID: logitech-hidpp: Don't use the USB serial for USB devices
authorBastien Nocera <hadess@hadess.net>
Thu, 2 Mar 2023 13:01:16 +0000 (14:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:38:35 +0000 (12:38 +0100)
commit25d78acd3901dbc6b6dcca052c166e2b7b527f72
treee77a205fc6ccf7c06ef3edb940ea22e70aef31bd
parent8809b5e3bca90170deb466d7f4447dc91c8569da
HID: logitech-hidpp: Don't use the USB serial for USB devices

[ Upstream commit 7ad1fe0da0fa91bf920b79ab05ae97bfabecc4f4 ]

For devices that support the 0x0003 feature (Device Information) version 4,
set the serial based on the output of that feature, rather than relying
on the usbhid code setting the USB serial.

This should allow the serial when connected through USB to (nearly)
match the one when connected through a unifying receiver.

For example, on the serials on a G903 wired/wireless mouse:
- Unifying: 4067-e8-ce-cd-45
- USB before patch: 017C385C3837
- USB after patch: c086-e8-ce-cd-45

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20230302130117.3975-1-hadess@hadess.net
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-logitech-hidpp.c