* [PATCH] HID: logitech-hidpp: Silence protocol errors on newer lightspeed receivers
@ 2025-10-02 19:24 Mavroudis Chatzilazaridis
2025-10-02 23:14 ` Stuart
2025-10-14 9:53 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Mavroudis Chatzilazaridis @ 2025-10-02 19:24 UTC (permalink / raw)
To: jikos, stuart.a.hayhurst; +Cc: linux-input, bentiss, hadess, lains, mavchatz
When logitech-hidpp tries to communicate with an unreachable device paired
to a 046d:c547 lightspeed receiver, the following message is printed to the
console:
hidpp_root_get_protocol_version: received protocol error 0x08
This occurs because this receiver returns 0x08 (HIDPP_ERROR_UNKNOWN_DEVICE)
when a device is unreachable, compared to 0x09 (HIDPP_ERROR_RESOURCE_ERROR)
that the older receivers return.
This patch silences this harmless error by treating
HIDPP_ERROR_UNKNOWN_DEVICE the same as HIDPP_ERROR_RESOURCE_ERROR
in hidpp_root_get_protocol_version().
There are other checks for HIDPP_ERROR_RESOURCE_ERROR found in
battery-related functions, however this receiver does not trigger them when
the device is disconnected.
Signed-off-by: Mavroudis Chatzilazaridis <mavchatz@protonmail.com>
---
drivers/hid/hid-logitech-hidpp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index aaef405a717e..1d46783384ed 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -969,7 +969,8 @@ static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp)
}
/* the device might not be connected */
- if (ret == HIDPP_ERROR_RESOURCE_ERROR)
+ if (ret == HIDPP_ERROR_RESOURCE_ERROR ||
+ ret == HIDPP_ERROR_UNKNOWN_DEVICE)
return -EIO;
if (ret > 0) {
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: logitech-hidpp: Silence protocol errors on newer lightspeed receivers
2025-10-02 19:24 [PATCH] HID: logitech-hidpp: Silence protocol errors on newer lightspeed receivers Mavroudis Chatzilazaridis
@ 2025-10-02 23:14 ` Stuart
2025-10-14 9:53 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Stuart @ 2025-10-02 23:14 UTC (permalink / raw)
To: Mavroudis Chatzilazaridis; +Cc: jikos, linux-input, bentiss, hadess, lains
Tested on 6.17.0 with a handful of other patches:
- https://lore.kernel.org/all/20250927234834.2635483-1-mavchatz@protonmail.com/
- https://lore.kernel.org/all/20251002193025.2066319-1-mavchatz@protonmail.com/
Gets rid of that annoying warning on my Logitech G915 TKL keyboard
No regressions on my Logitech G502 Lightspeed Wireless mouse
Tested-by: Stuart Hayhurst <stuart.a.hayhurst@gmail.com>
Thanks,
Stuart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: logitech-hidpp: Silence protocol errors on newer lightspeed receivers
2025-10-02 19:24 [PATCH] HID: logitech-hidpp: Silence protocol errors on newer lightspeed receivers Mavroudis Chatzilazaridis
2025-10-02 23:14 ` Stuart
@ 2025-10-14 9:53 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2025-10-14 9:53 UTC (permalink / raw)
To: Mavroudis Chatzilazaridis
Cc: stuart.a.hayhurst, linux-input, bentiss, hadess, lains
On Thu, 2 Oct 2025, Mavroudis Chatzilazaridis wrote:
> When logitech-hidpp tries to communicate with an unreachable device paired
> to a 046d:c547 lightspeed receiver, the following message is printed to the
> console:
>
> hidpp_root_get_protocol_version: received protocol error 0x08
>
> This occurs because this receiver returns 0x08 (HIDPP_ERROR_UNKNOWN_DEVICE)
> when a device is unreachable, compared to 0x09 (HIDPP_ERROR_RESOURCE_ERROR)
> that the older receivers return.
>
> This patch silences this harmless error by treating
> HIDPP_ERROR_UNKNOWN_DEVICE the same as HIDPP_ERROR_RESOURCE_ERROR
> in hidpp_root_get_protocol_version().
>
> There are other checks for HIDPP_ERROR_RESOURCE_ERROR found in
> battery-related functions, however this receiver does not trigger them when
> the device is disconnected.
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-14 9:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 19:24 [PATCH] HID: logitech-hidpp: Silence protocol errors on newer lightspeed receivers Mavroudis Chatzilazaridis
2025-10-02 23:14 ` Stuart
2025-10-14 9:53 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).