Re: [PATCH] HID: glorious: fix Glorious Model I HID report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux