public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 00/13] Input patches for 2.6.12
@ 2005-05-29  4:48 Dmitry Torokhov
  2005-05-29  4:48 ` [patch 01/13] Fix a warning in psmouse-base.c Dmitry Torokhov
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

Hi Linus,

I have prepared some input patches that I would like to see in 2.6.12.
Most of them are coming from Vojtech's BK tree and were in -mm for quite
some time. They fix a warning in pmouse module, allow OSS drivers to
be compiled when gameport support is disabled, fix joystick button
mapping, broken mapping for right "win" key and more.

Please consider pulling from:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input.git

branch "for-linus"

--
Dmitry


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 01/13] Fix a warning in psmouse-base.c
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 02/13] gameport: implement stubs to make OSS drivers buildable Dmitry Torokhov
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: psmouse-warning-fix.patch --]
[-- Type: text/plain, Size: 734 bytes --]

From: Andrew Morton <akpm@osdl.org>

Input: Fix a warning in psmouse-base.c

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/mouse/psmouse-base.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: work/drivers/input/mouse/psmouse-base.c
===================================================================
--- work.orig/drivers/input/mouse/psmouse-base.c
+++ work/drivers/input/mouse/psmouse-base.c
@@ -972,7 +972,7 @@ static int psmouse_set_maxproto(const ch
 		return -EINVAL;
 
 	if (!strncmp(val, "any", 3)) {
-		*((unsigned int *)kp->arg) = -1UL;
+		*((unsigned int *)kp->arg) = -1U;
 		return 0;
 	}
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 02/13] gameport: implement stubs to make OSS drivers buildable
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
  2005-05-29  4:48 ` [patch 01/13] Fix a warning in psmouse-base.c Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 03/13] i8042: try AUX (on x86) even if PNP only reports KBD Dmitry Torokhov
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: gameport-stubs.patch --]
[-- Type: text/plain, Size: 6148 bytes --]

From: Adrian Bunk <bunk@stusta.de>

Input:
This patch adds dummy gameport_register_port, gameport_unregister_port
and gameport_set_phys functions to gameport.h for the case when a driver
can't use gameport.

This fixes the compilation of some OSS drivers with GAMEPORT=n without
the need to #if inside every single driver.

This patch also removes the non-working and now obsolete SOUND_GAMEPORT.

This patch is also an alternative solution for ALSA drivers with similar
problems (but #if's inside the drivers might have the advantage of
saving some more bytes of gameport is not available).

The only user-visible change is that for GAMEPORT=m the affected OSS
drivers are now allowed to be built statically (but they won't have
gameport support).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/gameport/Kconfig |   20 --------------------
 include/linux/gameport.h       |   28 +++++++++++++++++++++++++---
 sound/oss/Kconfig              |   12 ++++++------
 3 files changed, 31 insertions(+), 29 deletions(-)

Index: work/drivers/input/gameport/Kconfig
===================================================================
--- work.orig/drivers/input/gameport/Kconfig
+++ work/drivers/input/gameport/Kconfig
@@ -68,23 +68,3 @@ config GAMEPORT_CS461X
 	depends on PCI
 
 endif
-
-# Yes, SOUND_GAMEPORT looks a bit odd. Yes, it ends up being turned on
-# in every .config. Please don't touch it. It is here to handle an
-# unusual dependency between GAMEPORT and sound drivers.
-#
-# Some sound drivers call gameport functions. If GAMEPORT is
-# not selected, empty stubs are provided for the functions and all is
-# well.
-# If GAMEPORT is built in, everything is fine.
-# If GAMEPORT is a module, however, it would need to be loaded for the
-# sound driver to be able to link properly. Therefore, the sound
-# driver must be a module as well in that case. Since there's no way
-# to express that directly in Kconfig, we use SOUND_GAMEPORT to
-# express it. SOUND_GAMEPORT boils down to "if GAMEPORT is 'm',
-# anything that depends on SOUND_GAMEPORT must be 'm' as well. if
-# GAMEPORT is 'y' or 'n', it can be anything".
-config SOUND_GAMEPORT
-	tristate
-	default m if GAMEPORT=m
-	default y
Index: work/include/linux/gameport.h
===================================================================
--- work.orig/include/linux/gameport.h
+++ work/include/linux/gameport.h
@@ -67,6 +67,8 @@ int gameport_open(struct gameport *gamep
 void gameport_close(struct gameport *gameport);
 void gameport_rescan(struct gameport *gameport);
 
+#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
+
 void __gameport_register_port(struct gameport *gameport, struct module *owner);
 static inline void gameport_register_port(struct gameport *gameport)
 {
@@ -75,6 +77,29 @@ static inline void gameport_register_por
 
 void gameport_unregister_port(struct gameport *gameport);
 
+void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
+	__attribute__ ((format (printf, 2, 3)));
+
+#else
+
+static inline void gameport_register_port(struct gameport *gameport)
+{
+	return;
+}
+
+static inline void gameport_unregister_port(struct gameport *gameport)
+{
+	return;
+}
+
+static inline void gameport_set_phys(struct gameport *gameport,
+				     const char *fmt, ...)
+{
+	return;
+}
+
+#endif
+
 static inline struct gameport *gameport_allocate_port(void)
 {
 	struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL);
@@ -92,9 +117,6 @@ static inline void gameport_set_name(str
 	strlcpy(gameport->name, name, sizeof(gameport->name));
 }
 
-void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
-
 /*
  * Use the following fucntions to manipulate gameport's per-port
  * driver-specific data.
Index: work/sound/oss/Kconfig
===================================================================
--- work.orig/sound/oss/Kconfig
+++ work/sound/oss/Kconfig
@@ -112,7 +112,7 @@ config SOUND_BCM_CS4297A
 
 config SOUND_ES1370
 	tristate "Ensoniq AudioPCI (ES1370)"
-	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND && PCI
 	help
 	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
 	  ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find
@@ -125,7 +125,7 @@ config SOUND_ES1370
 
 config SOUND_ES1371
 	tristate "Creative Ensoniq AudioPCI 97 (ES1371)"
-	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND && PCI
 	help
 	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
 	  ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
@@ -138,7 +138,7 @@ config SOUND_ES1371
 
 config SOUND_ESSSOLO1
 	tristate "ESS Technology Solo1" 
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT && PCI
+	depends on SOUND_PRIME!=n && SOUND && PCI
 	help
 	  Say Y or M if you have a PCI sound card utilizing the ESS Technology
 	  Solo1 chip. To find out if your sound card uses a
@@ -179,7 +179,7 @@ config SOUND_HARMONY
 
 config SOUND_SONICVIBES
 	tristate "S3 SonicVibes"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
 	help
 	  Say Y or M if you have a PCI sound card utilizing the S3
 	  SonicVibes chipset. To find out if your sound card uses a
@@ -226,7 +226,7 @@ config SOUND_AU1550_AC97
 
 config SOUND_TRIDENT
 	tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
 	---help---
 	  Say Y or M if you have a PCI sound card utilizing the Trident
 	  4DWave-DX/NX chipset or your mother board chipset has SiS 7018
@@ -739,7 +739,7 @@ config SOUND_NM256
 
 config SOUND_MAD16
 	tristate "OPTi MAD16 and/or Mozart based cards"
-	depends on SOUND_OSS && SOUND_GAMEPORT
+	depends on SOUND_OSS
 	---help---
 	  Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
 	  82C928 or 82C929 or 82C931) audio interface chip. These chips are


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 03/13] i8042: try AUX (on x86) even if PNP only reports KBD
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
  2005-05-29  4:48 ` [patch 01/13] Fix a warning in psmouse-base.c Dmitry Torokhov
  2005-05-29  4:48 ` [patch 02/13] gameport: implement stubs to make OSS drivers buildable Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 04/13] i8042: remove unused variable Dmitry Torokhov
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: i8042-aux-detection.patch --]
[-- Type: text/plain, Size: 1132 bytes --]

From: Vojtech Pavlik <vojtech@suse.cz>

Input: Add a missing KERN_INFO message designation, fix behavior
       when only a keyboard part of the controller is detected.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042-x86ia64io.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: work/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- work.orig/drivers/input/serio/i8042-x86ia64io.h
+++ work/drivers/input/serio/i8042-x86ia64io.h
@@ -227,7 +227,7 @@ static int i8042_pnp_init(void)
 	int result_kbd, result_aux;
 
 	if (i8042_nopnp) {
-		printk("i8042: PNP detection disabled\n");
+		printk(KERN_INFO "i8042: PNP detection disabled\n");
 		return 0;
 	}
 
@@ -265,7 +265,7 @@ static int i8042_pnp_init(void)
 		i8042_pnp_kbd_irq = i8042_kbd_irq;
 	}
 
-	if (result_aux > 0 && !i8042_pnp_aux_irq) {
+	if (!i8042_pnp_aux_irq) {
 		printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq);
 		i8042_pnp_aux_irq = i8042_aux_irq;
 	}


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 04/13] i8042: remove unused variable
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (2 preceding siblings ...)
  2005-05-29  4:48 ` [patch 03/13] i8042: try AUX (on x86) even if PNP only reports KBD Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 05/13] i8042: dont read CTR when resuming Dmitry Torokhov
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: i8042-kill-unused-variable.patch --]
[-- Type: text/plain, Size: 630 bytes --]

From: Vojtech Pavlik <vojtech@suse.cz>

Input: Remove (now) unused variable in i8042.c

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042.c |    2 --
 1 files changed, 2 deletions(-)

Index: work/drivers/input/serio/i8042.c
===================================================================
--- work.orig/drivers/input/serio/i8042.c
+++ work/drivers/input/serio/i8042.c
@@ -802,8 +802,6 @@ static int i8042_controller_init(void)
  */
 static void i8042_controller_reset(void)
 {
-	unsigned char param;
-
 /*
  * Reset the controller if requested.
  */


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 05/13] i8042: dont read CTR when resuming
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (3 preceding siblings ...)
  2005-05-29  4:48 ` [patch 04/13] i8042: remove unused variable Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 06/13] i8042: tone down warning when PNP insists that KBC is missing Dmitry Torokhov
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: i8042-dont-read-ctr-when-resuming.patch --]
[-- Type: text/plain, Size: 2378 bytes --]

From: Vojtech Pavlik <vojtech@suse.cz>

Input: Only write the CTR in i8042 resume function. Reading it is
       wrong, since it may (will) contain nonsensical data.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042.c |   48 +++++++++++++++++++++++++-------------------
 1 files changed, 28 insertions(+), 20 deletions(-)

Index: work/drivers/input/serio/i8042.c
===================================================================
--- work.orig/drivers/input/serio/i8042.c
+++ work/drivers/input/serio/i8042.c
@@ -698,6 +698,26 @@ static void i8042_timer_func(unsigned lo
 	i8042_interrupt(0, NULL, NULL);
 }
 
+static int i8042_ctl_test(void)
+{
+	unsigned char param;
+
+	if (!i8042_reset)
+		return 0;
+
+	if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
+		printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
+		return -1;
+	}
+
+	if (param != I8042_RET_CTL_TEST) {
+		printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
+			 param, I8042_RET_CTL_TEST);
+		return -1;
+	}
+
+	return 0;
+}
 
 /*
  * i8042_controller init initializes the i8042 controller, and,
@@ -719,21 +739,8 @@ static int i8042_controller_init(void)
 		return -1;
 	}
 
-	if (i8042_reset) {
-
-		unsigned char param;
-
-		if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
-			printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
-			return -1;
-		}
-
-		if (param != I8042_RET_CTL_TEST) {
-			printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
-				 param, I8042_RET_CTL_TEST);
-			return -1;
-		}
-	}
+	if (i8042_ctl_test())
+		return -1;
 
 /*
  * Save the CTR for restoral on unload / reboot.
@@ -806,9 +813,7 @@ static void i8042_controller_reset(void)
  * Reset the controller if requested.
  */
 
-	if (i8042_reset)
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	i8042_ctl_test();
 
 /*
  * Disable MUX mode if present.
@@ -920,8 +925,11 @@ static int i8042_resume(struct device *d
 	if (level != RESUME_ENABLE)
 		return 0;
 
-	if (i8042_controller_init()) {
-		printk(KERN_ERR "i8042: resume failed\n");
+	if (i8042_ctl_test())
+		return -1;
+
+	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+		printk(KERN_ERR "i8042: Can't write CTR\n");
 		return -1;
 	}
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 06/13] i8042: tone down warning when PNP insists that KBC is missing
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (4 preceding siblings ...)
  2005-05-29  4:48 ` [patch 05/13] i8042: dont read CTR when resuming Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 07/13] i8042: Make sure we unregister PNP driver only once Dmitry Torokhov
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: i8042-tone-down-warnings.patch --]
[-- Type: text/plain, Size: 866 bytes --]

