From: tip-bot for Dmitry Torokhov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dmitry.torokhov@gmail.com, marcos.souza.org@gmail.com,
mingo@kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, hpa@zytor.com, tiwai@suse.de
Subject: [tip:x86/urgent] Input: i8042 - Trust firmware a bit more when probing on X86
Date: Mon, 19 Dec 2016 02:40:32 -0800 [thread overview]
Message-ID: <tip-d79e141c1c6ea7cb70c169971d522b88c8d5b419@git.kernel.org> (raw)
In-Reply-To: <1481317061-31486-3-git-send-email-dmitry.torokhov@gmail.com>
Commit-ID: d79e141c1c6ea7cb70c169971d522b88c8d5b419
Gitweb: http://git.kernel.org/tip/d79e141c1c6ea7cb70c169971d522b88c8d5b419
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
AuthorDate: Fri, 9 Dec 2016 12:57:39 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 19 Dec 2016 11:34:15 +0100
Input: i8042 - Trust firmware a bit more when probing on X86
The error message "Can't read CTR while initializing i8042" appears on
Cherry Trail-based devices at each boot time:
i8042: PNP: No PS/2 controller found. Probing ports directly.
i8042: Can't read CTR while initializing i8042
i8042: probe of i8042 failed with error -5
This happens because we historically do not trust firmware on X86 and,
while noting that PNP does not show keyboard or mouse devices, we still
charge ahead and try to probe the controller. Let's relax this a bit and if
results of PNP probe agree with the results of platform
initialization/quirks conclude that there is, in fact, no i8042.
While at it, let's avoid using x86_platform.i8042_detect() and instead
abort execution early if platform indicates that it can not possibly have
i8042 (x86_platform.legacy.i8042 equals X86_LEGACY_I8042_PLATFORM_ABSENT).
Reported-and-tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Cc: linux-input@vger.kernel.org
Link: http://lkml.kernel.org/r/1481317061-31486-3-git-send-email-dmitry.torokhov@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/input/serio/i8042-x86ia64io.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 73a4e68..77551f5 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -983,7 +983,11 @@ static int __init i8042_pnp_init(void)
#if defined(__ia64__)
return -ENODEV;
#else
- pr_info("PNP: No PS/2 controller found. Probing ports directly.\n");
+ pr_info("PNP: No PS/2 controller found.\n");
+ if (x86_platform.legacy.i8042 !=
+ X86_LEGACY_I8042_EXPECTED_PRESENT)
+ return -ENODEV;
+ pr_info("Probing ports directly.\n");
return 0;
#endif
}
@@ -1070,8 +1074,8 @@ static int __init i8042_platform_init(void)
#ifdef CONFIG_X86
u8 a20_on = 0xdf;
- /* Just return if pre-detection shows no i8042 controller exist */
- if (!x86_platform.i8042_detect())
+ /* Just return if platform does not have i8042 controller */
+ if (x86_platform.legacy.i8042 == X86_LEGACY_I8042_PLATFORM_ABSENT)
return -ENODEV;
#endif
next prev parent reply other threads:[~2016-12-19 10:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 20:57 [PATCH 0/4] x86: Trust firmware a bit more about presence of 8042 Dmitry Torokhov
2016-12-09 20:57 ` [PATCH 1/4] x86/init: add i8042 state to the platform data Dmitry Torokhov
2016-12-19 10:39 ` [tip:x86/urgent] x86/init: Add " tip-bot for Dmitry Torokhov
2016-12-09 20:57 ` [PATCH 2/4] Input: i8042 - trust firmware a bit more when probing on X86 Dmitry Torokhov
2016-12-19 10:40 ` tip-bot for Dmitry Torokhov [this message]
2016-12-09 20:57 ` [PATCH 3/4] x86/init: remove i8042_detect() form platform ops Dmitry Torokhov
2016-12-19 10:41 ` [tip:x86/urgent] x86/init: Remove i8042_detect() from " tip-bot for Dmitry Torokhov
2016-12-09 20:57 ` [PATCH 4/4] x86/init: fix a couple typos in arch/x86/include/asm/x86_init.h Dmitry Torokhov
2016-12-19 10:41 ` [tip:x86/urgent] x86/init: Fix a couple of comment typos tip-bot for Dmitry Torokhov
2016-12-09 23:54 ` [PATCH 0/4] x86: Trust firmware a bit more about presence of 8042 Marcos Paulo de Souza
2016-12-12 14:30 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-d79e141c1c6ea7cb70c169971d522b88c8d5b419@git.kernel.org \
--to=tipbot@zytor.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marcos.souza.org@gmail.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox