Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jan 2018 16:48:30 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@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: r328482 - stable/11/sys/dev/atkbdc
Message-ID:  <201801271648.w0RGmUCL092723@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Sat Jan 27 16:48:29 2018
New Revision: 328482
URL: https://svnweb.freebsd.org/changeset/base/328482

Log:
  psm: Don't try to detect trackpoint packets if the Elantech device has none
  
  This fixes a panic when `EVDEV_SUPPORT` is enabled: if a trackpoint
  packet was detected but there was no trackpoint, we still tried to emit an
  evdev event even though the associated relative evdev device (`evdev_r`)
  was not initialized.
  
  PR:		225339
  MFC of:		r328191

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	Sat Jan 27 16:36:06 2018	(r328481)
+++ stable/11/sys/dev/atkbdc/psm.c	Sat Jan 27 16:48:29 2018	(r328482)
@@ -4187,7 +4187,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
 	/* Determine packet format and do a sanity check for out of sync packets. */
 	if (ELANTECH_PKT_IS_DEBOUNCE(pb, sc->elanhw.hwversion))
 		pkt = ELANTECH_PKT_NOP;
-	else if (ELANTECH_PKT_IS_TRACKPOINT(pb))
+	else if (sc->elanhw.hastrackpoint && ELANTECH_PKT_IS_TRACKPOINT(pb))
 		pkt = ELANTECH_PKT_TRACKPOINT;
 	else
 	switch (sc->elanhw.hwversion) {



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