From patchwork Mon Jul 25 14:09:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 9245643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58858607D3 for ; Mon, 25 Jul 2016 14:10:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B0B62074F for ; Mon, 25 Jul 2016 14:10:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F2E9212D9; Mon, 25 Jul 2016 14:10:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7CC2074F for ; Mon, 25 Jul 2016 14:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752990AbcGYOKD (ORCPT ); Mon, 25 Jul 2016 10:10:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:57214 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962AbcGYOJ7 (ORCPT ); Mon, 25 Jul 2016 10:09:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A3BF6ACAB; Mon, 25 Jul 2016 14:09:57 +0000 (UTC) From: Jiri Slaby To: dmitry.torokhov@gmail.com Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Jiri Slaby Subject: [PATCH] Input: i8042, lower log level when controller_init fails Date: Mon, 25 Jul 2016 16:09:56 +0200 Message-Id: <20160725140956.4559-1-jslaby@suse.cz> X-Mailer: git-send-email 2.9.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are a lot of machines without i8042 controller nowadays. Sometimes i8042_controller_check returns 0 because i8042_flush does nothing (read from the port returns 0 and the while loop does not execute). In that case, the probe method is called and fails with this error output to console: i8042: Can't read CTR while initializing i8042 i8042: probe of i8042 failed with error -5 Lower the former error message to be KERN_INFO and make the function in that case return -ENODEV instead of -EIO. This will suppress the latter. There is also an IBM support page about these messages: https://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5082417 Signed-off-by: Jiri Slaby --- drivers/input/serio/i8042.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 454195709a82..e83e3a0ac395 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -950,8 +950,8 @@ static int i8042_controller_init(void) udelay(50); if (i8042_command(&ctr[n++ % 2], I8042_CMD_CTL_RCTR)) { - pr_err("Can't read CTR while initializing i8042\n"); - return -EIO; + pr_info("Can't read CTR while initializing i8042. Either i8042 controller is not present or it does not respond.\n"); + return -ENODEV; } } while (n < 2 || ctr[0] != ctr[1]);