svn commit: r367854 - head/sys/dev/atkbdc
Vladimir Kondratyev
wulf at FreeBSD.org
Fri Nov 20 00:13:31 UTC 2020
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);
More information about the svn-src-all
mailing list