mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
HID: asus: do not send keyboard init reports to touchpads
Commit0919db9f35("HID: asus: always fully initialize devices") added a loop during asus_probe() to send keyboard feature report initializations (asus_kbd_init) to all ASUS HID devices. On ASUS laptops with I2C/HID touchpads (such as the ASUS E200HA), sending keyboard feature reports (FEATURE_KBD_REPORT_ID) to touchpad endpoints sends invalid feature requests to touchpad hardware, corrupting probe state and causing the touchpad to become unresponsive. Wrap the asus_report_id_init loop in an `if (!drvdata->tp)` check so keyboard feature initialization only runs for actual keyboards. Tested on ASUS E200HA (where touchpad functionality is fully restored) and ASUS VivoBook Flip 14 TP401MA (confirming zero regressions). Fixes:0919db9f35("HID: asus: always fully initialize devices") Cc: stable@vger.kernel.org Signed-off-by: Panz Dev <panz.development@gmail.com> Reviewed-by: Denis Benato <denis.benato@linux.dev> Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
parent
986c24e0fe
commit
8099f9da59
|
|
@ -1493,12 +1493,14 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
return ret;
|
||||
}
|
||||
|
||||
for (int r = 0; r < ARRAY_SIZE(asus_report_id_init); r++) {
|
||||
if (asus_has_report_id(hdev, asus_report_id_init[r])) {
|
||||
ret = asus_kbd_init(hdev, asus_report_id_init[r]);
|
||||
if (ret < 0)
|
||||
hid_warn(hdev, "Failed to initialize 0x%x: %d.\n",
|
||||
asus_report_id_init[r], ret);
|
||||
if (!drvdata->tp) {
|
||||
for (int r = 0; r < ARRAY_SIZE(asus_report_id_init); r++) {
|
||||
if (asus_has_report_id(hdev, asus_report_id_init[r])) {
|
||||
ret = asus_kbd_init(hdev, asus_report_id_init[r]);
|
||||
if (ret < 0)
|
||||
hid_warn(hdev, "Failed to initialize 0x%x: %d.\n",
|
||||
asus_report_id_init[r], ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user