From: Andres Salomon <dilinger@queued.net>
To: Jeremy Katz <katzj@redhat.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, dtor@mail.ru
Subject: [PATCH] psmouse: OLPC: fix incorrect validate_byte check
Date: Sun, 9 Nov 2008 07:40:57 -0800 [thread overview]
Message-ID: <20081109074057.769a1c83@debxo> (raw)
In-Reply-To: <1226345007.10798.188.camel@aglarond.local>
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
> > >
next parent reply other threads:[~2008-11-11 5:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 ` Andres Salomon [this message]
2008-11-11 19:43 ` Dmitry Torokhov
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=20081109074057.769a1c83@debxo \
--to=dilinger@queued.net \
--cc=akpm@linux-foundation.org \
--cc=dtor@mail.ru \
--cc=katzj@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®