]> git.ipfire.org Git - thirdparty/linux.git/commit
HID: asus: fortify keyboard handshake
authorAntheas Kapenekakis <lkml@antheas.dev>
Thu, 22 Jan 2026 07:50:37 +0000 (08:50 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 28 Jan 2026 12:02:24 +0000 (14:02 +0200)
commite82ae34af29e910c96d33c8b3a90c60e27f1625e
treef5ea59bd2244f337df9d233d679e736803b91a3c
parent6a293b6edb537baf201c5ceb3afdbff7f42e97c2
HID: asus: fortify keyboard handshake

Handshaking with an Asus device involves sending it a feature report
with the string "ASUS Tech.Inc." and then reading it back to verify the
handshake was successful, under the feature ID the interaction will
take place.

Currently, the driver only does the first part. Add the readback to
verify the handshake was successful. As this could cause breakages,
allow the verification to fail with a dmesg error until we verify
all devices work with it (they seem to).

Since the response is more than 16 bytes, increase the buffer size
to 64 as well to avoid overflow errors. In addition, add the report
ID to prints, to help identify failed handshakes.

Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Reviewed-by: Denis Benato <benato.denis96@gmail.com>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20260122075044.5070-5-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/hid/hid-asus.c