linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Disable i8042 checks on Intel Apple Macs
@ 2010-05-12  0:11 Bastien Nocera
  2010-05-12 10:51 ` Felipe Contreras
  0 siblings, 1 reply; 43+ messages in thread
From: Bastien Nocera @ 2010-05-12  0:11 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel

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-x86ia64io.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index ead0494..e859902 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -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);
-- 
1.7.0.1



^ permalink raw reply related	[flat|nested] 43+ messages in thread
* [PATCH] Disable i8042 checks on Intel Apple Macs
@ 2010-05-04 17:36 Bastien Nocera
  2010-05-04 17:55 ` Pekka Enberg
                   ` (2 more replies)
  0 siblings, 3 replies; 43+ messages in thread
From: Bastien Nocera @ 2010-05-04 17:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dmitry Torokhov

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




^ permalink raw reply related	[flat|nested] 43+ messages in thread
* [PATCH] Disable i8042 checks on Intel Apple Macs
@ 2010-01-20 18:23 Bastien Nocera
  2010-01-20 19:14 ` Justin P. Mattock
  2010-01-21  0:41 ` Robert Hancock
  0 siblings, 2 replies; 43+ messages in thread
From: Bastien Nocera @ 2010-01-20 18:23 UTC (permalink / raw)
  To: linux-kernel, pjones

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



^ permalink raw reply related	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2010-05-12 17:57 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12  0:11 [PATCH] Disable i8042 checks on Intel Apple Macs Bastien Nocera
2010-05-12 10:51 ` Felipe Contreras
2010-05-12 11:00   ` Felipe Contreras
2010-05-12 17:51   ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2010-05-04 17:36 Bastien Nocera
2010-05-04 17:55 ` Pekka Enberg
2010-05-04 18:02 ` Dmitry Torokhov
2010-05-05  9:18   ` Bastien Nocera
2010-05-05 21:27 ` Kyle McMartin
2010-01-20 18:23 Bastien Nocera
2010-01-20 19:14 ` Justin P. Mattock
2010-01-20 19:37   ` Bastien Nocera
2010-01-20 19:54     ` Justin P. Mattock
2010-01-21  0:41 ` Robert Hancock
2010-01-21  1:31   ` Bastien Nocera
2010-01-21  2:19     ` Robert Hancock
2010-01-21 18:55   ` Dmitry Torokhov
2010-01-21 21:39     ` Robert Hancock
2010-01-21 21:42       ` Bastien Nocera
2010-01-21 21:49       ` Justin P. Mattock
2010-01-22  0:29         ` Robert Hancock
2010-01-22  1:20           ` Justin P. Mattock
2010-01-22  2:09             ` Bastien Nocera
2010-01-22  2:30               ` Robert Hancock
2010-01-22  2:53                 ` Bastien Nocera
2010-01-22  2:31               ` Justin P. Mattock
2010-01-21 22:17       ` Dmitry Torokhov
2010-01-22  0:26         ` Robert Hancock
2010-01-22 17:46           ` H. Peter Anvin
2010-01-22 18:15             ` Bastien Nocera
2010-01-22 22:33             ` Robert Hancock
2010-01-22 22:49               ` H. Peter Anvin
2010-01-25 16:34         ` Vojtech Pavlik
2010-01-25 21:32           ` H. Peter Anvin
2010-01-25 22:15             ` Dmitry Torokhov
2010-01-25 22:18               ` H. Peter Anvin
2010-01-25 22:30                 ` Dmitry Torokhov
2010-01-25 23:05                   ` H. Peter Anvin
2010-01-25 23:28                     ` Dmitry Torokhov
2010-01-25 23:31                       ` H. Peter Anvin
2010-05-04 17:06               ` Bastien Nocera
2010-05-04 17:23                 ` Dmitry Torokhov
2010-05-04 17:37                   ` Bastien Nocera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).