Re: 04d9:a055: Trust GXT 18 Gaming Keyboard: error -22

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

 



On Sun, 12 Feb 2012, Sergey Spiridonov wrote:

> Hello Jiri

Hi Sregey

> > Fixing the report descriptor probably is the best way to go here.
> > 
> > Could you please send me output of 
> > 
> > 	cat /sys/kernel/debug/hid/<device>/rdesc
> > 
> > for that particular device?
> > 
> > I'll send you a patch to test.
> 
> I found two directories inside /sys/kernel/debug/hid/ which correspond
> to this device:
> 
> 0003:04D9:A055.0001
> 0003:04D9:A055.0002
> 
> I archived rdesc from both of them. Second rdesc is 1.7M big uncomressed.

I have never seen a report descriptor covering such a huge range of 
Consumer usages.

Please try the patch below and let me know whether it makes the device 
work. It's definitely not a proper fix, it's rather a hackish way to check 
whether this is enough to fix this device.



diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 4da66b4..a8b78ff 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1201,6 +1201,13 @@ read_report_descriptor(struct file *filp, struct kobject *kobj,
 
 	memcpy(buf, hdev->rdesc + off, count);
 
+	if (hdev->rsize > 50 && hdev->rdesc[44] == 0x26 && hdev->rdesc[45] == 0xff
+			&& hdev->rdesc[46] == 0x7f) {
+		printk(KERN_DEBUG "fixing Trust GXT 18 rdesc\n");
+		hdev->rdesc[45] = 0xa8;
+		hdev->rdesc[46] = 0x2f;
+	}
+
 	return count;
 }
 

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux