mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] psmouse: OLPC: fix incorrect validate_byte check
       [not found]   ` <1226345007.10798.188.camel@aglarond.local>
@ 2008-11-09 15:40     ` Andres Salomon
  2008-11-11 19:43       ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Andres Salomon @ 2008-11-09 15:40 UTC (permalink / raw)
  To: Jeremy Katz; +Cc: akpm, linux-kernel, dtor

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.

Signed-off-by: Andres Salomon <dilinger@debian.org>
---
 drivers/input/mouse/hgpk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index e82d342..88f04bf 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -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)
-- 
1.5.6.5




On Mon, 10 Nov 2008 14:23:27 -0500
Jeremy Katz <katzj@redhat.com> wrote:

> 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
> 
> On Fri, 2008-11-07 at 03:36 -0800, Andres Salomon wrote:
> > 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.
> > 
> > 
> > On Fri, 07 Nov 2008 16:26:05 -0500
> > Jeremy Katz <katzj@redhat.com> 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 08
> > >   psmouse.c: HGPK at isa0060/serio1/input lost sync at byte 1
> > >   psmouse.c: HGPK at isa0060/serio1/input0 - driver resynched.
> > > in dmesg and the mouse cursor just jumps around pretty much
> > > uncontrollably
> > > 
> > > The 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
> > > 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] psmouse: OLPC: fix incorrect validate_byte check
  2008-11-09 15:40     ` [PATCH] psmouse: OLPC: fix incorrect validate_byte check Andres Salomon
@ 2008-11-11 19:43       ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2008-11-11 19:43 UTC (permalink / raw)
  To: Andres Salomon; +Cc: Jeremy Katz, akpm, linux-kernel

On Sun, Nov 09, 2008 at 07:40:57AM -0800, Andres Salomon wrote:
> 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.
> 
> Signed-off-by: Andres Salomon <dilinger@debian.org>

Applied, thank you Andres.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-11 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1226093165.10798.19.camel@aglarond.local>
     [not found] ` <20081107033652.5f44001a@debxo>
     [not found]   ` <1226345007.10798.188.camel@aglarond.local>
2008-11-09 15:40     ` [PATCH] psmouse: OLPC: fix incorrect validate_byte check Andres Salomon
2008-11-11 19:43       ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®