orgads / rpms / kernel

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