From patchwork Tue Aug 12 03:30:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dexuan Cui X-Patchwork-Id: 4710561 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 32B629F38D for ; Tue, 12 Aug 2014 02:28:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E6B82011B for ; Tue, 12 Aug 2014 02:28:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53F6120115 for ; Tue, 12 Aug 2014 02:28:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754100AbaHLC2L (ORCPT ); Mon, 11 Aug 2014 22:28:11 -0400 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:41494 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754083AbaHLC2K (ORCPT ); Mon, 11 Aug 2014 22:28:10 -0400 Received: from linuxonhyperv.com ([72.167.245.219]) by p3plsmtps2ded03.prod.phx3.secureserver.net with : DED : id deU91o01a4kklxU01eU9M9; Mon, 11 Aug 2014 19:28:10 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 518) id 877B219083A; Mon, 11 Aug 2014 20:30:41 -0700 (PDT) From: Dexuan Cui To: gregkh@linuxfoundation.org, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com Cc: kys@microsoft.com, haiyangz@microsoft.com Subject: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y Date: Mon, 11 Aug 2014 20:30:40 -0700 Message-Id: <1407814240-4275-1-git-send-email-decui@microsoft.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reported-by: Claudio Latini Cc: K. Y. Srinivasan --- 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.