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) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"