@@ -1383,6 +1383,7 @@ static int psmouse_reconnect(struct serio *serio)
struct psmouse *parent = NULL;
struct serio_driver *drv = serio->drv;
int rc = -1;
+ int retries = 0;
if (!drv || !psmouse) {
printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n");
@@ -1401,10 +1402,14 @@ static int psmouse_reconnect(struct serio *serio)
if (psmouse->reconnect) {
if (psmouse->reconnect(psmouse))
goto out;
- } else if (psmouse_probe(psmouse) < 0 ||
+ } else {
+ while ((retries++ < 3) && psmouse_reset(psmouse))
+ /* empty */;
+ if (psmouse_probe(psmouse) < 0 ||
psmouse->type != psmouse_extensions(psmouse,
psmouse_max_proto, false)) {
- goto out;
+ goto out;
+ }
}
/* ok, the device type (and capabilities) match the old one,