Skip to contentSkip to conversation

psmouse: ESD workaround fix for OLPC XO touchpad

PATCH In review Deepak Saxena 2 participants 3 messages May 14, 2009 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 psmouse: ESD workaround fix for OLPC XO touchpad

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 <[email protected]>

---
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'?

drivers/input/mouse/psmouse-base.c +1 -1
index f8f86de..cf0f4fc 100644
@@ -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;
maintainer
#1 lore raw

Hi Deepak,

Quoted 6 lines · Deepak Saxena

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?

Signature · 22 lines
Dmitry


Input: psmouse - ESD workaround fix for OLPC XO touchpad

From: Zephaniah E. Hull <[email protected]>

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 <[email protected]>
Signed-off-by: Deepak Saxena <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
---

 drivers/input/mouse/psmouse-base.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/mouse/psmouse-base.c +3 -1
index 4683b13..df31888 100644
@@ -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;
#2 lore raw

On May 13 2009, at 19:21, Dmitry Torokhov was caught saying:

Quoted 11 lines

Hi Deepak,

Quoted 6 lines · Deepak Saxena

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 ;)

Signature · 2 lines
In the end, they will not say, "those were dark times,"  they will ask
"why were their poets silent?" - Bertold Brecht