Re: KVM & mouse wheel [PATCH]

From: Marko Macek
Date: Wed Aug 04 2004 - 14:14:00 EST


Dmitry Torokhov wrote:

Anyway, I think that explicitely calling reset-disable after each
failed probe is a good idea... or maybe not after each probe but just
once, before probing for generic protocols (imps/exps), like in the
attached patch.


Besides above, the attached patch moves setting the streaming mode
above setting of resolution/rate/scaling. With that, the mouse works
fine for me in 'imex' mode without any overrides.

Mark


--- drivers/input/mouse/psmouse-base.c.orig 2004-08-04 21:02:38.045307096 +0200
+++ drivers/input/mouse/psmouse-base.c 2004-08-04 21:01:38.739322976 +0200
@@ -461,6 +461,12 @@
return type;
}

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

if (set_properties) {
@@ -581,6 +587,12 @@
unsigned char param[2];

/*
+ * We set the mouse into streaming mode.
+ */
+
+ psmouse_command(psmouse, param, PSMOUSE_CMD_SETSTREAM);
+
+/*
* We set the mouse report rate, resolution and scaling.
*/

@@ -589,12 +601,6 @@
psmouse_set_resolution(psmouse);
psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11);
}
-
-/*
- * We set the mouse into streaming mode.
- */
-
- psmouse_command(psmouse, param, PSMOUSE_CMD_SETSTREAM);
}

/*