Input: Tone down the severity of a printk() in i386/ia64 arch code
       for i386, it's printed on many machines and usually is not
       a cause for worry.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
---

 drivers/input/serio/i8042-x86ia64io.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: work/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- work.orig/drivers/input/serio/i8042-x86ia64io.h
+++ work/drivers/input/serio/i8042-x86ia64io.h
@@ -241,7 +241,7 @@ static int i8042_pnp_init(void)
 #if defined(__ia64__)
 		return -ENODEV;
 #else
-		printk(KERN_WARNING "PNP: No PS/2 controller found. Probing ports directly.\n");
+		printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n");
 		return 0;
 #endif
 	}


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 07/13] i8042: Make sure we unregister PNP driver only once
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (5 preceding siblings ...)
  2005-05-29  4:48 ` [patch 06/13] i8042: tone down warning when PNP insists that KBC is missing Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 08/13] psmouse: workaround for Sunrex mouse Dmitry Torokhov
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: i8042-unregister-only-once.patch --]
[-- Type: text/plain, Size: 1082 bytes --]

From: Kurt Garloff <garloff@suse.de>

Input: Avoid double unregistering of i8042 PnP driver. This can happen
       when no i8042 controller (not PnP, not legacy) is present.

From: Kurt Garloff <garloff@suse.de>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042-x86ia64io.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Index: work/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- work.orig/drivers/input/serio/i8042-x86ia64io.h
+++ work/drivers/input/serio/i8042-x86ia64io.h
@@ -215,11 +215,15 @@ static struct pnp_driver i8042_pnp_aux_d
 
 static void i8042_pnp_exit(void)
 {
-	if (i8042_pnp_kbd_registered)
+	if (i8042_pnp_kbd_registered) {
+		i8042_pnp_kbd_registered = 0;
 		pnp_unregister_driver(&i8042_pnp_kbd_driver);
+	}
 
-	if (i8042_pnp_aux_registered)
+	if (i8042_pnp_aux_registered) {
+		i8042_pnp_aux_registered = 0;
 		pnp_unregister_driver(&i8042_pnp_aux_driver);
+	}
 }
 
 static int i8042_pnp_init(void)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 08/13] psmouse: workaround for Sunrex mouse
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (6 preceding siblings ...)
  2005-05-29  4:48 ` [patch 07/13] i8042: Make sure we unregister PNP driver only once Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 09/13] joydev: fix button mapping Dmitry Torokhov
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: sunrex-kbd-mouse-fix.patch --]
[-- Type: text/plain, Size: 1202 bytes --]

