* [PATCH] Fix ALPS sync loss
@ 2005-02-08 23:40 Dmitry Torokhov
2005-02-09 7:23 ` Vojtech Pavlik
2005-02-09 17:35 ` Joseph Pingenot
0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2005-02-08 23:40 UTC (permalink / raw)
To: Joseph Pingenot; +Cc: Andrew Morton, LKML, Peter Osterlund, Vojtech Pavlik
Hi,
Here is the promised patch. It turns out protocol validation code was
a bit (or rather a byte ;) ) off.
Please let me know if it fixes your touchpad and I believe it would be
nice to have it in 2.6.11.
--
Dmitry
===================================================================
ChangeSet@1.2147, 2005-02-08 18:12:06-05:00, dtor_core@ameritech.net
Input: alps - fix protocol validation rules causing touchpad
to lose sync if an absolute packet is received after
a relative packet with negative Y displacement.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
alps.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
--- a/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
+++ b/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
@@ -198,8 +198,8 @@
return PSMOUSE_BAD_DATA;
/* Bytes 2 - 6 should have 0 in the highest bit */
- if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
- (psmouse->packet[psmouse->pktcnt] & 0x80))
+ if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
+ (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
return PSMOUSE_BAD_DATA;
if (psmouse->pktcnt == 6) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix ALPS sync loss
2005-02-08 23:40 [PATCH] Fix ALPS sync loss Dmitry Torokhov
@ 2005-02-09 7:23 ` Vojtech Pavlik
2005-02-09 17:35 ` Joseph Pingenot
1 sibling, 0 replies; 5+ messages in thread
From: Vojtech Pavlik @ 2005-02-09 7:23 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Joseph Pingenot, Andrew Morton, LKML, Peter Osterlund
On Tue, Feb 08, 2005 at 06:40:12PM -0500, Dmitry Torokhov wrote:
> Hi,
>
> Here is the promised patch. It turns out protocol validation code was
> a bit (or rather a byte ;) ) off.
>
> Please let me know if it fixes your touchpad and I believe it would be
> nice to have it in 2.6.11.
Yes, I can't reproduce sync losses that were possible to create with
simultaneous use of the pad anf the touchpoint. Patch applied.
>
> ===================================================================
>
>
> ChangeSet@1.2147, 2005-02-08 18:12:06-05:00, dtor_core@ameritech.net
> Input: alps - fix protocol validation rules causing touchpad
> to lose sync if an absolute packet is received after
> a relative packet with negative Y displacement.
>
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
>
>
>
> alps.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>
> ===================================================================
>
>
>
> diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> --- a/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
> +++ b/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
> @@ -198,8 +198,8 @@
> return PSMOUSE_BAD_DATA;
>
> /* Bytes 2 - 6 should have 0 in the highest bit */
> - if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
> - (psmouse->packet[psmouse->pktcnt] & 0x80))
> + if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
> + (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> return PSMOUSE_BAD_DATA;
>
> if (psmouse->pktcnt == 6) {
>
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix ALPS sync loss
2005-02-08 23:40 [PATCH] Fix ALPS sync loss Dmitry Torokhov
2005-02-09 7:23 ` Vojtech Pavlik
@ 2005-02-09 17:35 ` Joseph Pingenot
2005-02-10 19:54 ` Dmitry Torokhov
1 sibling, 1 reply; 5+ messages in thread
From: Joseph Pingenot @ 2005-02-09 17:35 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Andrew Morton, LKML, Peter Osterlund, Vojtech Pavlik
>From Dmitry Torokhov on Tuesday, 08 February, 2005:
>Hi,
>Here is the promised patch. It turns out protocol validation code was
>a bit (or rather a byte ;) ) off.
>Please let me know if it fixes your touchpad and I believe it would be
>nice to have it in 2.6.11.
This patch seems to be working for me too. Thanks a million, Dmitry!
I owe you a beer some time. :)
-Joseph
>===================================================================
>ChangeSet@1.2147, 2005-02-08 18:12:06-05:00, dtor_core@ameritech.net
> Input: alps - fix protocol validation rules causing touchpad
> to lose sync if an absolute packet is received after
> a relative packet with negative Y displacement.
>
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
> alps.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>===================================================================
>diff -Nru a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
>--- a/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
>+++ b/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
>@@ -198,8 +198,8 @@
> return PSMOUSE_BAD_DATA;
>
> /* Bytes 2 - 6 should have 0 in the highest bit */
>- if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
>- (psmouse->packet[psmouse->pktcnt] & 0x80))
>+ if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
>+ (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> return PSMOUSE_BAD_DATA;
>
> if (psmouse->pktcnt == 6) {
--
Joseph===============================================trelane@digitasaru.net
Graduate Student in Physics, Freelance Free Software Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix ALPS sync loss
2005-02-09 17:35 ` Joseph Pingenot
@ 2005-02-10 19:54 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2005-02-10 19:54 UTC (permalink / raw)
To: trelane, Dmitry Torokhov, Andrew Morton, LKML, Peter Osterlund,
Vojtech Pavlik
On Wed, 9 Feb 2005 11:35:34 -0600, Joseph Pingenot
<trelane@digitasaru.net> wrote:
> From Dmitry Torokhov on Tuesday, 08 February, 2005:
> >Hi,
> >Here is the promised patch. It turns out protocol validation code was
> >a bit (or rather a byte ;) ) off.
> >Please let me know if it fixes your touchpad and I believe it would be
> >nice to have it in 2.6.11.
>
> This patch seems to be working for me too. Thanks a million, Dmitry!
> I owe you a beer some time. :)
>
You are welcome. I am glad we got your touchpad going.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix ALPS sync loss
[not found] <mailman.1107906420.26313.linux-kernel2news@redhat.com>
@ 2005-02-10 19:07 ` Pete Zaitcev
0 siblings, 0 replies; 5+ messages in thread
From: Pete Zaitcev @ 2005-02-10 19:07 UTC (permalink / raw)
To: Dmitry Torokhov, linux-kernel
On Tue, 8 Feb 2005 18:40:12 -0500, Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> Here is the promised patch. It turns out protocol validation code was
> a bit (or rather a byte ;) ) off.
> +++ b/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00
> @@ -198,8 +198,8 @@
> return PSMOUSE_BAD_DATA;
>
> /* Bytes 2 - 6 should have 0 in the highest bit */
> - if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
> - (psmouse->packet[psmouse->pktcnt] & 0x80))
> + if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
> + (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> return PSMOUSE_BAD_DATA;
This seems to work here, no more dead pad.
-- Pete
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-10 19:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-08 23:40 [PATCH] Fix ALPS sync loss Dmitry Torokhov
2005-02-09 7:23 ` Vojtech Pavlik
2005-02-09 17:35 ` Joseph Pingenot
2005-02-10 19:54 ` Dmitry Torokhov
[not found] <mailman.1107906420.26313.linux-kernel2news@redhat.com>
2005-02-10 19:07 ` Pete Zaitcev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).