From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Frank Sorenson <frank@tuxrocks.com>
Cc: Marc Koschewski <marc@osknowledge.org>,
Joe Feise <jfeise@feise.com>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: mouse issues in 2.6.15-rc5-mm series
Date: Wed, 4 Jan 2006 22:24:07 -0500 [thread overview]
Message-ID: <200601042224.08509.dtor_core@ameritech.net> (raw)
In-Reply-To: <43AF742E.5040604@tuxrocks.com>
On Sunday 25 December 2005 23:40, Frank Sorenson wrote:
> Dmitry Torokhov wrote:
> > On Saturday 24 December 2005 05:57, Frank Sorenson wrote:
> >
> >>I continue to see the same issues with the resync patch in -mm. For me,
> >>tapping stops working, and I'm now seeing both the mouse pointer jumping
> >> as well (a lesser issue for me, so it was probably present earlier as
> >>well).
> >>
> >
> > Frank,
> >
> > Does the tapping not work period or it only does not work first time you
> > try to tap after not touching the pad for more than 5 seconds?
>
> The tapping works initially, then stops. I hadn't put 2+2 together with
> the 5-second idle bit, but that seems the likely issue.
>
> I applied that patch you sent out yesterday, and now tapping works and
> I'm not seeing the mouse stall/jump problem. I'm at 21+ hours uptime
> now, with no mouse problems, so I think setting the resync_time to 0
> looks like the right fix.
>
Frank,
Could you please try the patch below and see if it makes tapping work?
Make sure you enable resynching by doing:
echo -n 5 > /sys/bus/serio/devices/serioX/resync_time
Thanks!
--
Dmitry
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/alps.c | 11 ++++++-----
drivers/input/mouse/psmouse-base.c | 27 ++++++++++++++++++++++++---
2 files changed, 30 insertions(+), 8 deletions(-)
Index: work/drivers/input/mouse/alps.c
===================================================================
--- work.orig/drivers/input/mouse/alps.c
+++ work/drivers/input/mouse/alps.c
@@ -356,19 +356,20 @@ static int alps_poll(struct psmouse *psm
{
struct alps_data *priv = psmouse->private;
unsigned char buf[6];
+ int poll_failed;
if (priv->i->flags & ALPS_PASS)
alps_passthrough_mode(psmouse, 1);
- if (ps2_command(&psmouse->ps2dev, buf, PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)))
- return -1;
-
- if ((buf[0] & priv->i->mask0) != priv->i->byte0)
- return -1;
+ poll_failed = ps2_command(&psmouse->ps2dev, buf,
+ PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0;
if (priv->i->flags & ALPS_PASS)
alps_passthrough_mode(psmouse, 0);
+ if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0)
+ return -1;
+
if ((psmouse->badbyte & 0xc8) == 0x08) {
/*
* Poll the track stick ...
Index: work/drivers/input/mouse/psmouse-base.c
===================================================================
--- work.orig/drivers/input/mouse/psmouse-base.c
+++ work/drivers/input/mouse/psmouse-base.c
@@ -54,7 +54,7 @@ static unsigned int psmouse_smartscroll
module_param_named(smartscroll, psmouse_smartscroll, bool, 0644);
MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
-static unsigned int psmouse_resetafter;
+static unsigned int psmouse_resetafter = 5;
module_param_named(resetafter, psmouse_resetafter, uint, 0644);
MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never).");
@@ -850,8 +850,29 @@ static void psmouse_deactivate(struct ps
static int psmouse_poll(struct psmouse *psmouse)
{
- return ps2_command(&psmouse->ps2dev, psmouse->packet,
- PSMOUSE_CMD_POLL | (psmouse->pktsize << 8));
+ if (ps2_command(&psmouse->ps2dev, psmouse->packet,
+ PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)))
+ return -1;
+
+ switch (psmouse->type) {
+ case PSMOUSE_PS2:
+ case PSMOUSE_PS2PP:
+ case PSMOUSE_IMPS:
+ case PSMOUSE_IMEX:
+ case PSMOUSE_LIFEBOOK:
+ case PSMOUSE_TRACKPOINT:
+/*
+ * If protocol may be used by "tappable" device (touchpad, touchscreen) try to "restore"
+ * tap data from the halfway-discarded packet
+ */
+ if ((psmouse->badbyte & 0x08) == (psmouse->packet[0] & 0x08))
+ psmouse->packet[0] |= psmouse->badbyte & 0x07;
+
+ default:
+ break;
+ }
+
+ return 0;
}
next prev parent reply other threads:[~2006-01-05 3:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-24 6:43 mouse issues in 2.6.15-rc5-mm series Joe Feise
2005-12-24 10:42 ` Marc Koschewski
2005-12-24 10:57 ` Frank Sorenson
2005-12-26 4:09 ` Dmitry Torokhov
2005-12-26 4:40 ` Frank Sorenson
2005-12-26 4:55 ` Dmitry Torokhov
2006-01-05 3:24 ` Dmitry Torokhov [this message]
2006-01-06 8:28 ` Frank Sorenson
2006-01-06 16:26 ` Dmitry Torokhov
2006-01-06 16:44 ` Frank Sorenson
2006-01-06 22:30 ` Frank Sorenson
2005-12-24 17:56 ` Dmitry Torokhov
2005-12-24 18:49 ` Joe Feise
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=200601042224.08509.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=akpm@osdl.org \
--cc=frank@tuxrocks.com \
--cc=jfeise@feise.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc@osknowledge.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