Re: [PATCH 2/2] Input: wacom_w8001 - Ignore invalid pen data packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 23, 2016 at 08:04:27PM -0700, Ping Cheng wrote:
> ThinkPad X60 Tablet PC (pen only device) sometime posts
> packets that are larger than W8001_PKTLEN_TPCPEN.
> 
> Reported-by: Chris J Arges <christopherarges@xxxxxxxxx>
> Tested-by: Chris J Arges <christopherarges@xxxxxxxxx>
> Signed-off-by: Ping Cheng <pingc@xxxxxxxxx>

Reviewed-by: Peter Hutterer <peter.hutterer@xxxxxxxxx>

Cheers,
   Peter

> ---
>  drivers/input/touchscreen/wacom_w8001.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
> index b1b4127..d5dcda2 100644
> --- a/drivers/input/touchscreen/wacom_w8001.c
> +++ b/drivers/input/touchscreen/wacom_w8001.c
> @@ -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;
> -- 
> 1.9.1
 
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux