linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y
@ 2014-08-12  3:30 Dexuan Cui
  2014-08-12  3:21 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Dexuan Cui @ 2014-08-12  3:30 UTC (permalink / raw)
  To: gregkh, dmitry.torokhov, linux-input, linux-kernel,
	driverdev-devel, olaf, apw, jasowang
  Cc: kys, haiyangz

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)

Decoupling the dependency between hyperv_keyboard and i8042 needs
non-trivial efforts and is hence a long term goal.

For now, let's make the dependency explicit so people can beware of this.

Thank Claudio for the initial reporting, investigation and suggesting the fix.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reported-by: Claudio Latini <claudio.latini@live.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/input/serio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index bc2d474..3277bff 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -273,7 +273,7 @@ config SERIO_OLPC_APSP
 
 config HYPERV_KEYBOARD
 	tristate "Microsoft Synthetic Keyboard driver"
-	depends on HYPERV
+	depends on HYPERV && SERIO_I8042=y
 	default HYPERV
 	help
 	  Select this option to enable the Hyper-V Keyboard driver.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread
* [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs
@ 2016-06-13 14:38 Mark Laws
  2016-06-13 14:38 ` Mark Laws
  0 siblings, 1 reply; 29+ messages in thread
From: Mark Laws @ 2016-06-13 14:38 UTC (permalink / raw)
  To: linux-input; +Cc: Mark Laws, kys, haiyangz, dmitry.torokhov

Some minor reorganizations to i8042.c in order to fix a bug that could prevent
the keyboard from working at the Hyper-V virtual console (see patch for a more
detailed explanation).

Thanks for looking this over, KY--sorry for the delay in resending it!

Mark Laws (1):
  Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs

 drivers/input/serio/Kconfig    |  7 ++++-
 drivers/input/serio/Makefile   |  1 +
 drivers/input/serio/i8042.c    | 48 ---------------------------------
 drivers/input/serio/i8042.h    |  7 -----
 drivers/input/serio/libi8042.c | 60 ++++++++++++++++++++++++++++++++++++++++++
 drivers/input/serio/libps2.c   |  2 +-
 include/linux/i8042.h          | 17 +-----------
 include/linux/libi8042.h       | 55 ++++++++++++++++++++++++++++++++++++++
 8 files changed, 124 insertions(+), 73 deletions(-)
 create mode 100644 drivers/input/serio/libi8042.c
 create mode 100644 include/linux/libi8042.h

-- 
2.8.3


^ permalink raw reply	[flat|nested] 29+ messages in thread
[parent not found: <CADemMPNEv+kq21rXQMmB_BjgTsnEjscOCS5A02VAapOOM-ryMA@mail.gmail.com>]

end of thread, other threads:[~2016-07-25 22:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12  3:30 [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y Dexuan Cui
2014-08-12  3:21 ` Greg KH
2014-08-12  5:51   ` Dexuan Cui
2014-08-12  6:01     ` Greg KH
2014-08-12  7:15       ` Dexuan Cui
2014-08-12 17:54         ` Dmitry Torokhov
2014-08-12 18:01           ` KY Srinivasan
2014-08-13  5:27             ` Dexuan Cui
2014-08-13  5:24           ` Dexuan Cui
2014-08-13 15:56             ` Dmitry Torokhov
2014-08-14  6:07               ` Dexuan Cui
2016-04-18 15:23 ` [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs Mark Laws
2016-04-18 15:23 ` Mark Laws
2016-04-18 16:54   ` Dan Carpenter
2016-04-18 17:24     ` Mark Laws
2016-04-18 20:36       ` Dan Carpenter
2016-04-18 22:00         ` Mark Laws
2016-04-19  8:22           ` Dan Carpenter
2016-04-19 10:46             ` Mark Laws
2016-04-22 13:00               ` Mark Laws
2016-04-22 13:01                 ` Mark Laws
2016-04-22 13:17                   ` Dan Carpenter
2016-04-22 17:30                     ` Mark Laws
2016-04-22 17:30                       ` Mark Laws
  -- strict thread matches above, loose matches on Subject: below --
2016-06-13 14:38 Mark Laws
2016-06-13 14:38 ` Mark Laws
2016-06-13 20:45   ` [PATCH] [PATCH] Input: i8042 - Fix console keyboard support on Mark Laws
2016-06-13 20:45     ` [PATCH] Input: i8042 - Fix console keyboard support on Gen2 Hyper-V VMs Mark Laws
     [not found] <CADemMPNEv+kq21rXQMmB_BjgTsnEjscOCS5A02VAapOOM-ryMA@mail.gmail.com>
2016-07-25 21:01 ` Dmitry Torokhov
2016-07-25 22:15   ` Mark Laws

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).