Skip to contentSkip to conversation

Disable i8042 checks on Intel Apple Macs

PATCH In review Bastien Nocera 4 participants 5 messages May 4, 2010 – May 5, 2010 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable i8042 checks on Intel Apple Macs

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

---
 drivers/input/serio/i8042.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/input/serio/i8042.c +18 -0
index d84a36e..2be7207 100644
@@ -1438,12 +1438,30 @@ static struct platform_driver i8042_driver = {
 	.shutdown	= i8042_shutdown,
 };
 
+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.")
+		},
+	},
+	{}
+};
+
 static int __init i8042_init(void)
 {
 	int err;
 
 	dbg_init();
 
+	/* Intel Apple Macs never have an i8042 controller */
+	if (dmi_check_system(dmi_system_table) > 0)
+		return -ENODEV;
+
 	err = i8042_platform_init();
 	if (err)
 		return err;
Signature · 1 line
1.6.6
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Bastien Nocera

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

My Macbook also complains (doesn't hang though) about this:

Quoted 51 lines

---
 drivers/input/serio/i8042.c |   18 ++++++++++++++++++

 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/input/serio/i8042.c +18 -1
index d84a36e..2be7207 100644
@@ -1438,12 +1438,30 @@ static struct platform_driver i8042_driver = {
        .shutdown       = i8042_shutdown,
  };
 
+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.")
+               },
+       },
+       {}
+};
+
  static int __init i8042_init(void)
  {
        int err;
 
        dbg_init();
 
+       /* Intel Apple Macs never have an i8042 controller */
+       if (dmi_check_system(dmi_system_table) > 0)
+               return -ENODEV;
+
        err = i8042_platform_init();
        if (err)
                return err;
--

1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

maintainer
#2 lore raw
In reply to Bastien Nocera

drivers/input/serio/i8042.c

Quoted 15 lines · Bastien Nocera

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

---
 drivers/input/serio/i8042.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/input/serio/i8042.c +0 -0
index d84a36e..2be7207 100644

This should go into i8042-x86ia64io.h and used to create PNP whitelist.

Thanks.

Signature · 1 line
Dmitry
#3 lore raw
Quoted 12 lines · Dmitry Torokhov
Quoted 11 lines · Bastien Nocera

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

---
 drivers/input/serio/i8042.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
Quoted 6 lines

drivers/input/serio/i8042.c

Quoted 4 lines
drivers/input/serio/i8042.c +0 -0
index d84a36e..2be7207 100644

This should go into i8042-x86ia64io.h and used to create PNP whitelist.

Sorry, I don't understand what needs to be done here.

#4 lore raw
In reply to Bastien Nocera
Quoted 1 line · Bastien Nocera

+static struct dmi_system_id __initdata dmi_system_table[] = {

<snip>

drivers/input/serio/i8042.c static struct platform_driver i8042_driver = { · line 1463

Quoted 3 lines
drivers/input/serio/i8042.c +3 -0
+	/* Intel Apple Macs never have an i8042 controller */
+	if (dmi_check_system(dmi_system_table) > 0)
+		return -ENODEV;

Hi Bastien,

These uses of dmi_ would need to be protected by CONFIG_DMI from being compiled on platforms where DMI doesn't exist (like powerpc.)

regards, Kyle