It seems that if an MT device is disabled and reenabled,
remnants of the previous MT state can lead to problems.
wsmouse_mt_init should always reset that state completely
(thanks to jcs@ for help).
OK?
Index: dev/wscons/wsmouse.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsmouse.c,v
retrieving revision 1.31
diff -u -p -r1.31 wsmouse.c
--- dev/wscons/wsmouse.c 5 Jul 2016 19:33:14 -0000 1.31
+++ dev/wscons/wsmouse.c 12 Jul 2016 21:01:17 -0000
@@ -1266,11 +1266,8 @@ wsmouse_mt_init(struct device *sc, int n
&((struct wsmouse_softc *) sc)->input;
int n, size;
- if (num_slots == input->mt.num_slots
- && (!tracking == ((input->flags & MT_TRACKING) == 0)))
- return (0);
-
free_mt_slots(input);
+ memset(&input->mt, 0, sizeof(struct mt_state));
if (tracking)
input->flags |= MT_TRACKING;