@@ -597,7 +597,6 @@ static int cortron_detect(struct psmouse *psmouse, bool set_properties)
static int psmouse_extensions(struct psmouse *psmouse,
unsigned int max_proto, bool set_properties)
{
- bool synaptics_hardware = false;
/*
* We always check for lifebook because it does not disturb mouse
@@ -621,10 +620,10 @@ static int psmouse_extensions(struct psmouse *psmouse,
/*
* Try Synaptics TouchPad. Note that probing is done even if Synaptics protocol
* support is disabled in config - we need to know if it is synaptics so we
- * can reset it properly after probing for intellimouse.
+ * can reset it properly at reconnect and after probing for intellimouse.
*/
if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse, set_properties) == 0) {
- synaptics_hardware = true;
+ psmouse->model = PSMOUSE_MODEL_NEEDRESET;
if (max_proto > PSMOUSE_IMEX) {
/*
@@ -740,7 +739,7 @@ static int psmouse_extensions(struct psmouse *psmouse,
*/
ps2bare_detect(psmouse, set_properties);
- if (synaptics_hardware) {
+ if (psmouse->model == PSMOUSE_MODEL_NEEDRESET) {
/*
* We detected Synaptics hardware but it did not respond to IMPS/2 probes.
* We need to reset the touchpad because if there is a track point on the
@@ -1401,10 +1400,14 @@ static int psmouse_reconnect(struct serio *serio)
if (psmouse->reconnect) {
if (psmouse->reconnect(psmouse))
goto out;
- } else if (psmouse_probe(psmouse) < 0 ||
+ } else {
+ if (psmouse->model == PSMOUSE_MODEL_NEEDRESET)
+ psmouse_reset(psmouse);
+ 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,
@@ -20,6 +20,9 @@
#define PSMOUSE_RET_ACK 0xfa
#define PSMOUSE_RET_NAK 0xfe
+#define PSMOUSE_MODEL_UNKNOWN 0x00
+#define PSMOUSE_MODEL_NEEDRESET 0x01
+
enum psmouse_state {
PSMOUSE_IGNORE,
PSMOUSE_INITIALIZING,