[PATCH 4/8] Psmouse probe fixes

From: Dmitry Torokhov
Date: Wed Sep 29 2004 - 02:04:19 EST



===================================================================


ChangeSet@xxxxxx, 2004-09-28 00:09:06-05:00, dtor_core@xxxxxxxxxxxxx
Input: psmouse - reset mouse before doing intellimouse/explorer
probes in case it got confused by earlier probes; switch
to streaming mode before setting scale and resolution,
otherwise some KVMs get confused.

Patch-by: Marko Macek <Marko.Macek@xxxxxxx>
Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>


psmouse-base.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)


===================================================================



diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
--- a/drivers/input/mouse/psmouse-base.c 2004-09-29 01:18:55 -05:00
+++ b/drivers/input/mouse/psmouse-base.c 2004-09-29 01:18:55 -05:00
@@ -444,6 +444,12 @@
return type;
}

+/*
+ * Reset to defaults in case the device got confused by extended
+ * protocol probes.
+ */
+ ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
+
if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse)) {

if (set_properties) {
@@ -552,7 +558,11 @@

static void psmouse_initialize(struct psmouse *psmouse)
{
- unsigned char param[2];
+/*
+ * We set the mouse into streaming mode.
+ */
+
+ ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM);

/*
* We set the mouse report rate, resolution and scaling.
@@ -563,12 +573,6 @@
psmouse->set_resolution(psmouse, psmouse->resolution);
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
}
-
-/*
- * We set the mouse into streaming mode.
- */
-
- ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_SETSTREAM);
}

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/