]> git.baikalelectronics.ru Git - kernel.git/commit
Input: synaptics - fix sync lost after resume on some laptops
authorEric Miao <eric.miao@canonical.com>
Tue, 4 Jun 2013 16:30:55 +0000 (09:30 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 4 Jun 2013 16:33:16 +0000 (09:33 -0700)
commit62a5f0741de1a3a980d585b99607d236d9ab411a
tree4c3fbbe0d1ac6d9e4ff57612855ec762ee31ca76
parent97e3798a92865dd9ee80728758750d682677312e
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>
drivers/input/mouse/synaptics.c