public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] psmouse: fix ExPS/2 probing
@ 2004-04-22  7:53 Kim Holviala
  0 siblings, 0 replies; only message in thread
From: Kim Holviala @ 2004-04-22  7:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: vojtech, Dmitry Torokhov

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.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-22  7:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-22  7:53 [PATCH] psmouse: fix ExPS/2 probing Kim Holviala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox