Author: wulf Date: Thu Oct 19 21:07:28 2017 New Revision: 324774 URL: https://svnweb.freebsd.org/changeset/base/324774
Log: psm(4): Add sanity checks to Synaptics touchpad driver resolution parser. This fixes "Kernel has only x or y resolution, not both" libinput error. Reported by: Ivan <b...@abinet.ru> Tested by: Ivan <b...@abinet.ru> Approved by: gonzo (mentor) MFC after: 2 weeks Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Thu Oct 19 20:56:30 2017 (r324773) +++ head/sys/dev/atkbdc/psm.c Thu Oct 19 21:07:28 2017 (r324774) @@ -6094,8 +6094,10 @@ enable_synaptics(struct psm_softc *sc, enum probearg a if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - synhw.infoXupmm = status[0]; - synhw.infoYupmm = status[2]; + if (status[0] != 0 && (status[1] & 0x80) && status[2] != 0) { + synhw.infoXupmm = status[0]; + synhw.infoYupmm = status[2]; + } if (verbose >= 2) { printf(" Extended capabilities:\n"); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"