aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Leddy <james.leddy@canonical.com>2012-10-03 18:20:56 -0400
committerJohn Rigby <john.rigby@linaro.org>2012-11-14 18:19:42 -0700
commit723dccc0ecde0544ae573aab94a5eb0d1ccf3a0e (patch)
tree5b0a4c69daf13c5328c924062cd88b21e1b60647
parent357c2b052f333c8eba8b6f7b6c9070c65f28633f (diff)
UBUNTU: SAUCE: input: fix weird issue of synaptics psmouse sync lost after resume
BugLink: http://bugs.launchpad.net/bugs/717970 From: Eric Miao <eric.miao@canonical.com> This patch has already been sent upstream by Eric. Unfortunately, after a little back and forth between Eric and Dmitry Torokhov, the patch did get included, and there is still an open question to Dmitry. However, this is a known issue on at least 4 systems, and it causes them to lose their mouse device on suspend. So I was hoping we could get it in to quantal. Original email follows: So in summary, the symptom is intermittent key events lost after resume on some machines with synaptics touchpad (seems this is synaptics _only_), and key events loss is due to serio port reconnect after psmouse sync lost. Removing psmouse and inserting it back during the suspend/resume process is able to work around the issue, so the difference between psmouse_connect() and psmouse_reconnect() is the key to the root cause of this problem. After comparing the two different paths, synaptics driver has its own implementation of synaptics_reconnect(), and the missing psmouse_probe() seems significant, the patch below added psmouse_probe() to the reconnect process, and has been verified many times that the issue could not be reliably reproduced. There are two PS/2 commands in psmouse_probe(): 1. PSMOUSE_CMD_GETID 2. PSMOUSE_CMD_RESET_DIS The weird thing is, the PSMOUSE_CMD_GETID seems to be significant, and the PSMOUSE_CMD_RESET_DIS is irrelevant to this issue after trying several times. Now it's rather difficult to form a sane theory. So this patch is really for RFC. Note it does fix a real problem though. http://thread.gmane.org/gmane.linux.kernel.input/25599 Signed-off-by: James M Leddy <james.leddy@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-rw-r--r--drivers/input/mouse/synaptics.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 48ec7da014d..e8cf85d36ad 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1357,6 +1357,7 @@ static int synaptics_reconnect(struct psmouse *psmouse)
{
struct synaptics_data *priv = psmouse->private;
struct synaptics_data old_priv = *priv;
+ unsigned char param[2];
int retry = 0;
int error;
@@ -1372,6 +1373,7 @@ static int synaptics_reconnect(struct psmouse *psmouse)
*/
ssleep(1);
}
+ ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETID);
error = synaptics_detect(psmouse, 0);
} while (error && ++retry < 3);