linux/drivers/input/joystick
Cameron Gutman 1ff5fa3c67 Input: xpad - prevent spurious input from wired Xbox 360 controllers
After initially connecting a wired Xbox 360 controller or sending it
a command to change LEDs, a status/response packet is interpreted as
controller input. This causes the state of buttons represented in
byte 2 of the controller data packet to be incorrect until the next
valid input packet. Wireless Xbox 360 controllers are not affected.

Writing a new value to the LED device while holding the Start button
and running jstest is sufficient to reproduce this bug. An event will
come through with the Start button released.

Xboxdrv also won't attempt to read controller input from a packet
where byte 0 is non-zero. It also checks that byte 1 is 0x14, but
that value differs between wired and wireless controllers and this
code is shared by both. I think just checking byte 0 is enough to
eliminate unwanted packets.

The following are some examples of 3-byte status packets I saw:
01 03 02
02 03 00
03 03 03
08 03 00

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-27 16:32:47 -07:00
..
iforce Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
a3d.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
adi.c Input: adi - remove an unnecessary check 2015-02-11 23:07:13 -08:00
amijoy.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-03-29 23:17:44 -07:00
analog.c x86/asm/tsc: Rename native_read_tsc() to rdtsc() 2015-07-06 15:23:28 +02:00
as5011.c Input: as5011 - fix error return code in as5011_probe() 2013-08-24 17:44:25 -07:00
cobra.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
db9.c Input: db9 - clear unused function pointers 2015-11-17 10:00:12 -08:00
gamecon.c Input: gamecon - clear unused function pointers 2015-11-17 10:00:13 -08:00
gf2k.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
grip_mp.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
grip.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
guillemot.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
interact.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
joydump.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
Kconfig drivers/input/joystick/Kconfig: zhenhua.c needs BITREVERSE 2015-10-01 21:42:35 -04:00
magellan.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
Makefile Input: add Austria Microsystem AS5011 joystick driver 2011-01-10 11:01:43 -08:00
maplecontrol.c Input: joysticks - use dev_get_platdata() 2013-08-12 22:32:30 -07:00
sidewinder.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
spaceball.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
spaceorb.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
stinger.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
tmdc.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
turbografx.c Input: turbografx - clear unused function pointers 2015-11-17 10:00:14 -08:00
twidjoy.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
walkera0701.c Merge branch 'next' into for-linus 2016-01-11 17:47:25 -08:00
warrior.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
xpad.c Input: xpad - prevent spurious input from wired Xbox 360 controllers 2016-05-27 16:32:47 -07:00
zhenhua.c Input: zhenhua - switch to using bitrev8() 2015-08-20 17:44:34 -07:00