]> git.baikalelectronics.ru Git - kernel.git/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:44:03 +0000 (12:44 +0100)
commit26b02b5df603a785631d61f5d13903e4bf3f69e9
tree6cc4dbf8848cf776581dc2c27f1981e7c7ec4eaa
parente09f96019d6d2b23abcabf40917c84a901e7b11d
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