svn commit: r324774 - head/sys/dev/atkbdc
Vladimir Kondratyev
wulf at FreeBSD.org
Thu Oct 19 21:07:29 UTC 2017
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 <bsd at abinet.ru>
Tested by: Ivan <bsd at 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");
More information about the svn-src-all
mailing list