From: Dmitry Torokhov <dtor@insightbb.com>
To: Jason Riedy <ejr@eecs.berkeley.edu>
Cc: Remi Colinet <remi.colinet@free.fr>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: Regression in 2.6.21-mm1 (git-input) on Dell D610 laptop
Date: Sun, 13 May 2007 23:34:37 -0400 [thread overview]
Message-ID: <200705132334.38386.dtor@insightbb.com> (raw)
In-Reply-To: <4010.1179028730@argus.EECS.Berkeley.EDU>
On Saturday 12 May 2007 23:58, Jason Riedy wrote:
> And Dmitry Torokhov writes:
> > Have you tried any other -mm? Also, does it help if you stick
> > ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM);
> > at the very beginning of psmouse_initialize() in
> > drivers/input/mouse/psmouse-base.c?
>
> Seems to fix it for me on a D620.
>
Ok, thanks.
> Bisecting on mainline gave commit
> f42649e84831efc69d5f621f1c36a39b4e384a99 (Input: ALPS - handle
> errors from input_register_device()) as the place where the
> trackpoint half stopped working. I don't necessarily believe it,
> unless the psmouse_reset on failure caused problems without
> logging anything.
>
I don't think so. Could you please try the patch below? Thanks!
--
Dmitry
Input: ALPS - force stream mode
ALPS appears to need SETSTREAM command after reset, otherwise it
does not produce any data. Now that we do not request stream mode
by default individual drivers need to take care of it.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/alps.c | 55 +++++++++++++++++++++++----------------------
1 files changed, 29 insertions(+), 26 deletions(-)
Index: work/drivers/input/mouse/alps.c
===================================================================
--- work.orig/drivers/input/mouse/alps.c
+++ work/drivers/input/mouse/alps.c
@@ -251,11 +251,15 @@ static const struct alps_model_info *alp
dbg("E7 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
- for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++);
- *version = (param[0] << 8) | (param[1] << 4) | i;
+ if (version) {
+ for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++)
+ /* empty */;
+ *version = (param[0] << 8) | (param[1] << 4) | i;
+ }
for (i = 0; i < ARRAY_SIZE(alps_model_data); i++)
- if (!memcmp(param, alps_model_data[i].signature, sizeof(alps_model_data[i].signature)))
+ if (!memcmp(param, alps_model_data[i].signature,
+ sizeof(alps_model_data[i].signature)))
return alps_model_data + i;
return NULL;
@@ -380,32 +384,46 @@ static int alps_poll(struct psmouse *psm
return 0;
}
-static int alps_reconnect(struct psmouse *psmouse)
+static int alps_hw_init(struct psmouse *psmouse, int *version)
{
struct alps_data *priv = psmouse->private;
- int version;
-
- psmouse_reset(psmouse);
- if (!(priv->i = alps_get_model(psmouse, &version)))
+ priv->i = alps_get_model(psmouse, version);
+ if (!priv->i)
return -1;
if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
return -1;
if (alps_tap_mode(psmouse, 1)) {
- printk(KERN_WARNING "alps.c: Failed to reenable hardware tapping\n");
+ printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");
return -1;
}
if (alps_absolute_mode(psmouse)) {
- printk(KERN_ERR "alps.c: Failed to reenable absolute mode\n");
+ printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
return -1;
}
if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0))
return -1;
+ /* ALPS needs stream mode, otherwise it won't report any data */
+ if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM)) {
+ printk(KERN_ERR "alps.c: Failed to enable stream mode\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+static int alps_reconnect(struct psmouse *psmouse)
+{
+ psmouse_reset(psmouse);
+
+ if (alps_hw_init(psmouse, NULL))
+ return -1;
+
return 0;
}
@@ -431,22 +449,7 @@ int alps_init(struct psmouse *psmouse)
priv->dev2 = dev2;
- priv->i = alps_get_model(psmouse, &version);
- if (!priv->i)
- goto init_fail;
-
- if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1))
- goto init_fail;
-
- if (alps_tap_mode(psmouse, 1))
- printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n");
-
- if (alps_absolute_mode(psmouse)) {
- printk(KERN_ERR "alps.c: Failed to enable absolute mode\n");
- goto init_fail;
- }
-
- if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0))
+ if (alps_hw_init(psmouse, &version))
goto init_fail;
dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY);
next prev parent reply other threads:[~2007-05-14 3:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 13:05 Regression in 2.6.21-mm1 (git-input) on Dell D610 laptop Remi Colinet
2007-05-11 1:50 ` Andrew Morton
2007-05-11 4:47 ` Dmitry Torokhov
2007-05-11 13:55 ` Remi Colinet
2007-05-13 3:58 ` Jason Riedy
2007-05-14 3:34 ` Dmitry Torokhov [this message]
2007-05-14 18:12 ` Jason Riedy
2007-05-11 13:37 ` Remi Colinet
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=200705132334.38386.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=akpm@linux-foundation.org \
--cc=ejr@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=remi.colinet@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.