Thread (5 messages) 5 messages, 2 authors, 2016-12-13

[PATCH] HID: usbhid: quirk for MechanicalEagle Z-77 keyboard

From: Vladyslav Shtabovenko <hidden>
Date: 2016-11-30 00:35:07

Hi,

my MechanicalEagle Z-77 keyboard that identifies itself as

Bus 003 Device 005: ID 04d9:a0cd Holtek Semiconductor, Inc.

has troubles getting recognized after standby. My machine is
a Thinkpad X230 in an Ultrabase docking station and everytime
the laptop wakes up from standby, the keyboard is not working
and I have to reconnect it several times until I can type again.

The problem is identical to the one described here:

http://lkml.iu.edu/hypermail/linux/kernel/1407.1/04532.html

I used the same solution as the author, i.e. added quirks for
the specific ID of the keyboard and the issues went away. Tested
this for more than three weeks with no problems or side effects whatsoever.

Initially I sent the patch directly to Benjamin Tissoires and Jiri 
Kosina. Benjamin asked me to add the keyboard to 
hid_have_special_driver in hid-core.c, to ensure that it is handled by 
hid-holtek instead of hid-generic.

However, after doing so, it turned out that with
hid-holtek I obtain the same buggy behavior as before. The only 
difference was that the keyboard was sometimes recognized and sometimes 
not, so it was a bit like Russian roulette. I also noticed that the 
"original" Holtek-patch by Wangzhao Cai did not contain this addition to 
hid_have_special_driver.

For me, hid-generic + quirks from the attached patch actually work 
better with my Holtek-based keyboard than hid-holtek with the same quirks.

Please find my patch attached. This is the one without the addition to
hid_have_special_driver, i.e. it fixes the problem with the keyboard 
being unrecognized after standby in 100% of cases.


Cheers,
Vladyslav

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help