Linux Input/HID development
 help / color / mirror / Atom feed
From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Brett Raye <braye@fastmail.com>,
	 benjamin.tissoires@redhat.com, linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: glorious: fix Glorious Model I HID report
Date: Tue, 21 Nov 2023 14:15:40 -0800	[thread overview]
Message-ID: <87pm02g3cj.fsf@nvidia.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2311210938070.29220@cbobk.fhfr.pm> (Jiri Kosina's message of "Tue, 21 Nov 2023 09:38:16 +0100 (CET)")

On Tue, 21 Nov, 2023 09:38:16 +0100 Jiri Kosina <jikos@kernel.org> wrote:
> On Thu, 2 Nov 2023, Brett Raye wrote:
>
>> The Glorious Model I mouse has a buggy HID report descriptor for its
>> keyboard endpoint (used for programmable buttons). For report ID 2, there
>> is a mismatch between Logical Minimum and Usage Minimum in the array that
>> reports keycodes.
>> 
>> The offending portion of the descriptor: (from hid-decode)
>> 
>> 0x95, 0x05,                    //  Report Count (5)                   30
>> 0x75, 0x08,                    //  Report Size (8)                    32
>> 0x15, 0x00,                    //  Logical Minimum (0)                34
>> 0x25, 0x65,                    //  Logical Maximum (101)              36
>> 0x05, 0x07,                    //  Usage Page (Keyboard)              38
>> 0x19, 0x01,                    //  Usage Minimum (1)                  40
>> 0x29, 0x65,                    //  Usage Maximum (101)                42
>> 0x81, 0x00,                    //  Input (Data,Arr,Abs)               44
>> 
>> This bug shifts all programmed keycodes up by 1. Importantly, this causes
>> "empty" array indexes of 0x00 to be interpreted as 0x01, ErrorRollOver.
>> The presence of ErrorRollOver causes the system to ignore all keypresses
>> from the endpoint and breaks the ability to use the programmable buttons.
>> 
>> Setting byte 41 to 0x00 fixes this, and causes keycodes to be interpreted
>> correctly.
>> 
>> Also, USB_VENDOR_ID_GLORIOUS is changed to USB_VENDOR_ID_SINOWEALTH,
>> and a new ID for Laview Technology is added. Glorious seems to be
>> white-labeling controller boards or mice from these vendors. There isn't a
>> single canonical vendor ID for Glorious products.
>> 
>> Signed-off-by: Brett Raye <braye@fastmail.com>
>
> Applied, thanks.

Hi Jiri,

Did you apply the v2 of this patch or the v1?

  https://lore.kernel.org/linux-input/20231106235557.8741-1-braye@fastmail.com/

I think the v2 would be better given the patch split.

--
Thanks,

Rahul Rameshbabu

      reply	other threads:[~2023-11-21 22:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03  1:10 [PATCH] HID: glorious: fix Glorious Model I HID report Brett Raye
2023-11-06  3:28 ` Rahul Rameshbabu
2023-11-21  8:38 ` Jiri Kosina
2023-11-21 22:15   ` Rahul Rameshbabu [this message]

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=87pm02g3cj.fsf@nvidia.com \
    --to=rrameshbabu@nvidia.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=braye@fastmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.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