We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e48604 commit be896bdCopy full SHA for be896bd
drivers/input/mouse/elantech.c
@@ -517,6 +517,19 @@ static void elantech_report_trackpoint(struct psmouse *psmouse,
517
case 0x16008020U:
518
case 0x26800010U:
519
case 0x36808000U:
520
+
521
+ /*
522
+ * This firmware misreport coordinates for trackpoint
523
+ * occasionally. Discard packets outside of [-127, 127] range
524
+ * to prevent cursor jumps.
525
+ */
526
+ if (packet[4] == 0x80 || packet[5] == 0x80 ||
527
+ packet[1] >> 7 == packet[4] >> 7 ||
528
+ packet[2] >> 7 == packet[5] >> 7) {
529
+ elantech_debug("discarding packet [%6ph]\n", packet);
530
+ break;
531
532
+ }
533
x = packet[4] - (int)((packet[1]^0x80) << 1);
534
y = (int)((packet[2]^0x80) << 1) - packet[5];
535
0 commit comments