From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Ping Cheng <pinglinux@gmail.com>,
linux-input@vger.kernel.org, benjamin.tissoires@gmail.com,
Ping Cheng <pingc@wacom.com>
Subject: Re: [PATCH 2/2] Input: wacom_w8001 - Ignore invalid pen data packets
Date: Thu, 23 Jun 2016 11:00:32 -0700 [thread overview]
Message-ID: <20160623180032.GK32561@dtor-ws> (raw)
In-Reply-To: <20160524050435.GB11910@jelly>
On Tue, May 24, 2016 at 03:04:35PM +1000, Peter Hutterer wrote:
> 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@gmail.com>
> > Tested-by: Chris J Arges <christopherarges@gmail.com>
> > Signed-off-by: Ping Cheng <pingc@wacom.com>
>
> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Applied, thank you.
>
> 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
>
--
Dmitry
prev parent reply other threads:[~2016-06-23 18:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 3:04 [PATCH 2/2] Input: wacom_w8001 - Ignore invalid pen data packets Ping Cheng
2016-05-24 5:04 ` Peter Hutterer
2016-06-23 18:00 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160623180032.GK32561@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=benjamin.tissoires@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
--cc=pingc@wacom.com \
--cc=pinglinux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).