linux/drivers/input/serio
Dmitry Torokhov 2bad2554bf Input: i8042 - break load dependency between atkbd/psmouse and i8042
[ Upstream commit 4097461897 ]

As explained in 1407814240-4275-1-git-send-email-decui@microsoft.com we
have a hard load dependency between i8042 and atkbd which prevents
keyboard from working on Gen2 Hyper-V VMs.

> hyperv_keyboard invokes serio_interrupt(), which needs a valid serio
> driver like atkbd.c.  atkbd.c depends on libps2.c because it invokes
> ps2_command().  libps2.c depends on i8042.c because it invokes
> i8042_check_port_owner().  As a result, hyperv_keyboard actually
> depends on i8042.c.
>
> For a Generation 2 Hyper-V VM (meaning no i8042 device emulated), if a
> Linux VM (like Arch Linux) happens to configure CONFIG_SERIO_I8042=m
> rather than =y, atkbd.ko can't load because i8042.ko can't load(due to
> no i8042 device emulated) and finally hyperv_keyboard can't work and
> the user can't input: https://bugs.archlinux.org/task/39820
> (Ubuntu/RHEL/SUSE aren't affected since they use CONFIG_SERIO_I8042=y)

To break the dependency we move away from using i8042_check_port_owner()
and instead allow serio port owner specify a mutex that clients should use
to serialize PS/2 command stream.

Reported-by: Mark Laws <mdl@60hz.org>
Tested-by: Mark Laws <mdl@60hz.org>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
History 2016-08-22 12:23:19 -04:00
..
altera_ps2.c Input: altera_ps2 - use correct type for irq return value 2014-10-31 09:32:02 -07:00
ambakmi.c Input: ambakmi - request a shared interrupt for AMBA KMI devices 2014-05-13 23:20:26 -07:00
ams_delta_serio.c ARM: OMAP1: Move board-ams-delta.h from plat to mach 2012-09-20 15:02:19 -07:00
apbps2.c Input: apbps2 - make of_device_id array const 2014-05-14 16:39:57 -07:00
arc_ps2.c Input: keyboard, serio - simplify use of devm_ioremap_resource 2013-08-15 00:30:17 -07:00
at32psif.c Input: at32psif - remove redundant platform_set_drvdata() 2013-05-05 20:15:07 -07:00
ct82c710.c Input: remove use of __devexit 2012-11-24 00:05:38 -08:00
gscps2.c Input: remove use of __devexit 2012-11-24 00:05:38 -08:00
hil_mlc.c Input: HIL - do not call tasklet_disable right before tasklet_kill 2012-11-25 00:10:13 -08:00
hp_sdc.c Input: hp_sdc - use del_timer_sync() in exit path 2014-03-23 17:25:40 -07:00
hp_sdc_mlc.c Input: serio HIL MLC - don't deref null, don't leak and return proper error 2010-11-20 13:38:18 -08:00
hyperv-keyboard.c Input: hyperv-keyboard - register as a wakeup source 2014-08-06 14:10:06 -07:00
i8042-io.h Input: i8042-io - fix up region handling on MIPS 2012-10-17 23:58:56 -07:00
i8042-ip22io.h Input: make i8042_platform_init return 'real' error code 2005-09-04 01:41:38 -05:00
i8042-jazzio.h Input: make i8042_platform_init return 'real' error code 2005-09-04 01:41:38 -05:00
i8042-ppcio.h Input: i8042 - remove SPRUCE support 2010-06-04 00:44:30 -07:00
i8042-snirm.h Input: i8042 - add SNI RM support 2008-03-14 11:54:06 -04:00
i8042-sparcio.h Input: sparc - i8042-sparcio.h: fix unused kbd_res warning 2014-08-19 14:20:40 -07:00
i8042-unicore32io.h unicore32 io: redefine __REG(x) and re-use readl/writel funcs 2011-03-17 09:19:19 +08:00
i8042-x86ia64io.h Input: i8042 - add Fujitsu Lifebook U745 to the nomux list 2016-02-09 22:56:18 -05:00
i8042.c Input: i8042 - break load dependency between atkbd/psmouse and i8042 2016-08-22 12:23:19 -04:00
i8042.h Input: add driver for slidebar on Lenovo IdeaPad laptops 2013-08-26 09:30:03 -07:00
Kconfig Input: olpc_apsp - fix dependencies of OLPC AP-SP driver 2014-03-23 17:26:00 -07:00
libps2.c Input: i8042 - break load dependency between atkbd/psmouse and i8042 2016-08-22 12:23:19 -04:00
maceps2.c Input: remove use of __devexit 2012-11-24 00:05:38 -08:00
Makefile Input: add a driver to support Hyper-V synthetic keyboard 2013-09-19 08:58:02 -07:00
olpc_apsp.c Input: olpc_apsp - make of_device_id array const 2014-05-14 16:39:57 -07:00
parkbd.c Input: serio - fix blocking of parport 2015-12-02 23:25:47 -05:00
pcips2.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
ps2mult.c Input: serio - use module_serio_driver 2012-04-04 09:25:43 -07:00
q40kbd.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
rpckbd.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
sa1111ps2.c Input: remove use of __devexit 2012-11-24 00:05:38 -08:00
serio.c Input: serio - avoid negative serio device numbers 2014-10-09 15:27:25 -07:00
serio_raw.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
serport.c Input: serport - add compat handling for SPIOCSTYPE ioctl 2014-09-10 10:27:42 -07:00
xilinx_ps2.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00