Input: wacom_w8001 - Ignore invalid pen data packets
Subsystems (2)
PATCH 2/2 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 Chris J Arges <[email protected]>
Tested-by Chris J Arges <[email protected]>
Signed-off-by Ping Cheng <[email protected]>
--- drivers/input/touchscreen/wacom_w8001.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/input/touchscreen/wacom_w8001.c +9 -0
@@ -339,6 +339,15 @@ static irqreturn_t w8001_interrupt(struct serio *serio, w8001->idx =0 ;parse_multi_touch (w8001);break ; + +default : +/* +* ThinkPad X60 Tablet PC (pen only device) sometime 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 ;
Signature · 1 line
1.9.1
Quoted 6 lines · Ping Cheng
ThinkPad X60 Tablet PC (pen only device) sometime posts packets that are larger than
W8001_PKTLEN_TPCPEN.Reported-by Chris J Arges <[email protected]>Tested-by Chris J Arges <[email protected]>Signed-off-by Ping Cheng <[email protected]>
Reviewed-by Peter Hutterer <[email protected]>
Cheers,
Peter
Quoted 26 lines
--- drivers/input/touchscreen/wacom_w8001.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/input/touchscreen/wacom_w8001.c +9
-0@@ -339,6 +339,15 @@ static irqreturn_t w8001_interrupt(struct serio *serio, w8001->idx =0 ;parse_multi_touch (w8001);break ; + +default : +/* +* ThinkPad X60 Tablet PC (pen only device) sometime 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 ;Signature · 1 line
1.9.1
Quoted 9 lines · Peter Hutterer
Quoted 6 lines · Ping Cheng
ThinkPad X60 Tablet PC (pen only device) sometime posts packets that are larger than
W8001_PKTLEN_TPCPEN.Reported-by Chris J Arges <[email protected]>Tested-by Chris J Arges <[email protected]>Signed-off-by Ping Cheng <[email protected]>Reviewed-by Peter Hutterer <[email protected]>
Applied, thank you.
Quoted 31 lines
Cheers,
PeterQuoted 26 lines
--- drivers/input/touchscreen/wacom_w8001.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/input/touchscreen/wacom_w8001.c +9
-0@@ -339,6 +339,15 @@ static irqreturn_t w8001_interrupt(struct serio *serio, w8001->idx =0 ;parse_multi_touch (w8001);break ; + +default : +/* +* ThinkPad X60 Tablet PC (pen only device) sometime 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 ;Signature · 1 line
1.9.1
Signature · 1 line
Dmitry