HID: rmi: check sanity of the incoming report
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 11 Sep 2014 01:02:37 +0000 (18:02 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 12 Sep 2014 20:57:41 +0000 (22:57 +0200)
commit5b65c2a0296644dd3dbdd590d6f00174d18c96b3
treeb791b06d54ddb993f8c1cbd700a4d3a773e022fc
parentff0c57ac70434bc936cb0110eaf033a0a1a62e52
HID: rmi: check sanity of the incoming report

In the Dell XPS 13 9333, it appears that sometimes the bus get confused
and corrupts the incoming data. It fills the input report with the
sentinel value "ff". Synaptics told us that such behavior does not comes
from the touchpad itself, so we filter out such reports here.

Unfortunately, we can not simply discard the incoming data because they
may contain useful information. Most of the time, the misbehavior is
quite near the end of the report, so we can still use the valid part of
it.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1123584

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-rmi.c