public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/8] Psmouse probe fixes
Date: Wed, 29 Sep 2004 01:44:03 -0500	[thread overview]
Message-ID: <200409290144.04783.dtor_core@ameritech.net> (raw)
In-Reply-To: <200409290143.11562.dtor_core@ameritech.net>


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


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

  reply	other threads:[~2004-09-29  6:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29  6:40 [PATCH 0/8] Set of input (psmouse) patches Dmitry Torokhov
2004-09-29  6:41 ` [PATCH 1/8] New ALPS signature Dmitry Torokhov
2004-09-29  6:42   ` [PATCH 2/8] Psmouse rate and resolution handlers Dmitry Torokhov
2004-09-29  6:43     ` [PATCH 3/8] Guest protocol switch in synaptics Dmitry Torokhov
2004-09-29  6:44       ` Dmitry Torokhov [this message]
2004-09-29  6:44         ` [PATCH 5/8] Export psmouse parameters via sysfs Dmitry Torokhov
2004-09-29  6:45           ` [PATCH 6/8] Drop PS2TPP protocol identifier Dmitry Torokhov
2004-09-29  6:46             ` [PATCH 7/8] Separate PS2PP protocol handling Dmitry Torokhov
2004-09-29  6:47               ` [PATCH 7/8] Psmouse - add packet size Dmitry Torokhov
2004-09-29  7:15                 ` Vojtech Pavlik
2004-09-29  7:29                   ` Dmitry Torokhov
2004-09-29  9:31                     ` Vojtech Pavlik
2004-09-29 13:24                       ` Dmitry Torokhov
2004-09-29 13:38                         ` Vojtech Pavlik
2004-09-30  6:43                           ` Dmitry Torokhov
2004-09-30  7:55                             ` Vojtech Pavlik
2004-09-30 10:34                             ` Jan-Benedict Glaw
2004-09-29  7:11 ` [PATCH 0/8] Set of input (psmouse) patches Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409290144.04783.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox