Date: Wed, 16 Dec 2020 07:59:47 +0000 (UTC) From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368689 - stable/12/sys/dev/atkbdc Message-ID: <202012160759.0BG7xldH028944@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wulf Date: Wed Dec 16 07:59:47 2020 New Revision: 368689 URL: https://svnweb.freebsd.org/changeset/base/368689 Log: MFC: r367349, r367854, r368365, r368374(by cem) r367349: atkbdc(4): Add quirk for "System76 lemur Pro" laptops. Currently atkbdc(4) assumes all coreboot BIOSes belonging to Chromebooks and unconditionally sets a number of quirks to workaround known issues. Exclude "System76" laptops from this set as they appeared to be a traditional hardware ("lemur Pro" is a rebranded Clevo chassis) with coreboot firmware on board. KBDC_QUIRK_KEEP_ACTIVATED quirk activated for Chromebook platform makes keyboard on this devices inoperable. "Purism Librem" laptops may require the same exclusion too. PR: 250711 Reported by: nick.lott@gmail.com r367854: 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 r368365: atkbd(4): Change quirk table end-of-list marker to NULL vendor/maker/product This fixes regression introduced in r367349 which effectively resulted in truncation of quirk table. PR: 250711 Submitted by: grembo Reported by: Matthias Apitz <guru@unixarea.de> r368374 (by cem): atkbd(4): Just use nitems() for quirk enumeration Reviewed by: imp, wulf Differential Revision: https://reviews.freebsd.org/D27489 Modified: stable/12/sys/dev/atkbdc/atkbdc.c stable/12/sys/dev/atkbdc/atkbdcreg.h stable/12/sys/dev/atkbdc/psm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/atkbdc/atkbdc.c ============================================================================== --- stable/12/sys/dev/atkbdc/atkbdc.c Wed Dec 16 00:27:28 2020 (r368688) +++ stable/12/sys/dev/atkbdc/atkbdc.c Wed Dec 16 07:59:47 2020 (r368689) @@ -124,11 +124,12 @@ struct atkbdc_quirks { }; static struct atkbdc_quirks quirks[] = { + {"coreboot", "System76", NULL, 0}, {"coreboot", NULL, NULL, KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT}, - - {NULL, NULL, NULL, 0} + /* KBDC hangs on Lenovo X120e and X121e after disabling AUX MUX */ + {NULL, "LENOVO", NULL, KBDC_QUIRK_DISABLE_MUX_PROBE}, }; #define QUIRK_STR_MATCH(s1, s2) (s1 == NULL || \ @@ -142,7 +143,7 @@ atkbdc_getquirks(void) char* maker = kern_getenv("smbios.system.maker"); char* product = kern_getenv("smbios.system.product"); - for (i=0; quirks[i].quirk != 0; ++i) + for (i = 0; i < nitems(quirks); i++) if (QUIRK_STR_MATCH(quirks[i].bios_vendor, bios_vendor) && QUIRK_STR_MATCH(quirks[i].maker, maker) && QUIRK_STR_MATCH(quirks[i].product, product)) Modified: stable/12/sys/dev/atkbdc/atkbdcreg.h ============================================================================== --- stable/12/sys/dev/atkbdc/atkbdcreg.h Wed Dec 16 00:27:28 2020 (r368688) +++ stable/12/sys/dev/atkbdc/atkbdcreg.h Wed Dec 16 07:59:47 2020 (r368689) @@ -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: stable/12/sys/dev/atkbdc/psm.c ============================================================================== --- stable/12/sys/dev/atkbdc/psm.c Wed Dec 16 00:27:28 2020 (r368688) +++ stable/12/sys/dev/atkbdc/psm.c Wed Dec 16 07:59:47 2020 (r368689) @@ -516,7 +516,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) @@ -6256,7 +6256,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012160759.0BG7xldH028944>