hitmoon / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
e336be
From 31e64826785b5bafef7a6361516c060be2bca253 Mon Sep 17 00:00:00 2001
e336be
From: Bastien Nocera <hadess@hadess.net>
e336be
Date: Thu, 20 May 2010 10:30:31 -0400
e336be
Subject: [PATCH] disable i8042 check on apple mac
e336be
e336be
As those computers never had any i8042 controllers, and the
e336be
current lookup code could potentially lock up/hang/wait for
e336be
timeout for long periods of time.
e336be
e336be
Fixes intermittent hangs on boot on a MacbookAir1,1
e336be
e336be
Bugzilla: N/A
e336be
Upstream-status: http://lkml.indiana.edu/hypermail/linux/kernel/1005.0/00938.html (and pinged on Dec 17, 2013)
e336be
e336be
Signed-off-by: Bastien Nocera <hadess@hadess.net>
e336be
---
e336be
 drivers/input/serio/i8042.c | 22 ++++++++++++++++++++++
e336be
 1 file changed, 22 insertions(+)
e336be
e336be
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
e336be
index c9c98f0ab284..5137185e14a9 100644
e336be
--- a/drivers/input/serio/i8042.c
e336be
+++ b/drivers/input/serio/i8042.c
e336be
@@ -1540,6 +1540,22 @@ static struct notifier_block i8042_kbd_bind_notifier_block = {
e336be
 	.notifier_call = i8042_kbd_bind_notifier,
e336be
 };
e336be
 
e336be
+#ifdef CONFIG_DMI
e336be
+static struct dmi_system_id __initdata dmi_system_table[] = {
e336be
+	{
e336be
+		.matches = {
e336be
+			DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
e336be
+		},
e336be
+	},
e336be
+	{
e336be
+		.matches = {
e336be
+			DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
e336be
+		},
e336be
+	},
e336be
+	{}
e336be
+};
e336be
+#endif /*CONFIG_DMI*/
e336be
+
e336be
 static int __init i8042_init(void)
e336be
 {
e336be
 	struct platform_device *pdev;
e336be
@@ -1547,6 +1563,12 @@ static int __init i8042_init(void)
e336be
 
e336be
 	dbg_init();
e336be
 
e336be
+#ifdef CONFIG_DMI
e336be
+	/* Intel Apple Macs never have an i8042 controller */
e336be
+	if (dmi_check_system(dmi_system_table) > 0)
e336be
+		return -ENODEV;
e336be
+#endif /*CONFIG_DMI*/
e336be
+
e336be
 	err = i8042_platform_init();
e336be
 	if (err)
e336be
 		return err;
e336be
-- 
e336be
2.4.3
e336be