[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#302729: kernel-image-2.6.8-2-386: PS/2 mouse support broken with KVM switch



On Mon, Apr 04, 2005 at 02:42:39PM +0900, Horms wrote:
> tag 302729 +patch
> thanks
> 
> Hi Conrad,
> 
> I had a quick look through the kernel tree and found that
> the attached patch seems to resolve a KVM+Itellimouse issue.
> You may want to try it out. However I notice that there
> have actually been a very large number of patches (32) to
> psmouse since 2.6.8.1 (which Debian's 2.6.8 is based on)
> so you may need other fixes as well. Perhaps you could
> consider building a kernel image from kernel-source-2.6.11 
> to see if that helps your problem.

Forgot the patch, here it is

-- 
Horms
# origin: dtor_core (BitKeeper)
# cset: 1.1957.1.5 (2.6) key=415ba74cojfjCaou5PKFOWYTaN6imA
# URL: http://linux.bkbits.net:8080/linux-2.6/cset@415ba74cojfjCaou5PKFOWYTaN6imA
# inclusion: upstream
# descrition: Input: psmouse - reset mouse before doing intellimouse/explorer
# revision date: Mon, 04 Apr 2005 14:06:29 +0900
#
# S rset: ChangeSet|1.1957.1.4..1.1957.1.5
# I rset: drivers/input/mouse/psmouse-base.c|1.75..1.76
#
# Key:
# S: Skipped  ChangeSet file only
# O: Original Followed by Updated
# U: Updated  Included with updated range of versions
# I: Included Included verbatim
# E: Excluded Excluded on request from user
# D: Deleted  Manually deleted by subsequent user edit
# R: Revised  Manually revised by subsequent user edit
#
#
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/09/30 01:27:24-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>
# 
# drivers/input/mouse/psmouse-base.c
#   2004/09/30 01:27:07-05:00 dtor_core@ameritech.net +11 -7
#   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 may get confused.
# 
#
===== drivers/input/mouse/psmouse-base.c 1.75 vs 1.76 =====
--- 1.75/drivers/input/mouse/psmouse-base.c	2004-09-30 15:25:30 +09:00
+++ 1.76/drivers/input/mouse/psmouse-base.c	2004-09-30 15:27:07 +09:00
@@ -444,6 +444,12 @@ static int psmouse_extensions(struct psm
 			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_set_rate(struct psmo
 
 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 @@ static void psmouse_initialize(struct ps
 		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);
 }
 
 /*

Reply to: