mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <jhf@rivenstone.net>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, vojtech@suse.cz
Subject: Re: [PATCH][RESEND] Force mouse detection as imps/2 (and fix my KVM switch)
Date: Mon, 1 Sep 2003 00:40:40 -0400	[thread overview]
Message-ID: <20030901044040.GA862@zion.rivenstone.net> (raw)
In-Reply-To: <20030831121432.4ac11574.akpm@osdl.org>


[-- Attachment #1.1: Type: text/plain, Size: 690 bytes --]

On Sun, Aug 31, 2003 at 12:14:32PM -0700, Andrew Morton wrote:
> <jhf@rivenstone.net> wrote:
> >
> >     This patch is against -test4; it applies to -test4-mm4 with
> >  offsets (I'm running -mm4).  More than half the length of the patch is
> >  indentation.  Is there a possibility of getting this applied?
> 
> Please resend as an attachment.  I was unable to de-mime it.

    Okay, I'm attaching a slightly changed patch that puts things back
in the roughly alphabetical order I found them in.  It compiles and
tests okay.

-- 
Joseph Fannin
jhf@rivenstone.net

"Bull in pure form is rare; there is usually some contamination by data."
    -- William Graves Perry Jr.

[-- Attachment #1.2: psmouse_imps2.diff --]
[-- Type: text/plain, Size: 5694 bytes --]

diff -urN linux-2.6.0-test4/Documentation/kernel-parameters.txt linux-2.6.0-test4_changed/Documentation/kernel-parameters.txt
--- linux-2.6.0-test4/Documentation/kernel-parameters.txt	2003-08-31 08:08:00.000000000 -0400
+++ linux-2.6.0-test4_changed/Documentation/kernel-parameters.txt	2003-09-01 00:17:53.000000000 -0400
@@ -783,6 +783,8 @@
 			before loading.
 			See Documentation/ramdisk.txt.
 
+	psmouse_imps2	[HW,MOUSE] Probe only for Intellimouse PS2 mouse protocol extensions
+
 	psmouse_noext	[HW,MOUSE] Disable probing for PS2 mouse protocol extensions
 
 	pss=		[HW,OSS] Personal Sound System (ECHO ESC614)
diff -urN linux-2.6.0-test4/drivers/input/mouse/psmouse-base.c linux-2.6.0-test4_changed/drivers/input/mouse/psmouse-base.c
--- linux-2.6.0-test4/drivers/input/mouse/psmouse-base.c	2003-07-27 12:58:51.000000000 -0400
+++ linux-2.6.0-test4_changed/drivers/input/mouse/psmouse-base.c	2003-09-01 00:17:25.000000000 -0400
@@ -23,6 +23,8 @@
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("PS/2 mouse driver");
+MODULE_PARM(psmouse_imps2, "1i");
+MODULE_PARM_DESC(psmouse_imps2, "Limit protocol extensions to the Intellimouse protocol.");
 MODULE_PARM(psmouse_noext, "1i");
 MODULE_PARM_DESC(psmouse_noext, "Disable any protocol extensions. Useful for KVM switches.");
 MODULE_PARM(psmouse_resolution, "i");
@@ -33,6 +35,7 @@
 
 #define PSMOUSE_LOGITECH_SMARTSCROLL	1
 
+static int psmouse_imps2;
 static int psmouse_noext;
 int psmouse_resolution;
 int psmouse_smartscroll = PSMOUSE_LOGITECH_SMARTSCROLL;
@@ -250,66 +253,68 @@
 	if (psmouse_noext)
 		return PSMOUSE_PS2;
 
-/*
- * Try Synaptics TouchPad magic ID
- */
-
-       param[0] = 0;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+	if (!psmouse_imps2) {
 
-       if (param[1] == 0x47) {
-		psmouse->vendor = "Synaptics";
-		psmouse->name = "TouchPad";
-		if (!synaptics_init(psmouse))
-			return PSMOUSE_SYNAPTICS;
-		else
-			return PSMOUSE_PS2;
-       }
+		/*
+		 * Try Synaptics TouchPad magic ID
+		 */
 
-/*
- * Try Genius NetMouse magic init.
- */
+		param[0] = 0;
+		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+		psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+
+		if (param[1] == 0x47) {
+			psmouse->vendor = "Synaptics";
+			psmouse->name = "TouchPad";
+			if (!synaptics_init(psmouse))
+				return PSMOUSE_SYNAPTICS;
+			else
+				return PSMOUSE_PS2;
+		}
 
-	param[0] = 3;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+		/*
+		 * Try Genius NetMouse magic init.
+		 */
 
-	if (param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55) {
+		param[0] = 3;
+		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+		psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
 
-		set_bit(BTN_EXTRA, psmouse->dev.keybit);
-		set_bit(BTN_SIDE, psmouse->dev.keybit);
-		set_bit(REL_WHEEL, psmouse->dev.relbit);
+		if (param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55) {
 
-		psmouse->vendor = "Genius";
-		psmouse->name = "Wheel Mouse";
-		return PSMOUSE_GENPS;
-	}
+			set_bit(BTN_EXTRA, psmouse->dev.keybit);
+			set_bit(BTN_SIDE, psmouse->dev.keybit);
+			set_bit(REL_WHEEL, psmouse->dev.relbit);
 
-/*
- * Try Logitech magic ID.
- */
+			psmouse->vendor = "Genius";
+			psmouse->name = "Wheel Mouse";
+			return PSMOUSE_GENPS;
+		}
 
-	param[0] = 0;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-	param[1] = 0;
-	psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+		/*
+		 * Try Logitech magic ID.
+		 */
 
-	if (param[1]) {
-		int type = ps2pp_detect_model(psmouse, param);
-		if (type)
-			return type;
+		param[0] = 0;
+		psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+		psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+		param[1] = 0;
+		psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+
+		if (param[1]) {
+			int type = ps2pp_detect_model(psmouse, param);
+			if (type)
+				return type;
+		}
 	}
-
 /*
  * Try IntelliMouse magic init.
  */
@@ -549,6 +554,12 @@
 };
 
 #ifndef MODULE
+static int __init psmouse_imps2_setup(char *str)
+{
+	psmouse_imps2 = 1;
+	return 1;
+}
+
 static int __init psmouse_noext_setup(char *str)
 {
 	psmouse_noext = 1;
@@ -567,6 +578,7 @@
 	return 1;
 }
 
+__setup("psmouse_imps2", psmouse_imps2_setup);
 __setup("psmouse_noext", psmouse_noext_setup);
 __setup("psmouse_resolution=", psmouse_resolution_setup);
 __setup("psmouse_smartscroll=", psmouse_smartscroll_setup);

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2003-09-01  4:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-31 13:06 jhf
2003-08-31 13:16 ` [RESEND] " Petr Baudis
     [not found] ` <20030831121432.4ac11574.akpm@osdl.org>
2003-09-01  4:40   ` jhf [this message]

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=20030901044040.GA862@zion.rivenstone.net \
    --to=jhf@rivenstone.net \
    --cc=akpm@osdl.org \
    --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

all inboxes | Powered by JetHome®