Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2017 21:19:17 +0000 (UTC)
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r325345 - stable/11/sys/dev/atkbdc
Message-ID:  <201711022119.vA2LJHhc055782@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wulf
Date: Thu Nov  2 21:19:17 2017
New Revision: 325345
URL: https://svnweb.freebsd.org/changeset/base/325345

Log:
  MFC: r324774
  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)

Modified:
  stable/11/sys/dev/atkbdc/psm.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/atkbdc/psm.c
==============================================================================
--- stable/11/sys/dev/atkbdc/psm.c	Thu Nov  2 21:17:05 2017	(r325344)
+++ stable/11/sys/dev/atkbdc/psm.c	Thu Nov  2 21:19:17 2017	(r325345)
@@ -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?201711022119.vA2LJHhc055782>