From owner-svn-src-head@freebsd.org Fri Nov 20 00:13:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C07B6477F54; Fri, 20 Nov 2020 00:13:31 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CccTR4y2cz3pjM; Fri, 20 Nov 2020 00:13:31 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CCDA5031; Fri, 20 Nov 2020 00:13:31 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0AK0DVsL070215; Fri, 20 Nov 2020 00:13:31 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AK0DV4B070211; Fri, 20 Nov 2020 00:13:31 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202011200013.0AK0DV4B070211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 20 Nov 2020 00:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367854 - head/sys/dev/atkbdc X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/atkbdc X-SVN-Commit-Revision: 367854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2020 00:13:31 -0000 Author: wulf Date: Fri Nov 20 00:13:30 2020 New Revision: 367854 URL: https://svnweb.freebsd.org/changeset/base/367854 Log: psm(4): Disable AUX multiplexer probing on all Lenovo laptops. Rudimentary AUX multiplexing support was added to kernel to make possible touchpad initialization on some HP EliteBook laptops with trackpoint. Disable multiplexer probing on all Lenovo laptops now as they use touchpad pass-through port rather than AUX multiplexer to connect trackpoint and at least two model (X120e and X121e) is known for getting PS/2 AUX port dysfunctional after switching back to hidden multiplexing mode. AUX MUX probing can be reenabled with setting of hw.psm.mux_disabled loader tunable to 0. PR: 249987 Reported by: jwb MFC after: 2 weeks Modified: head/sys/dev/atkbdc/atkbdc.c head/sys/dev/atkbdc/atkbdcreg.h head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/atkbdc.c ============================================================================== --- head/sys/dev/atkbdc/atkbdc.c Thu Nov 19 21:10:36 2020 (r367853) +++ head/sys/dev/atkbdc/atkbdc.c Fri Nov 20 00:13:30 2020 (r367854) @@ -117,6 +117,8 @@ static struct atkbdc_quirks quirks[] = { {"coreboot", NULL, NULL, KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT}, + /* KBDC hangs on Lenovo X120e and X121e after disabling AUX MUX */ + {NULL, "LENOVO", NULL, KBDC_QUIRK_DISABLE_MUX_PROBE}, {NULL, NULL, NULL, 0} }; Modified: head/sys/dev/atkbdc/atkbdcreg.h ============================================================================== --- head/sys/dev/atkbdc/atkbdcreg.h Thu Nov 19 21:10:36 2020 (r367853) +++ head/sys/dev/atkbdc/atkbdcreg.h Fri Nov 20 00:13:30 2020 (r367854) @@ -211,6 +211,7 @@ typedef struct atkbdc_softc { #define KBDC_QUIRK_IGNORE_PROBE_RESULT (1 << 1) #define KBDC_QUIRK_RESET_AFTER_PROBE (1 << 2) #define KBDC_QUIRK_SETLEDS_ON_INIT (1 << 3) +#define KBDC_QUIRK_DISABLE_MUX_PROBE (1 << 4) int aux_mux_enabled; /* active PS/2 multiplexing is enabled */ int aux_mux_port; /* current aux mux port */ } atkbdc_softc_t; Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Thu Nov 19 21:10:36 2020 (r367853) +++ head/sys/dev/atkbdc/psm.c Fri Nov 20 00:13:30 2020 (r367854) @@ -517,7 +517,7 @@ static int verbose = PSM_DEBUG; static int synaptics_support = 1; static int trackpoint_support = 1; static int elantech_support = 1; -static int mux_disabled = 0; +static int mux_disabled = -1; /* for backward compatibility */ #define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) @@ -6292,7 +6292,8 @@ enable_synaptics_mux(struct psm_softc *sc, enum probea int active_ports_count = 0; int active_ports_mask = 0; - if (mux_disabled != 0) + if (mux_disabled == 1 || (mux_disabled == -1 && + (kbdc->quirks & KBDC_QUIRK_DISABLE_MUX_PROBE) != 0)) return (FALSE); version = enable_aux_mux(kbdc);