aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.miao@canonical.com>2013-06-04 12:30:55 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-06-04 12:33:16 -0400
commiteeb065582a9618c1cf5b7154df7bae06aeb44636 (patch)
tree4c3fbbe0d1ac6d9e4ff57612855ec762ee31ca76
parentc73a1afbe6dce11b6e249d0eee69b90dc24daa88 (diff)
Input: synaptics - fix sync lost after resume on some laptops
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 Only the PSMOUSE_CMD_GETID seems to be significant. The PSMOUSE_CMD_RESET_DIS is irrelevant to this issue after trying several times. So we have only implemented this patch to issue the PSMOUSE_CMD_GETID so far. Tested-by: Daniel Manrique <daniel.manrique@canonical.com> Signed-off-by: James M Leddy <james.leddy@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.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 2f78538e09d0..b2420ae19e14 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1379,6 +1379,7 @@ static int synaptics_reconnect(struct psmouse *psmouse)
1379{ 1379{
1380 struct synaptics_data *priv = psmouse->private; 1380 struct synaptics_data *priv = psmouse->private;
1381 struct synaptics_data old_priv = *priv; 1381 struct synaptics_data old_priv = *priv;
1382 unsigned char param[2];
1382 int retry = 0; 1383 int retry = 0;
1383 int error; 1384 int error;
1384 1385
@@ -1394,6 +1395,7 @@ static int synaptics_reconnect(struct psmouse *psmouse)
1394 */ 1395 */
1395 ssleep(1); 1396 ssleep(1);
1396 } 1397 }
1398 ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETID);
1397 error = synaptics_detect(psmouse, 0); 1399 error = synaptics_detect(psmouse, 0);
1398 } while (error && ++retry < 3); 1400 } while (error && ++retry < 3);
1399 1401