@@ -673,15 +673,16 @@ static int corsair_input_mapping(struct hid_device *dev,
673
673
}
674
674
675
675
/*
676
- * The report descriptor of Corsair Scimitar RGB Pro gaming mouse is
676
+ * The report descriptor of some of the Corsair gaming mice is
677
677
* non parseable as they define two consecutive Logical Minimum for
678
678
* the Usage Page (Consumer) in rdescs bytes 75 and 77 being 77 0x16
679
679
* that should be obviousy 0x26 for Logical Magimum of 16 bits. This
680
680
* prevents poper parsing of the report descriptor due Logical
681
681
* Minimum being larger than Logical Maximum.
682
682
*
683
683
* This driver fixes the report descriptor for:
684
- * - USB ID b1c:1b3e, sold as Scimitar RGB Pro Gaming mouse
684
+ * - USB ID 1b1c:1b34, sold as GLAIVE RGB Gaming mouse
685
+ * - USB ID 1b1c:1b3e, sold as Scimitar RGB Pro Gaming mouse
685
686
*/
686
687
687
688
static __u8 * corsair_mouse_report_fixup (struct hid_device * hdev , __u8 * rdesc ,
@@ -691,13 +692,14 @@ static __u8 *corsair_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
691
692
692
693
if (intf -> cur_altsetting -> desc .bInterfaceNumber == 1 ) {
693
694
/*
694
- * Corsair Scimitar RGB Pro report descriptor is broken and
695
- * defines two different Logical Minimum for the Consumer
696
- * Application. The byte 77 should be a 0x26 defining a 16
697
- * bits integer for the Logical Maximum but it is a 0x16
695
+ * Corsair GLAIVE RGB and Scimitar RGB Pro report descriptor is
696
+ * broken and defines two different Logical Minimum for the
697
+ * Consumer Application. The byte 77 should be a 0x26 defining
698
+ * a 16 bits integer for the Logical Maximum but it is a 0x16
698
699
* instead (Logical Minimum)
699
700
*/
700
701
switch (hdev -> product ) {
702
+ case USB_DEVICE_ID_CORSAIR_GLAIVE_RGB :
701
703
case USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB :
702
704
if (* rsize >= 172 && rdesc [75 ] == 0x15 && rdesc [77 ] == 0x16
703
705
&& rdesc [78 ] == 0xff && rdesc [79 ] == 0x0f ) {
@@ -715,6 +717,8 @@ static const struct hid_device_id corsair_devices[] = {
715
717
{ HID_USB_DEVICE (USB_VENDOR_ID_CORSAIR , USB_DEVICE_ID_CORSAIR_K90 ),
716
718
.driver_data = CORSAIR_USE_K90_MACRO |
717
719
CORSAIR_USE_K90_BACKLIGHT },
720
+ { HID_USB_DEVICE (USB_VENDOR_ID_CORSAIR ,
721
+ USB_DEVICE_ID_CORSAIR_GLAIVE_RGB ) },
718
722
{ HID_USB_DEVICE (USB_VENDOR_ID_CORSAIR ,
719
723
USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB ) },
720
724
{}
0 commit comments