From: Vojtech Pavlik <vojtech@suse.cz>

Input: Workaround for Sunrex K8561 IR Keyboard/Mouse. The mouse
       sends an incorrect ID and wasn't recognized.

Reported-by: Stefan Seyfried <seife@suse.de>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/mouse/psmouse-base.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

Index: work/drivers/input/mouse/psmouse-base.c
===================================================================
--- work.orig/drivers/input/mouse/psmouse-base.c
+++ work/drivers/input/mouse/psmouse-base.c
@@ -518,13 +518,16 @@ static int psmouse_probe(struct psmouse 
 /*
  * First, we check if it's a mouse. It should send 0x00 or 0x03
  * in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer.
+ * Sunrex K8561 IR Keyboard/Mouse reports 0xff on second and subsequent
+ * ID queries, probably due to a firmware bug.
  */
 
 	param[0] = 0xa5;
 	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
 		return -1;
 
-	if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04)
+	if (param[0] != 0x00 && param[0] != 0x03 &&
+	    param[0] != 0x04 && param[0] != 0xff)
 		return -1;
 
 /*


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 09/13] joydev: fix button mapping
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (7 preceding siblings ...)
  2005-05-29  4:48 ` [patch 08/13] psmouse: workaround for Sunrex mouse Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 10/13] gunze: fix out-of-bound array access Dmitry Torokhov
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: joydev-button-fix.patch --]
[-- Type: text/plain, Size: 877 bytes --]

From: Vojtech Pavlik <vojtech@suse.cz>

Input: Fix button mapping in joydev - BTN_TRIGGER was being
       mapped twice, resulting in it being the last (instead
       of first) button on a joystick.

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/joydev.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: work/drivers/input/joydev.c
===================================================================
--- work.orig/drivers/input/joydev.c
+++ work/drivers/input/joydev.c
@@ -422,7 +422,7 @@ static struct input_handle *joydev_conne
 			joydev->nkey++;
 		}
 
-	for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++)
+	for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++)
 		if (test_bit(i + BTN_MISC, dev->keybit)) {
 			joydev->keymap[i] = joydev->nkey;
 			joydev->keypam[joydev->nkey] = i + BTN_MISC;


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 10/13] gunze: fix out-of-bound array access
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (8 preceding siblings ...)
  2005-05-29  4:48 ` [patch 09/13] joydev: fix button mapping Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 11/13] i8042: dont activate MUX mode on Toshiba Satellite P10 Dmitry Torokhov
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: gunze-oob-access.patch --]
[-- Type: text/plain, Size: 802 bytes --]

Input: gunze - fix out-of-bound array access reported by Adrian Bunk.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/touchscreen/gunze.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

Index: work/drivers/input/touchscreen/gunze.c
===================================================================
--- work.orig/drivers/input/touchscreen/gunze.c
+++ work/drivers/input/touchscreen/gunze.c
@@ -68,8 +68,7 @@ static void gunze_process_packet(struct 
 
 	if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' ||
 		(gunze->data[0] != 'T' && gunze->data[0] != 'R')) {
-		gunze->data[10] = 0;
-		printk(KERN_WARNING "gunze.c: bad packet: >%s<\n", gunze->data);
+		printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data);
 		return;
 	}
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 11/13] i8042: dont activate MUX mode on Toshiba Satellite P10
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (9 preceding siblings ...)
  2005-05-29  4:48 ` [patch 10/13] gunze: fix out-of-bound array access Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 12/13] i8042: dont activate MUX mode on Fujitsu Lifebook S6230 Dmitry Torokhov
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: toshiba-nomux.patch --]
[-- Type: text/plain, Size: 1438 bytes --]

Input: automatically disable MUX mode on Toshiba Satellite P10
       because it interferes with ALPS touchpad detection and
       causes horrible death on reboot. Since P10 does not have
       external PS/2 ports MUX mode does not have any advantages
       over legacy mode anyway.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042-x86ia64io.h |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

Index: work/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- work.orig/drivers/input/serio/i8042-x86ia64io.h
+++ work/drivers/input/serio/i8042-x86ia64io.h
@@ -88,9 +88,11 @@ static struct dmi_system_id __initdata i
 };
 
 /*
- * Some Fujitsu notebooks are ahving trouble with touhcpads if
+ * Some Fujitsu notebooks are having trouble with touchpads if
  * active multiplexing mode is activated. Luckily they don't have
  * external PS/2 ports so we can safely disable it.
+ * ... apparently some Toshibas don't like MUX mode either and
+ * die horrible death on reboot.
  */
 static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
 	{
@@ -121,6 +123,13 @@ static struct dmi_system_id __initdata i
 			DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"),
 		},
 	},
