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
This commit is contained in:
Vladimir Kondratyev 2020-11-20 00:13:30 +00:00
parent 65c207758a
commit b33ba83470
3 changed files with 6 additions and 2 deletions

View File

@ -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}
};

View File

@ -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;

View File

@ -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 probearg arg)
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);