public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kim Holviala <kim@holviala.com>
To: linux-kernel@vger.kernel.org
Cc: vojtech@suse.cz, Dmitry Torokhov <dtor_core@ameritech.net>
Subject: [PATCH] psmouse: fix ExPS/2 probing
Date: Thu, 22 Apr 2004 10:53:25 +0300	[thread overview]
Message-ID: <200404221053.25019.kim@holviala.com> (raw)

Split off from an earlier (big and confusing) patch.

Some mice (Logitech trackballs at least) support ExPS/2 but don't support
ImPS/2. The current probing order forces all such devices to use regular
three-button PS/2. This patch fixes it by taking the ExPS/2 probing out
of the ImPS/2 if-then block.

Applies to 2.6.5, 2.6.6-rc2. Won't apply to rc2-mm1 nor on top of Dmitry's
patches.

The third part of the earlier patch fixed protocol probing, but I'll wait
2.6.6 comes out until I redo it.



Kim



--- linux-2.6.6-rc2/drivers/input/mouse/psmouse-base.c	2004-04-21 13:35:43.000000000 +0300
+++ linux-2.6.6-rc2-kim/drivers/input/mouse/psmouse-base.c	2004-04-21 14:17:42.194090939 +0300
@@ -414,19 +414,19 @@
 	if (psmouse_max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
 		set_bit(REL_WHEEL, psmouse->dev.relbit);
 
-		if (psmouse_max_proto >= PSMOUSE_IMEX &&
-					im_explorer_detect(psmouse)) {
-			set_bit(BTN_SIDE, psmouse->dev.keybit);
-			set_bit(BTN_EXTRA, psmouse->dev.keybit);
-
-			psmouse->name = "Explorer Mouse";
-			return PSMOUSE_IMEX;
-		}
-
 		psmouse->name = "Wheel Mouse";
 		return PSMOUSE_IMPS;
 	}
 
+	if (psmouse_max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse)) {
+		set_bit(REL_WHEEL, psmouse->dev.relbit);
+		set_bit(BTN_SIDE, psmouse->dev.keybit);
+		set_bit(BTN_EXTRA, psmouse->dev.keybit);
+
+		psmouse->name = "Explorer Mouse";
+		return PSMOUSE_IMEX;
+	}
+
 /*
  * Okay, all failed, we have a standard mouse here. The number of the buttons
  * is still a question, though. We assume 3.




                 reply	other threads:[~2004-04-22  7:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200404221053.25019.kim@holviala.com \
    --to=kim@holviala.com \
    --cc=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