+	{
+		.ident = "Toshiba P10",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"),
+		},
+	},
 	{ }
 };
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 12/13] i8042: dont activate MUX mode on Fujitsu Lifebook S6230
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (10 preceding siblings ...)
  2005-05-29  4:48 ` [patch 11/13] i8042: dont activate MUX mode on Toshiba Satellite P10 Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  4:48 ` [patch 13/13] synaptics: be less verbose on startup Dmitry Torokhov
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: fujitsu-more-nomux.patch --]
[-- Type: text/plain, Size: 797 bytes --]

Input: yet another model that does not play nicely when i8042 is
       put in MUX mode - Fujitsu Lifebook S6230

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042-x86ia64io.h |    7 +++++++
 1 files changed, 7 insertions(+)

Index: work/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- work.orig/drivers/input/serio/i8042-x86ia64io.h
+++ work/drivers/input/serio/i8042-x86ia64io.h
@@ -117,6 +117,13 @@ static struct dmi_system_id __initdata i
 		},
 	},
 	{
+		.ident = "Fujitsu Lifebook S6230",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"),
+		},
+	},
+	{
 		.ident = "Fujitsu T70H",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 13/13] synaptics: be less verbose on startup
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (11 preceding siblings ...)
  2005-05-29  4:48 ` [patch 12/13] i8042: dont activate MUX mode on Fujitsu Lifebook S6230 Dmitry Torokhov
@ 2005-05-29  4:48 ` Dmitry Torokhov
  2005-05-29  7:37 ` [patch 14/13] Fix broken mapping for right "win" key Dmitry Torokhov
  2005-05-29  7:51 ` [patch 00/13] Input patches for 2.6.12 Vojtech Pavlik
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Vojtech Pavlik, Andrew Morton, linux-kernel

