Date: Sat, 20 Jan 2018 11:21:23 +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-head@freebsd.org Subject: svn commit: r328191 - head/sys/dev/atkbdc Message-ID: <201801201121.w0KBLN9F071470@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dumbbell Date: Sat Jan 20 11:21:22 2018 New Revision: 328191 URL: https://svnweb.freebsd.org/changeset/base/328191 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 after: 1 week Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sat Jan 20 11:02:18 2018 (r328190) +++ head/sys/dev/atkbdc/psm.c Sat Jan 20 11:21:22 2018 (r328191) @@ -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?201801201121.w0KBLN9F071470>