Commit 04a08885 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

Input: psmouse - reset all types of mice before reconnecting

commit ef110b24 upstream.

Synaptics hardware requires resetting device after suspend to ram
in order for the device to be operational. The reset lives in
synaptics-specific reconnect handler, but it is not being invoked
if synaptics support is disabled and the device is handled as a
standard PS/2 device (bare or IntelliMouse protocol).

Let's add reset into generic reconnect handler as well.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Cc: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ed24d912
......@@ -1349,6 +1349,7 @@ static int psmouse_reconnect(struct serio *serio)
struct psmouse *psmouse = serio_get_drvdata(serio);
struct psmouse *parent = NULL;
struct serio_driver *drv = serio->drv;
unsigned char type;
int rc = -1;
if (!drv || !psmouse) {
......@@ -1368,10 +1369,15 @@ static int psmouse_reconnect(struct serio *serio)
if (psmouse->reconnect) {
if (psmouse->reconnect(psmouse))
goto out;
} else if (psmouse_probe(psmouse) < 0 ||
psmouse->type != psmouse_extensions(psmouse,
psmouse_max_proto, false)) {
goto out;
} else {
psmouse_reset(psmouse);
if (psmouse_probe(psmouse) < 0)
goto out;
type = psmouse_extensions(psmouse, psmouse_max_proto, false);
if (psmouse->type != type)
goto out;
}
/* ok, the device type (and capabilities) match the old one,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment