[PATCH 4/8] Psmouse probe fixes

Dmitry Torokhov
2004-09-29T06:51:05Z

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

ChangeSet@1.1950, 2004-09-28 00:09:06-05:00, dtor_core@ameritech.net
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@gmx.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

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);
}

/*