]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
disable i8042 check on apple mac
authorBastien Nocera <hadess@hadess.net>
Thu, 20 May 2010 14:30:31 +0000 (10:30 -0400)
committerJulien Grall <julien.grall@citrix.com>
Fri, 18 Sep 2015 15:29:30 +0000 (16:29 +0100)
As those computers never had any i8042 controllers, and the
current lookup code could potentially lock up/hang/wait for
timeout for long periods of time.

Fixes intermittent hangs on boot on a MacbookAir1,1

Bugzilla: N/A
Upstream-status: http://lkml.indiana.edu/hypermail/linux/kernel/1005.0/00938.html (and pinged on Dec 17, 2013)

Signed-off-by: Bastien Nocera <hadess@hadess.net>
drivers/input/serio/i8042.c

index 4022b75eaad78c7afc1d5281c3a479daf378f53e..1aaf06aa7b0f06a72f69ce7957a6570e256648b9 100644 (file)
@@ -1506,6 +1506,22 @@ static struct platform_driver i8042_driver = {
        .shutdown       = i8042_shutdown,
 };
 
+#ifdef CONFIG_DMI
+static struct dmi_system_id __initdata dmi_system_table[] = {
+       {
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
+               },
+       },
+       {
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
+               },
+       },
+       {}
+};
+#endif /*CONFIG_DMI*/
+
 static int __init i8042_init(void)
 {
        struct platform_device *pdev;
@@ -1513,6 +1529,12 @@ static int __init i8042_init(void)
 
        dbg_init();
 
+#ifdef CONFIG_DMI
+       /* Intel Apple Macs never have an i8042 controller */
+       if (dmi_check_system(dmi_system_table) > 0)
+               return -ENODEV;
+#endif /*CONFIG_DMI*/
+
        err = i8042_platform_init();
        if (err)
                return err;