Re: [PATCH] Disable i8042 checks on Intel Apple Macs

Previous thread: [PATCH][GIT PULL] ring-buffer: Wrap open-coded WARN_ONCE by Steven Rostedt on Tuesday, May 4, 2010 - 10:32 am. (2 messages)

Next thread: [GIT PULL] core fixes by Ingo Molnar on Tuesday, May 4, 2010 - 10:49 am. (1 message)
From: Bastien Nocera
Date: Tuesday, May 4, 2010 - 10:36 am

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

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
 drivers/input/serio/i8042.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index d84a36e..2be7207 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -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



--

From: Pekka Enberg
Date: Tuesday, May 4, 2010 - 10:55 am

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

--

From: Dmitry Torokhov
Date: Tuesday, May 4, 2010 - 11:02 am

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

Thanks.

-- 
Dmitry
--

From: Bastien Nocera
Date: Wednesday, May 5, 2010 - 2:18 am

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

--

From: Kyle McMartin
Date: Wednesday, May 5, 2010 - 2:27 pm

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
--

Previous thread: [PATCH][GIT PULL] ring-buffer: Wrap open-coded WARN_ONCE by Steven Rostedt on Tuesday, May 4, 2010 - 10:32 am. (2 messages)

Next thread: [GIT PULL] core fixes by Ingo Molnar on Tuesday, May 4, 2010 - 10:49 am. (1 message)