Lines 498-503
static int verbose = PSM_DEBUG;
Link Here
|
498 |
static int synaptics_support = 0; |
498 |
static int synaptics_support = 0; |
499 |
static int trackpoint_support = 0; |
499 |
static int trackpoint_support = 0; |
500 |
static int elantech_support = 0; |
500 |
static int elantech_support = 0; |
|
|
501 |
static int mux_disabled = 0; |
501 |
|
502 |
|
502 |
/* for backward compatibility */ |
503 |
/* for backward compatibility */ |
503 |
#define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) |
504 |
#define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t) |
Lines 2951-2956
SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLFLAG_RDTUN,
Link Here
|
2951 |
SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN, |
2952 |
SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN, |
2952 |
&elantech_support, 0, "Enable support for Elantech touchpads"); |
2953 |
&elantech_support, 0, "Enable support for Elantech touchpads"); |
2953 |
|
2954 |
|
|
|
2955 |
SYSCTL_INT(_hw_psm, OID_AUTO, mux_disabled, CTLFLAG_RDTUN, |
2956 |
&mux_disabled, 0, "Disable active multiplexing"); |
2957 |
|
2954 |
static void |
2958 |
static void |
2955 |
psmintr(void *arg) |
2959 |
psmintr(void *arg) |
2956 |
{ |
2960 |
{ |
Lines 6159-6164
enable_synaptics_mux(struct psm_softc *sc, enum probearg arg)
Link Here
|
6159 |
int active_ports_count = 0; |
6163 |
int active_ports_count = 0; |
6160 |
int active_ports_mask = 0; |
6164 |
int active_ports_mask = 0; |
6161 |
|
6165 |
|
|
|
6166 |
if (mux_disabled != 0) |
6167 |
return (FALSE); |
6168 |
|
6162 |
version = enable_aux_mux(kbdc); |
6169 |
version = enable_aux_mux(kbdc); |
6163 |
if (version == -1) |
6170 |
if (version == -1) |
6164 |
return (FALSE); |
6171 |
return (FALSE); |
Lines 6196-6201
enable_synaptics_mux(struct psm_softc *sc, enum probearg arg)
Link Here
|
6196 |
/* IRQ handler does not support active multiplexing mode */ |
6203 |
/* IRQ handler does not support active multiplexing mode */ |
6197 |
disable_aux_mux(kbdc); |
6204 |
disable_aux_mux(kbdc); |
6198 |
|
6205 |
|
|
|
6206 |
/* Is MUX still alive after switching back to legacy mode? */ |
6207 |
if (!enable_aux_dev(kbdc) || !disable_aux_dev(kbdc)) { |
6208 |
/* |
6209 |
* On some laptops e.g. Lenovo X121e dead AUX MUX can be |
6210 |
* brought back to life with resetting of keyboard. |
6211 |
*/ |
6212 |
reset_kbd(kbdc); |
6213 |
if (!enable_aux_dev(kbdc) || !disable_aux_dev(kbdc)) { |
6214 |
printf("psm%d: AUX MUX hang detected!\n", sc->unit); |
6215 |
printf("Consider adding hw.psm.mux_disable=1 to " |
6216 |
"loader tunables\n"); |
6217 |
} |
6218 |
} |
6219 |
empty_both_buffers(kbdc, 10); /* remove stray data if any */ |
6220 |
|
6199 |
return (probe); |
6221 |
return (probe); |
6200 |
} |
6222 |
} |
6201 |
|
6223 |
|