* [PATCH 1/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost after resume
2013-04-10 0:30 [PATCH 0/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost James M Leddy
@ 2013-04-10 0:30 ` James M Leddy
2013-04-10 1:14 ` [PATCH 0/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost James M Leddy
2013-04-10 1:18 ` [PATCH 1/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost after resume James M Leddy
2 siblings, 0 replies; 4+ messages in thread
From: James M Leddy @ 2013-04-10 0:30 UTC (permalink / raw)
To: linux-kernel, dmitry.torokhov; +Cc: haitao.zhang
From: Eric Miao <eric.miao@canonical.com>
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>
---
drivers/input/mouse/synaptics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 12d12ca..3438a9d 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1355,6 +1355,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;
@@ -1370,6 +1371,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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost
2013-04-10 0:30 [PATCH 0/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost James M Leddy
2013-04-10 0:30 ` [PATCH 1/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost after resume James M Leddy
@ 2013-04-10 1:14 ` James M Leddy
2013-04-10 1:18 ` [PATCH 1/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost after resume James M Leddy
2 siblings, 0 replies; 4+ messages in thread
From: James M Leddy @ 2013-04-10 1:14 UTC (permalink / raw)
To: James M Leddy; +Cc: linux-kernel, dmitry.torokhov, haitao.zhang, linux-input
I meant to send this to linux-input
On 04/09/2013 08:30 PM, James M Leddy wrote:
> We have been using this patch in Ubuntu kernels for 5 months now
> without issue. Since patch author Eric Miao no longer works for us,
> I'm sending to the list so that other distros can take advantage of
> this.
>
> Last we left off, the suggestion was to make this generic across the
> entire range of protocols, not just synaptics. I'm against this for
> two reasons. The first is that I don't want to have to ask for
> additional testing (I don't have access to the machine). The second
> and far more important reason is that I am afraid that this will break
> other non-synaptics touchpads, and even though we have a wide range of
> hardware, it is impossible to guarantee that it'll work on everything
> out there. I will do it however if it's the way we need to go with
> this.
>
> Please let me know what you think, or if you need any additional
> information or testing.
>
> James M Leddy (1):
> input: fix weird issue of synaptics psmouse sync lost
> after resume
>
> drivers/input/mouse/synaptics.c | 2 ++
> 1 file changed, 2 insertions(+)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost after resume
2013-04-10 0:30 [PATCH 0/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost James M Leddy
2013-04-10 0:30 ` [PATCH 1/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost after resume James M Leddy
2013-04-10 1:14 ` [PATCH 0/1][RESUBMIT] input: fix weird issue of synaptics psmouse sync lost James M Leddy
@ 2013-04-10 1:18 ` James M Leddy
2 siblings, 0 replies; 4+ messages in thread
From: James M Leddy @ 2013-04-10 1:18 UTC (permalink / raw)
To: linux-kernel, linux-input
[-- Attachment #1: Type: text/plain, Size: 1976 bytes --]
From: Eric Miao <eric.miao@canonical.com>
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>
---
drivers/input/mouse/synaptics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/mouse/synaptics.c
b/drivers/input/mouse/synaptics.c
index 12d12ca..3438a9d 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1355,6 +1355,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;
@@ -1370,6 +1371,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);
-- 1.7.9.5
[-- Attachment #2: Attached Message Part --]
[-- Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread