* [PATCH] psmouse: ESD workaround fix for OLPC XO touchpad
@ 2009-05-14 1:16 Deepak Saxena
2009-05-14 2:21 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Deepak Saxena @ 2009-05-14 1:16 UTC (permalink / raw)
To: Alessandro Rubini; +Cc: linux-kernel
It appears that when the XO touchpad unit resets from ESD, it sends AA
AA instead of AA 00, the psmouse-base code handles the case of AA 00 by
triggering a serio reconnect for the port, causing a full reprobe of
the device.
Testing with OFW shows that this is likely to solve the problem, so
the attached patch simply expands the existing test to also catch AA AA.
Author: Zephaniah E. Hull <warp@aehallh.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
---
This issue was found during testing back in 2007, before I
was involved, and the fix has been carried in the OLPC tree
since then. Not sure how this would affect other systems so
wondering if we should wrap this specific check around
'#ifdef OLPC'?
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index f8f86de..cf0f4fc 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -327,7 +327,7 @@ static irqreturn_t psmouse_interrupt(struct serio *serio,
goto out;
}
- if (psmouse->packet[1] == PSMOUSE_RET_ID) {
+ if (psmouse->packet[1] == PSMOUSE_RET_ID || psmouse->packet[1] == PSMOUSE_RET_BAT) {
__psmouse_set_state(psmouse, PSMOUSE_IGNORE);
serio_reconnect(serio);
goto out;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] psmouse: ESD workaround fix for OLPC XO touchpad
2009-05-14 1:16 [PATCH] psmouse: ESD workaround fix for OLPC XO touchpad Deepak Saxena
@ 2009-05-14 2:21 ` Dmitry Torokhov
2009-05-14 16:49 ` Deepak Saxena
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2009-05-14 2:21 UTC (permalink / raw)
To: Deepak Saxena; +Cc: Alessandro Rubini, linux-kernel
Hi Deepak,
On Thu, May 14, 2009 at 01:16:03AM +0000, Deepak Saxena wrote:
> This issue was found during testing back in 2007, before I
> was involved, and the fix has been carried in the OLPC tree
> since then. Not sure how this would affect other systems so
> wondering if we should wrap this specific check around
> '#ifdef OLPC'?
>
*sigh* Why can't we just implement standard?
I don't like the #ifdef, how about checking protocol type instead?
--
Dmitry
Input: psmouse - ESD workaround fix for OLPC XO touchpad
From: Zephaniah E. Hull <warp@aehallh.com>
It appears that when the XO touchpad unit resets from ESD, it sends AA
AA instead of AA 00, the psmouse-base code handles the case of AA 00 by
triggering a serio reconnect for the port, causing a full reprobe of
the device.
Testing with OFW shows that this is likely to solve the problem, so
the attached patch simply expands the existing test to also catch AA AA.
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/psmouse-base.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 4683b13..df31888 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -328,7 +328,9 @@ static irqreturn_t psmouse_interrupt(struct serio *serio,
goto out;
}
- if (psmouse->packet[1] == PSMOUSE_RET_ID) {
+ if (psmouse->packet[1] == PSMOUSE_RET_ID ||
+ (psmouse->type == PSMOUSE_HGPK &&
+ psmouse->packet[1] == PSMOUSE_RET_BAT)) {
__psmouse_set_state(psmouse, PSMOUSE_IGNORE);
serio_reconnect(serio);
goto out;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] psmouse: ESD workaround fix for OLPC XO touchpad
2009-05-14 2:21 ` Dmitry Torokhov
@ 2009-05-14 16:49 ` Deepak Saxena
0 siblings, 0 replies; 3+ messages in thread
From: Deepak Saxena @ 2009-05-14 16:49 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Alessandro Rubini, linux-kernel
On May 13 2009, at 19:21, Dmitry Torokhov was caught saying:
> Hi Deepak,
>
> On Thu, May 14, 2009 at 01:16:03AM +0000, Deepak Saxena wrote:
> > This issue was found during testing back in 2007, before I
> > was involved, and the fix has been carried in the OLPC tree
> > since then. Not sure how this would affect other systems so
> > wondering if we should wrap this specific check around
> > '#ifdef OLPC'?
> >
>
> *sigh* Why can't we just implement standard?
our jobs as software engineers would be far far more boring in that case ;)
--
In the end, they will not say, "those were dark times," they will ask
"why were their poets silent?" - Bertold Brecht
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-14 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 1:16 [PATCH] psmouse: ESD workaround fix for OLPC XO touchpad Deepak Saxena
2009-05-14 2:21 ` Dmitry Torokhov
2009-05-14 16:49 ` Deepak Saxena
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox