Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 21:07:28 +0000 (UTC)
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324774 - head/sys/dev/atkbdc
Message-ID:  <201710192107.v9JL7Siv054967@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@abinet.ru>
  Tested by:	Ivan <bsd@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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710192107.v9JL7Siv054967>