svn commit: r348817 - head/sys/dev/atkbdc
Vladimir Kondratyev
wulf at FreeBSD.org
Sat Jun 8 21:33:35 UTC 2019
Author: wulf
Date: Sat Jun 8 21:33:34 2019
New Revision: 348817
URL: https://svnweb.freebsd.org/changeset/base/348817
Log:
psm(4): Fix Elantech trackpoint support.
Sign bits for X and Y motion data were taken from wrong places.
PR: 238291
Reported by: Andrey Kosachenko <andrey.kosachenko at gmail.com>
Tested by: Andrey Kosachenko <andrey.kosachenko at gmail.com>
MFC after: 2 weeks
Modified:
head/sys/dev/atkbdc/psm.c
Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c Sat Jun 8 20:28:04 2019 (r348816)
+++ head/sys/dev/atkbdc/psm.c Sat Jun 8 21:33:34 2019 (r348817)
@@ -4676,7 +4676,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
case ELANTECH_PKT_TRACKPOINT:
/* 7 6 5 4 3 2 1 0 (LSB)
* -------------------------------------------
- * ipacket[0]: 0 0 SX SY 0 M R L
+ * ipacket[0]: 0 0 SY SX 0 M R L
* ipacket[1]: ~SX 0 0 0 0 0 0 0
* ipacket[2]: ~SY 0 0 0 0 0 0 0
* ipacket[3]: 0 0 ~SY ~SX 0 1 1 0
@@ -4687,9 +4687,9 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
* over 9 bits with SX/SY the relative top bit and
* X7..X0 and Y7..Y0 the lower bits.
*/
- *x = (pb->ipacket[0] & 0x20) ?
+ *x = (pb->ipacket[0] & MOUSE_PS2_XNEG) ?
pb->ipacket[4] - 256 : pb->ipacket[4];
- *y = (pb->ipacket[0] & 0x10) ?
+ *y = (pb->ipacket[0] & MOUSE_PS2_YNEG) ?
pb->ipacket[5] - 256 : pb->ipacket[5];
trackpoint_button =
More information about the svn-src-all
mailing list