Skip to contentSkip to conversation

Disable i8042 checks on Intel Apple Macs

PATCH In review Bastien Nocera 3 participants 4 messages May 12, 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-x86ia64io.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +18 -0
index ead0494..e859902 100644
@@ -479,6 +479,22 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
 	{ }
 };
 
+/* Intel Apple Macs never have an i8042 controller,
+ * so we shouldn't even try to probe for it */
+static const struct dmi_system_id __initconst i8042_dmi_no_probe_table[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
+		},
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
+		},
+	},
+	{}
+};
+
 #ifdef CONFIG_PNP
 static const struct dmi_system_id __initconst i8042_dmi_nopnp_table[] = {
 	{
@@ -833,6 +849,8 @@ static int __init i8042_platform_init(void)
  *	if (!request_region(I8042_DATA_REG, 16, "i8042"))
  *		return -EBUSY;
  */
+	if (dmi_check_system(i8042_dmi_no_probe_table))
+		return -ENODEV;
 
 	i8042_kbd_irq = I8042_MAP_IRQ(1);
 	i8042_aux_irq = I8042_MAP_IRQ(12);
Signature · 1 line
1.7.0.1
#1 lore raw
Quoted 23 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-x86ia64io.h |   18 ++++++++++++++++++

 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +4 -0
index ead0494..e859902 100644
@@ -479,6 +479,22 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
        { }
  };
 
+/* Intel Apple Macs never have an i8042 controller,
+ * so we shouldn't even try to probe for it */
+static const struct dmi_system_id __initconst i8042_dmi_no_probe_table[] = {
+       {

drivers/input/serio/i8042-x86ia64io.h static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { · line 495

Quoted 10 lines
drivers/input/serio/i8042-x86ia64io.h +10 -0
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
+               },
+       },
+       {
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
+               },
+       },
+       {}

No need for that extra {}

Signature · 1 line
Felipe Contreras
#2 lore raw
Quoted 1 line · Felipe Contreras

No need for that extra {}

Disregard that... didn't notice dmi_check_system() doesn't have an element count argument.

Signature · 1 line
Felipe Contreras
maintainer
#3 lore raw
In reply to Felipe Contreras
Quoted 20 lines · Felipe Contreras
Quoted 19 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-x86ia64io.h |   18 ++++++++++++++++++

 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +0 -0
index ead0494..e859902 100644
@@ -479,6 +479,22 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
        { }
  };
 
Quoted 17 lines
Quoted 4 lines
drivers/input/serio/i8042-x86ia64io.h +4 -0
+/* Intel Apple Macs never have an i8042 controller,
+ * so we shouldn't even try to probe for it */
+static const struct dmi_system_id __initconst i8042_dmi_no_probe_table[] = {
+       {

drivers/input/serio/i8042-x86ia64io.h static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { · line 495

Quoted 10 lines
drivers/input/serio/i8042-x86ia64io.h +10 -0
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
+               },
+       },
+       {
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
+               },
+       },
+       {}

No need for that extra {}

Actually, there is.

Signature · 1 line
Dmitry