psmouse: OLPC: fix incorrect validate_byte check
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20081107033652.5f44001a@debxo
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 psmouse: OLPC: fix incorrect validate_byte check
Hm, you're right; does this patch fix it? (Sorry for the top-posting, folks)
The validate_byte check logic was backwards; it should return true for an *invalid* packet. Thanks to Jeremy Katz for spotting this one.
--- drivers/input/mouse/hgpk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/mouse/hgpk.c +1 -1
@@ -125,7 +125,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse,*/ static int hgpk_validate_byte (unsigned char *packet) { -return (packet[0 ] &0x0C ) ==0x08 ; +return (packet[0 ] &0x0C ) !=0x08 ; }static void hgpk_process_packet (struct psmouse *psmouse)
Signature · 6 lines
1.5.6.5 On Mon, 10 Nov 2008 14:23:27 -0500
Quoted 46 lines · Jeremy Katz
I'm seeing it and someone else is across different XOs, so I don't think it's hardware. And I'm seeing it even if I don't touch the touchpad at all
Looking through the diffs, the only thing that isn't certainly cosmetic is the attached and applying it fixes things. I haven't split to see which of the two chunks is the actual fix yet, but will probably try to do so later if I can avoid other fires popping up.
Jeremy
Quoted 34 lines · Andres Salomon
Hi,
Either you're seeing transient errors that are occurring due to hardware problems (and thus have nothing to do with the updated driver/kernel), or the miscalibration detection is being triggered accidentally. Once the touchpad starts recalibrating, it will continue until you've removed your fingers from the touchpad for a few seconds.. so, if it starts doing that, just remove your hands and within a few secs it should be fixed.
Quoted 20 lines · On Fri, 07 Nov 2008 16:26:05 -0500 Jeremy Katz <[email protected]> wrote:
Hey -- I backported what you sent upstream for the OLPC touchpad support to the Fedora 2.6.27.x kernel and while it identifies fine, I see boatloads of
psmouse serio1: >100px jump detected (0,227)
psmouse serio1:hgpk_process_byte: (1) 09 f9 08psmouse.c: HGPK at isa0060/serio1/input lost sync at byte 1psmouse.c: HGPK at isa0060/serio1/input0 - driver resynched.
in dmesg and the mouse cursor just jumps around pretty much uncontrollablyThe only thing I'm seeing in the diff between olpc-2.6 and what's now upstream that might be relevant is the different conditions for
hgpk_validate_byte(). But before I go grafting things together, I figured it was worth asking if you knew of anything specific to look at.Thanks,
Jeremy
Quoted 10 lines · Andres Salomon
Hm, you're right; does this patch fix it? (Sorry for the top-posting, folks)
The
validate_bytecheck logic was backwards; it should return true for an *invalid* packet. Thanks to Jeremy Katz for spotting this one.Signed-off-by Andres Salomon <[email protected]>
Applied, thank you Andres.
Signature · 1 line
Dmitry