linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Filipe Laíns" <lains@archlinux.org>
To: markh@compro.net, Jiri Kosina <jkosina@suse.cz>,
	sashal@kernel.org, Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Logitech G602 wireless mouse kernel error messages in 5.10.11+ kernels
Date: Wed, 10 Mar 2021 19:56:54 +0000	[thread overview]
Message-ID: <bb840ecf8dc626a07b9f00af69b0d561fb60f75b.camel@archlinux.org> (raw)
In-Reply-To: <ac5dde9c-194f-ce40-5c13-2a6890fad6a9@compro.net>

[-- Attachment #1: Type: text/plain, Size: 4767 bytes --]

On Wed, 2021-03-10 at 13:55 -0500, Mark Hounschell wrote:
> I have been using a Logitech wireless G602 mouse since forever. As of 
> kernel 5.10.11 I get the following kernel messages;
> 
> 
> $dmesg | grep -i logitech
(snip)
> .
> .
> .
> Every mouse event seems to produce another "Unexpected input report 
> number 128" kernel message.
> 
> The commit that started this is:
> 
> commit 1e6fc9768ed2c3917e1fd7af26cb194dfe14f7da
> Author: Filipe Laíns <lains@archlinux.org>
> Date:   Mon Jan 4 20:47:17 2021 +0000
> 
>      HID: logitech-dj: add the G602 receiver
> 
>      [ Upstream commit e400071a805d6229223a98899e9da8c6233704a1 ]
> 
>      Tested. The device gets correctly exported to userspace and I can see
>      mouse and keyboard events.
> 
>      Signed-off-by: Filipe Laíns <lains@archlinux.org>
>      Signed-off-by: Jiri Kosina <jkosina@suse.cz>
>      Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> The actual patch:
> 
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index 1ffcfc9a1e033..45e7e0bdd382b 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -1869,6 +1869,10 @@ static const struct hid_device_id 
> logi_dj_receivers[] = {
>            HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
>                  0xc531),
>           .driver_data = recvr_type_gaming_hidpp},
> +       { /* Logitech G602 receiver (0xc537) */
> +         HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
> +               0xc537),
> +        .driver_data = recvr_type_gaming_hidpp},
>          { /* Logitech lightspeed receiver (0xc539) */
>            HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
>                  USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1),
> 
> 
> 
> markh@harley:~> lsusb
> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 003 Device 003: ID 046d:c537 Logitech, Inc.
> Bus 003 Device 002: ID 0424:2504 Standard Microsystems Corp. USB 2.0 Hub
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> 
> 
> With the patch reverted:
> 
> $dmesg | grep -i logitech
(snip)
> 
> $lsusb
> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 003 Device 003: ID 046d:c537 Logitech, Inc.
> Bus 003 Device 002: ID 0424:2504 Standard Microsystems Corp. USB 2.0 Hub
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> With or without the patch and error messages the mouse has always worked.
> 
> Regards
> Mark

Yes, sorry about that. The following patch should fix it, can you confirm?
You probably didn't notice any breakage because you do not have any of your
buttons bound to keyboard events.


commit ef07c116d98772952807492bd32a61f5af172a94 (hid/for-5.11/upstream-fixes)
Author: Filipe Laíns <lains@riseup.net>
Date:   Fri Feb 5 14:34:44 2021 +0000

    HID: logitech-dj: add support for keyboard events in eQUAD step 4 Gaming

    In e400071a805d6229223a98899e9da8c6233704a1 I added support for the
    receiver that comes with the G602 device, but unfortunately I screwed up
    during testing and it seems the keyboard events were actually not being
    sent to userspace.
    This resulted in keyboard events being broken in userspace, please
    backport the fix.

    The receiver uses the normal 0x01 Logitech keyboard report descriptor,
    as expected, so it is just a matter of flagging it as supported.

    Reported in
    https://github.com/libratbag/libratbag/issues/1124

    Fixes: e400071a805d6 ("HID: logitech-dj: add the G602 receiver")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Filipe Laíns <lains@riseup.net>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 45e7e0bdd382..fcdc922bc973 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -980,6 +980,7 @@ static void logi_hidpp_recv_queue_notif(struct hid_device
*hdev,
        case 0x07:
                device_type = "eQUAD step 4 Gaming";
                logi_hidpp_dev_conn_notif_equad(hdev, hidpp_report, &workitem);
+               workitem.reports_supported |= STD_KEYBOARD;
                break;
        case 0x08:
                device_type = "eQUAD step 4 for gamepads";


Cheers,
Filipe Laíns

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-03-10 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 18:55 Logitech G602 wireless mouse kernel error messages in 5.10.11+ kernels Mark Hounschell
2021-03-10 19:56 ` Filipe Laíns [this message]
2021-03-10 20:24   ` Mark Hounschell
2021-03-10 20:49     ` Mark Hounschell
2021-03-10 20:55     ` Filipe Laíns
2021-03-10 21:48       ` Hans de Goede
2021-03-11 17:39         ` Mark Hounschell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb840ecf8dc626a07b9f00af69b0d561fb60f75b.camel@archlinux.org \
    --to=lains@archlinux.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markh@compro.net \
    --cc=sashal@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).