From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D292D2B9B7 for ; Tue, 18 Aug 2026 15:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787066086; cv=none; b=j4KkM76YPPT5pXfcXoa5Xf7FTjIHDGMfuVARUcrE+tsKxMtGV3pEhjgcAZj7xgDdTDSIVznYx++T8N3lvZwAVDCt1WvJrNCHWWGGLz8xAHCE0zOlG3XOsKpdR6/bq3Gxz8NFrepjxMtlHl/9ljF/PXw8XhYYze0eoRiWnaNxkNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787066086; c=relaxed/simple; bh=axV0Xe/l0zqKu4dH1Id8zerBM+MGpmGJDJcGlyeEvtk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mddEertplao0QUs5l783NqtNWo3DBSsPEk6SysUhBerQFcorwUWe8aGRHqVL02+diLDQdnRAYslvfySx944xGTgwg9oOqEp6uj/FEJzLPpf8kHgDYYt406IHiA+B4HL0nxUuzUyX7yrl5w1M5jHSEm2SFvQ/75IP9B05UB5VuyE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iDYBV3vu; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iDYBV3vu" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4980dc26022so49180845e9.1 for ; Tue, 18 Aug 2026 08:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787066082; x=1787670882; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=lzohCHfuB1luQeAMOC/pqUEUdm2PKR4ZBwb8q7ZkmM4=; b=iDYBV3vuDHy8Ao4KsY2+F8AZX/nG+09r1Z/cCzEWN7Viidw1xvpZcgHOUQ0KJL22YU 14zfDJRIi/2Mh8sRbxtQOYNiJ3b9NUzB6wNmxhGf0ZjFMpoD+LWthL8tQK0Imj8oKfqr efbabG5cSwfKviC9Irng7kwP3HTvsoJHFXQCyjQ72aEXyeciSKRzun3qPxMKmFkkFttv 5X0DqvwWlAHAvisewiNq/3hsKjJbI+3B2woOU9aU/CwWT9KG3n9YcbJUXQB5DdpDO5BE lAxekUpYQDES1q/snzFhb/5ku3uoVmJuW8ImCuk2RNui2u4ABt+uPL/04vcIZQFXYsP2 NVbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787066082; x=1787670882; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lzohCHfuB1luQeAMOC/pqUEUdm2PKR4ZBwb8q7ZkmM4=; b=nqYE4nj8IjawfoZQ2PxJftNgva+j194T3sVtk9o9KcaQQm29o8tmNa1vkIJQWvxWst R/OIbXAx5wiY553QyoAPXek3XjjA3AvY9ItvrWwYlDDsmBvSMn6v5RGa9DCWheD52NWm J271OpG0iyYQyj+umA9FJcxnrfpUCq+FKcyLmrtQejIFIp/jExvNDQYaGUu6WHCKBDmL vPAFRh5b/Ownq+CREZ6jFeZTtcTtLwxKHQvYJWgGPeKH4GJBOOqT9y8JNeCSTBxDGSw5 YYib2Zy7zQNCIXsJy5PvCYmmgQf6tu8iSaFu/uXVdftqUw9yVklH7efQBRxeN2g5AY27 99/w== X-Forwarded-Encrypted: i=1; AHgh+Rr5lMSkS1Y60ZzA6IpyRyurQjo6Ao2XmTaagFksQy1L3GjB6M1PXV59Va0o0/wd6Aa+CqJnXqOo8tnwtQg=@vger.kernel.org X-Gm-Message-State: AOJu0Yz0JEFBvUOpNRabAZmarqdgtGZ2nYdbiBUibSAuJ59319Hoo8zO gjiO9Qm3lhmfJPYsfWeczlXWLNp4uC+qnhd/qrShjVC7EXLkMesBnQkZSl3Uf0u3 X-Gm-Gg: AR+sD13P31mf9lnqg7SPtZ0RF2mpQZUSSxzQL8b6CtF/jnA/rNj2dRO/F50IUSNaF0w KN8/BDANXPC2GtpdGxf1xxvTjR4ko5oT7KqgMSJ2Fo1y15loA492gCMVlwMiulwx2TsP+McbNxx XW2kaDcVCSSeUDceWcpTdWPo8r5RE1Cdxu/X0g55Odmi8RaGxocTTs318YTDQhHz+rp3cO7b03b IM0VNHMHXw61OIgflRYLIwMfZH9qNxyvGez3h46a5XijVHHWTOoKqgcf+6ufQcxj6Gxiy+nry7a HrSmr5ilSXM9/5D4mm1yFTo0a5qRTUhkIpttOHfLPFBj+l124wtDlfwv2mTP96OkPErw7qCSGw6 cYsMtj4oitbRMTff1OJo43JnQjOE9kolJRTgcixm96Gvs/Ewm0eusFuWLZUQBTBnxIRl5Cx6SEa SKx2Jk24TtH6db0OAcbZ8SgMaj6PhcUaK77ALLTvUYG/c4CE7vyrrp6qzm+wfheQm+r8rAuDYv3 fmSWoQYxw5YLiid2wtxPreFAW5AjQ== X-Received: by 2002:a05:600c:19ca:b0:499:7ce1:d8a2 with SMTP id 5b1f17b1804b1-499879426e9mr450375235e9.8.1787066081793; Tue, 18 Aug 2026 08:14:41 -0700 (PDT) Received: from HomeOffice (046125138157.public.t-mobile.at. [46.125.138.157]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482a5b7cd38sm13657469f8f.32.2026.08.18.08.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2026 08:14:41 -0700 (PDT) From: Panz Dev To: Jiri Kosina , Benjamin Tissoires Cc: Denis Benato , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Panz Dev Subject: [PATCH v2] HID: asus: do not send keyboard init reports to touchpads Date: Tue, 18 Aug 2026 17:14:31 +0200 Message-ID: <20260818151431.939132-1-panz.development@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit 0919db9f3583 ("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: 0919db9f3583 ("HID: asus: always fully initialize devices") Cc: stable@vger.kernel.org Signed-off-by: Panz Dev --- v2: - Keep asus_start_multitouch() inside the HID_CLAIMED_INPUT check to avoid any UAF risk if input registration fails (as pointed out by Denis Benato and automated review). - Focus the fix on skipping keyboard report initialization for touchpads. --- drivers/hid/hid-asus.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 3f5e96900b67..7f19ca1e5a1b 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -1294,12 +1294,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); + } } } -- 2.47.0