Skip to contentSkip to conversation

Synaptics driver considered harmful

PATCH Aaron Lehmann 2 participants 3 messages Aug 6, 2003 – Aug 11, 2003

lore
Share & tools
lore
#0 lore raw

Why isn't there a config option for this driver? I just tried to upgrade to CVS HEAD (bkcvs) from a 2.4 kernel and everything went smoothly except my mouse didn't work until I appended psmouse_noext=1. This should not be necessary IMHO. It seems that even desktop users are forced to compile in this driver, and according at least to my experience, it can seriously break things. I don't see what the benefits of the synaptics driver are, and it sounds like this driver has been causing problems since it was released. The driver may well stabilize in the future, but right now it should not be a standard part of the PS/2 mouse driver.

Index: drivers/input/mouse/Kconfig
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/input/mouse/Kconfig,v retrieving revision 1.8

input/mouse/Kconfig +10 -0
diff -u -u -r1.8 Kconfig
@@ -30,6 +30,16 @@
 	  The module will be called psmouse. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+config MOUSE_PS2_SYNAPTICS
+	bool "Synaptics touchpad driver"
+	default n
+	depends on INPUT && INPUT_MOUSE && SERIO && MOUSE_PS2
+	---help---
+	  Say Y here if you have a Synaptics touchpad and would like to use its
+	  PS/2 extensions. Saying Y here may cause problems.
+
+	  If unsure, say N.
+
 config MOUSE_SERIAL
 	tristate "Serial mouse"
 	depends on INPUT && INPUT_MOUSE && SERIO

Index: drivers/input/mouse/Makefile
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/input/mouse/Makefile,v retrieving revision 1.8

input/mouse/Makefile +2 -1
diff -u -u -r1.8 Makefile
@@ -12,6 +12,7 @@
 obj-$(CONFIG_MOUSE_PC110PAD)	+= pc110pad.o
 obj-$(CONFIG_MOUSE_PC9800)	+= 98busmouse.o
 obj-$(CONFIG_MOUSE_PS2)		+= psmouse.o
+obj-$(CONFIG_MOUSE_PS2_SYNAPTICS)	+= synaptics.o
 obj-$(CONFIG_MOUSE_SERIAL)	+= sermouse.o
 
-psmouse-objs  := psmouse-base.o logips2pp.o synaptics.o
+psmouse-objs  := psmouse-base.o logips2pp.o

Index: drivers/input/mouse/psmouse-base.c
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/input/mouse/psmouse-base.c,v retrieving revision 1.3

input/mouse/psmouse-base.c +8 -0
diff -u -u -r1.3 psmouse-base.c
@@ -18,7 +18,9 @@
 #include <linux/serio.h>
 #include <linux/init.h>
 #include "psmouse.h"
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
 #include "synaptics.h"
+#endif
 #include "logips2pp.h"
 
 MODULE_AUTHOR("Vojtech Pavlik <[email protected]>");
@@ -145,6 +147,7 @@
 		goto out;
 	}
 
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
 	if (psmouse->pktcnt == 1 && psmouse->type == PSMOUSE_SYNAPTICS) {
 		/*
 		 * The synaptics driver has its own resync logic,
@@ -154,6 +157,7 @@
 		psmouse->pktcnt = 0;
 		goto out;
 	}
+#endif
 
 	if (psmouse->pktcnt == 1 && psmouse->packet[0] == PSMOUSE_RET_BAT) {
 		serio_rescan(serio);
@@ -250,6 +254,7 @@
 	if (psmouse_noext)
 		return PSMOUSE_PS2;
 
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
 /*
  * Try Synaptics TouchPad magic ID
  */
@@ -269,6 +274,7 @@
 		else
 			return PSMOUSE_PS2;
        }
+#endif
 
 /*
  * Try Genius NetMouse magic init.
@@ -480,7 +486,9 @@
 	struct psmouse *psmouse = serio->private;
 	input_unregister_device(&psmouse->dev);
 	serio_close(serio);
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS
 	synaptics_disconnect(psmouse);
+#endif
 	kfree(psmouse);
 }
 
#1 lore raw
Quoted 1 line · Aaron Lehmann

Index: drivers/input/mouse/Kconfig

AKPM seems to have a similar patch at ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test2/2.6.0-test2-mm3/broken-out/p00004_synaptics-optional.patch, although it leaves the synaptics code in the kernel.

#2 lore raw
In reply to Aaron Lehmann

Hi!

Quoted 10 lines

Why isn't there a config option for this driver? I just tried to upgrade to CVS HEAD (bkcvs) from a 2.4 kernel and everything went smoothly except my mouse didn't work until I appended psmouse_noext=1. This should not be necessary IMHO. It seems that even desktop users are forced to compile in this driver, and according at least to my experience, it can seriously break things. I don't see what the benefits of the synaptics driver are, and it sounds like this driver has been causing problems since it was released. The driver may well stabilize in the future, but right now it should not be a standard part of the PS/2 mouse driver.

Your fix is right, but vojtech seems to be on holidays. You may want to push through akpm/linus.

Also make it depend on EXPERIMENTAL.

Signature · 2 lines
				Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...