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