[-- Attachment #1: synaptics-verbosiness.patch --]
[-- Type: text/plain, Size: 2654 bytes --]

Input: synaptics - reduce verboseness of synaptics driver - there
       is no reason one driver should take 10 lines in dmesg.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/mouse/synaptics.c |   39 +++++----------------------------------
 1 files changed, 5 insertions(+), 34 deletions(-)

Index: work/drivers/input/mouse/synaptics.c
===================================================================
--- work.orig/drivers/input/mouse/synaptics.c
+++ work/drivers/input/mouse/synaptics.c
@@ -143,39 +143,6 @@ static int synaptics_identify(struct psm
 	return -1;
 }
 
-static void print_ident(struct synaptics_data *priv)
-{
-	printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity));
-	printk(KERN_INFO " Firmware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity),
-	       SYN_ID_MINOR(priv->identity));
-	if (SYN_MODEL_ROT180(priv->model_id))
-		printk(KERN_INFO " 180 degree mounted touchpad\n");
-	if (SYN_MODEL_PORTRAIT(priv->model_id))
-		printk(KERN_INFO " portrait touchpad\n");
-	printk(KERN_INFO " Sensor: %ld\n", SYN_MODEL_SENSOR(priv->model_id));
-	if (SYN_MODEL_NEWABS(priv->model_id))
-		printk(KERN_INFO " new absolute packet format\n");
-	if (SYN_MODEL_PEN(priv->model_id))
-		printk(KERN_INFO " pen detection\n");
-
-	if (SYN_CAP_EXTENDED(priv->capabilities)) {
-		printk(KERN_INFO " Touchpad has extended capability bits\n");
-		if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap))
-			printk(KERN_INFO " -> %d multi-buttons, i.e. besides standard buttons\n",
-			       (int)(SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap)));
-		if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
-			printk(KERN_INFO " -> middle button\n");
-		if (SYN_CAP_FOUR_BUTTON(priv->capabilities))
-			printk(KERN_INFO " -> four buttons\n");
-		if (SYN_CAP_MULTIFINGER(priv->capabilities))
-			printk(KERN_INFO " -> multifinger detection\n");
-		if (SYN_CAP_PALMDETECT(priv->capabilities))
-			printk(KERN_INFO " -> palm detection\n");
-		if (SYN_CAP_PASS_THROUGH(priv->capabilities))
-			printk(KERN_INFO " -> pass-through port\n");
-	}
-}
-
 static int synaptics_query_hardware(struct psmouse *psmouse)
 {
 	int retries = 0;
@@ -666,7 +633,11 @@ int synaptics_init(struct psmouse *psmou
 
 	priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS;
 
-	print_ident(priv);
+	printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n",
+		SYN_ID_MODEL(priv->identity),
+		SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity),
+		priv->model_id, priv->capabilities, priv->ext_cap);
+
 	set_input_params(&psmouse->dev, priv);
 
 	psmouse->protocol_handler = synaptics_process_byte;


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 14/13] Fix broken mapping for right "win" key
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (12 preceding siblings ...)
  2005-05-29  4:48 ` [patch 13/13] synaptics: be less verbose on startup Dmitry Torokhov
@ 2005-05-29  7:37 ` Dmitry Torokhov
  2005-05-29  7:51 ` [patch 00/13] Input patches for 2.6.12 Vojtech Pavlik
  14 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2005-05-29  7:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds, Vojtech Pavlik, Andrew Morton

From: Vojtech Pavlik <vojtech@suse.cz>

Input: Fix fast scrolling scancodes in atkbd.c

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/keyboard/atkbd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Index: work/drivers/input/keyboard/atkbd.c
===================================================================
--- work.orig/drivers/input/keyboard/atkbd.c
+++ work/drivers/input/keyboard/atkbd.c
@@ -171,9 +171,9 @@ static struct {
 	unsigned char set2;
 } atkbd_scroll_keys[] = {
 	{ ATKBD_SCR_1,     0xc5 },
-	{ ATKBD_SCR_2,     0xa9 },
-	{ ATKBD_SCR_4,     0xb6 },
-	{ ATKBD_SCR_8,     0xa7 },
+	{ ATKBD_SCR_2,     0x9d },
+	{ ATKBD_SCR_4,     0xa4 },
+	{ ATKBD_SCR_8,     0x9b },
 	{ ATKBD_SCR_CLICK, 0xe0 },
 	{ ATKBD_SCR_LEFT,  0xcb },
 	{ ATKBD_SCR_RIGHT, 0xd2 },

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 00/13] Input patches for 2.6.12
  2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
                   ` (13 preceding siblings ...)
  2005-05-29  7:37 ` [patch 14/13] Fix broken mapping for right "win" key Dmitry Torokhov
@ 2005-05-29  7:51 ` Vojtech Pavlik
  14 siblings, 0 replies; 16+ messages in thread
From: Vojtech Pavlik @ 2005-05-29  7:51 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

On Sat, May 28, 2005 at 11:48:13PM -0500, Dmitry Torokhov wrote:

> Hi Linus,
> 
> I have prepared some input patches that I would like to see in 2.6.12.
> Most of them are coming from Vojtech's BK tree and were in -mm for quite
> some time. They fix a warning in pmouse module, allow OSS drivers to
> be compiled when gameport support is disabled, fix joystick button
> mapping, broken mapping for right "win" key and more.
> 
> Please consider pulling from:
> 
> rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
> 
> branch "for-linus"

Linus, this pull has my blessing.

I wasn't able to prepare it myself for health and other reason.
 
Thank you very much Dmitry. 

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-05-29  7:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-29  4:48 [patch 00/13] Input patches for 2.6.12 Dmitry Torokhov
2005-05-29  4:48 ` [patch 01/13] Fix a warning in psmouse-base.c Dmitry Torokhov
2005-05-29  4:48 ` [patch 02/13] gameport: implement stubs to make OSS drivers buildable Dmitry Torokhov
2005-05-29  4:48 ` [patch 03/13] i8042: try AUX (on x86) even if PNP only reports KBD Dmitry Torokhov
2005-05-29  4:48 ` [patch 04/13] i8042: remove unused variable Dmitry Torokhov
2005-05-29  4:48 ` [patch 05/13] i8042: dont read CTR when resuming Dmitry Torokhov
2005-05-29  4:48 ` [patch 06/13] i8042: tone down warning when PNP insists that KBC is missing Dmitry Torokhov
2005-05-29  4:48 ` [patch 07/13] i8042: Make sure we unregister PNP driver only once Dmitry Torokhov
2005-05-29  4:48 ` [patch 08/13] psmouse: workaround for Sunrex mouse Dmitry Torokhov
2005-05-29  4:48 ` [patch 09/13] joydev: fix button mapping Dmitry Torokhov
2005-05-29  4:48 ` [patch 10/13] gunze: fix out-of-bound array access Dmitry Torokhov
2005-05-29  4:48 ` [patch 11/13] i8042: dont activate MUX mode on Toshiba Satellite P10 Dmitry Torokhov
2005-05-29  4:48 ` [patch 12/13] i8042: dont activate MUX mode on Fujitsu Lifebook S6230 Dmitry Torokhov
2005-05-29  4:48 ` [patch 13/13] synaptics: be less verbose on startup Dmitry Torokhov
2005-05-29  7:37 ` [patch 14/13] Fix broken mapping for right "win" key Dmitry Torokhov
2005-05-29  7:51 ` [patch 00/13] Input patches for 2.6.12 Vojtech Pavlik

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