From patchwork Sun Apr 7 21:37:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lyude Paul X-Patchwork-Id: 10888693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C66C17EF for ; Sun, 7 Apr 2019 21:38:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18449285B7 for ; Sun, 7 Apr 2019 21:38:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 089CA285F0; Sun, 7 Apr 2019 21:38:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCEAD285B7 for ; Sun, 7 Apr 2019 21:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbfDGViq (ORCPT ); Sun, 7 Apr 2019 17:38:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33930 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbfDGViq (ORCPT ); Sun, 7 Apr 2019 17:38:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F52A4627A; Sun, 7 Apr 2019 21:38:46 +0000 (UTC) Received: from malachite.redhat.com (ovpn-121-19.rdu2.redhat.com [10.10.121.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7750E610A0; Sun, 7 Apr 2019 21:38:41 +0000 (UTC) From: Lyude Paul To: Dmitry Torokhov Cc: stable@vger.kernel.org, Chen-Yu Tsai , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: i8042 - disable KBD port on Late-2016 Razer Blade Stealth Date: Sun, 7 Apr 2019 17:37:34 -0400 Message-Id: <20190407213735.10658-1-lyude@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sun, 07 Apr 2019 21:38:46 +0000 (UTC) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The late 2016 model of the Razer Blade Stealth has a built-in USB keyboard, but for some reason the BIOS exposes an i8042 controller with a connected KBD port. While this fake AT Keyboard device doesn't appear to report any events, attempting to change the state of the caps lock LED on it from on to off causes the entire system to hang. So, introduce a quirk table for disabling keyboard probing by default, i8042_dmi_nokbd_table, and add this specific model of Razer laptop to that table. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org --- drivers/input/serio/i8042-x86ia64io.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 136f6e7bf797..888f5f6feebf 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -884,6 +884,22 @@ static const struct dmi_system_id __initconst i8042_dmi_kbdreset_table[] = { { } }; +static const struct dmi_system_id i8042_dmi_nokbd_table[] __initconst = { + { + /* + * Razer Blade Stealth (Late 2016 model) - Keyboard is on USB + * but the system exposes a fake AT keyboard that crashes the + * system if the caps lock LED is changed + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Razer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Blade Stealth"), + DMI_MATCH(DMI_PRODUCT_VERSION, "2.04"), + }, + }, + { } +}; + #endif /* CONFIG_X86 */ #ifdef CONFIG_PNP @@ -1040,6 +1056,9 @@ static int __init i8042_pnp_init(void) #ifdef CONFIG_X86 if (dmi_check_system(i8042_dmi_nopnp_table)) i8042_nopnp = true; + + if (dmi_check_system(i8042_dmi_nokbd_table)) + i8042_nokbd = true; #endif if (i8042_nopnp) {