Commit 9e72ac74 authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov

Input: wacom_w8001 - ignore invalid pen data packets

ThinkPad X60 Tablet PC (pen only device) sometime posts
packets that are larger than W8001_PKTLEN_TPCPEN.
Reported-by: default avatarChris J Arges <christopherarges@gmail.com>
Tested-by: default avatarChris J Arges <christopherarges@gmail.com>
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 12afb344
...@@ -339,6 +339,15 @@ static irqreturn_t w8001_interrupt(struct serio *serio, ...@@ -339,6 +339,15 @@ static irqreturn_t w8001_interrupt(struct serio *serio,
w8001->idx = 0; w8001->idx = 0;
parse_multi_touch(w8001); parse_multi_touch(w8001);
break; break;
default:
/*
* ThinkPad X60 Tablet PC (pen only device) sometimes
* sends invalid data packets that are larger than
* W8001_PKTLEN_TPCPEN. Let's start over again.
*/
if (!w8001->touch_dev && w8001->idx > W8001_PKTLEN_TPCPEN - 1)
w8001->idx = 0;
} }
return IRQ_HANDLED; return IRQ_HANDLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment