public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 9/13] 2.6.7-rc1-mm1, Port reboot related quirks to new DMI probing
       [not found] <1085745352794@donpac.ru>
@ 2004-05-28 11:55 ` Andrey Panin
  2004-05-28 11:55   ` [PATCH 10/13] 2.6.7-rc1-mm1, Port powernow-k7 driver " Andrey Panin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Panin @ 2004-05-28 11:55 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel



diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:08:50 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:09:08 2004
@@ -155,51 +155,6 @@ static void __init dmi_save_ident(struct
 		printk(KERN_ERR "dmi_save_ident: out of memory.\n");
 }
 
-/* 
- * Reboot options and system auto-detection code provided by
- * Dell Inc. so their systems "just work". :-)
- */
-
-/* 
- * Some machines require the "reboot=b"  commandline option, this quirk makes that automatic.
- */
-static __init int set_bios_reboot(struct dmi_system_id *d)
-{
-	extern int reboot_thru_bios;
-	if (reboot_thru_bios == 0)
-	{
-		reboot_thru_bios = 1;
-		printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
-	}
-	return 0;
-}
-
-/*
- * Some machines require the "reboot=s"  commandline option, this quirk makes that automatic.
- */
-static __init int set_smp_reboot(struct dmi_system_id *d)
-{
-#ifdef CONFIG_SMP
-	extern int reboot_smp;
-	if (reboot_smp == 0)
-	{
-		reboot_smp = 1;
-		printk(KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n", d->ident);
-	}
-#endif
-	return 0;
-}
-
-/*
- * Some machines require the "reboot=b,s"  commandline option, this quirk makes that automatic.
- */
-static __init int set_smp_bios_reboot(struct dmi_system_id *d)
-{
-	set_smp_reboot(d);
-	set_bios_reboot(d);
-	return 0;
-}
-
 /*
  * Some machines, usually laptops, can't handle an enabled local APIC.
  * The symptoms include hangs or reboots when suspending or resuming,
@@ -316,19 +271,7 @@ static __init int disable_acpi_pci(struc
  */
  
 static __initdata struct dmi_system_id dmi_blacklist[]={
-	{ set_smp_bios_reboot, "Dell PowerEdge 1300", {	/* Handle problems with rebooting on Dell 1300's */
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
-			} },
-	{ set_bios_reboot, "Dell PowerEdge 300", {	/* Handle problems with rebooting on Dell 300's */
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
-			} },
-	{ set_bios_reboot, "Dell PowerEdge 2400", {  /* Handle problems with rebooting on Dell 2400's */
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
-			} },
-			
+
 	/* Machines which have problems handling enabled local APICs */
 
 	{ local_apic_kills_bios, "Dell Inspiron", {
diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/reboot.c linux-2.6.7-rc1-mm1/arch/i386/kernel/reboot.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/reboot.c	Wed Apr 28 22:56:07 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/reboot.c	Thu Apr 29 00:09:08 2004
@@ -9,6 +9,7 @@
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
 #include <linux/efi.h>
+#include <linux/dmi.h>
 #include <asm/uaccess.h>
 #include <asm/apic.h>
 #include "mach_reboot.h"
@@ -66,6 +67,83 @@ static int __init reboot_setup(char *str
 }
 
 __setup("reboot=", reboot_setup);
+
+/* 
+ * Reboot options and system auto-detection code provided by
+ * Dell Inc. so their systems "just work". :-)
+ */
+
+/* 
+ * Some machines require the "reboot=b"  commandline option, this quirk makes that automatic.
+ */
+static int __init set_bios_reboot(struct dmi_system_id *d)
+{
+	if (!reboot_thru_bios) {
+		reboot_thru_bios = 1;
+		printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
+	}
+	return 0;
+}
+
+/*
+ * Some machines require the "reboot=s"  commandline option, this quirk makes that automatic.
+ */
+static int __init set_smp_reboot(struct dmi_system_id *d)
+{
+#ifdef CONFIG_SMP
+	if (!reboot_smp) {
+		reboot_smp = 1;
+		printk(KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n", d->ident);
+	}
+#endif
+	return 0;
+}
+
+/*
+ * Some machines require the "reboot=b,s"  commandline option, this quirk makes that automatic.
+ */
+static int __init set_smp_bios_reboot(struct dmi_system_id *d)
+{
+	set_smp_reboot(d);
+	set_bios_reboot(d);
+	return 0;
+}
+
+static struct dmi_system_id __initdata reboot_dmi_table[] = {
+	{	/* Handle problems with rebooting on Dell 1300's */
+		.callback = set_smp_bios_reboot,
+		.ident = "Dell PowerEdge 1300",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
+		},
+	},
+	{	/* Handle problems with rebooting on Dell 300's */
+		.callback = set_bios_reboot,
+		.ident = "Dell PowerEdge 300",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
+		},
+	},
+	{	/* Handle problems with rebooting on Dell 2400's */
+		.callback = set_bios_reboot,
+		.ident = "Dell PowerEdge 2400",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
+		},
+	},
+	{ }
+};
+
+static int reboot_init(void)
+{
+	dmi_check_system(reboot_dmi_table);
+	return 0;
+}
+
+core_initcall(reboot_init);
 
 /* The following code and data reboots the machine by switching to real
    mode and jumping to the BIOS reset entry point, as if the CPU has


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

* [PATCH 10/13] 2.6.7-rc1-mm1, Port powernow-k7 driver to new DMI probing
  2004-05-28 11:55 ` [PATCH 9/13] 2.6.7-rc1-mm1, Port reboot related quirks to new DMI probing Andrey Panin
@ 2004-05-28 11:55   ` Andrey Panin
  2004-05-28 11:56     ` [PATCH 11/13] 2.6.7-rc1-mm1, Port local APIC quirks " Andrey Panin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Panin @ 2004-05-28 11:55 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel



diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/cpu/cpufreq/powernow-k7.c linux-2.6.7-rc1-mm1/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	Wed Apr 28 22:56:07 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	Thu Apr 29 00:10:40 2004
@@ -22,6 +22,7 @@
 #include <linux/cpufreq.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/dmi.h>
 
 #include <asm/msr.h>
 #include <asm/timex.h>
@@ -554,6 +555,31 @@ static unsigned int powernow_get(unsigne
 }
 
 
+static int __init acer_cpufreq_pst(struct dmi_system_id *d)
+{
+	printk(KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n", d->ident);
+	printk(KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
+	printk(KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n");
+	return 0;
+}
+
+/*
+ * Some Athlon laptops have really fucked PST tables.
+ * A BIOS update is all that can save them.
+ * Mention this, and disable cpufreq.
+ */
+static struct dmi_system_id __initdata powernow_dmi_table[] = {
+	{
+		.callback = acer_cpufreq_pst,
+		.ident = "Acer Aspire",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Insyde Software"),
+			DMI_MATCH(DMI_BIOS_VERSION, "3A71"),
+		},
+	},
+	{ }
+};
+
 static int __init powernow_cpu_init (struct cpufreq_policy *policy)
 {
 	union msr_fidvidstatus fidvidstatus;
@@ -572,7 +598,7 @@ static int __init powernow_cpu_init (str
 	}
 	dprintk(KERN_INFO PFX "FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000);
 
-	if ((dmi_broken & BROKEN_CPUFREQ) || powernow_acpi_force) {
+	if (dmi_check_system(powernow_dmi_table) || powernow_acpi_force) {
 		printk (KERN_INFO PFX "PSB/PST known to be broken.  Trying ACPI instead\n");
 		result = powernow_acpi_init();
 	} else {
diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:10:34 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:10:40 2004
@@ -235,16 +235,6 @@ static __init int reset_videomode_after_
 #endif
 
 
-static __init int acer_cpufreq_pst(struct dmi_system_id *d)
-{
-	printk(KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n", d->ident);
-	printk(KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
-	printk(KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n");
-	dmi_broken |= BROKEN_CPUFREQ;
-	return 0;
-}
-
-
 #ifdef	CONFIG_ACPI_PCI
 static __init int disable_acpi_irq(struct dmi_system_id *d) 
 { 
@@ -310,16 +300,6 @@ static __initdata struct dmi_system_id d
 			DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
 			} },
 #endif
-
-	/*
-	 * Some Athlon laptops have really fucked PST tables.
-	 * A BIOS update is all that can save them.
-	 * Mention this, and disable cpufreq.
-	 */
-	{ acer_cpufreq_pst, "Acer Aspire", {
-			DMI_MATCH(DMI_SYS_VENDOR, "Insyde Software"),
-			DMI_MATCH(DMI_BIOS_VERSION, "3A71"),
-			} },
 
 #ifdef CONFIG_SERIO_I8042
 	{ set_8042_nomux, "Compaq Proliant 8500", {


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

* [PATCH 11/13] 2.6.7-rc1-mm1, Port local APIC quirks to new DMI probing
  2004-05-28 11:55   ` [PATCH 10/13] 2.6.7-rc1-mm1, Port powernow-k7 driver " Andrey Panin
@ 2004-05-28 11:56     ` Andrey Panin
  2004-05-28 11:56       ` [PATCH 12/13] 2.6.7-rc1-mm1, Port ACPI sleep quirk " Andrey Panin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Panin @ 2004-05-28 11:56 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel



diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/apic.c linux-2.6.7-rc1-mm1/arch/i386/kernel/apic.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/apic.c	Wed Apr 28 22:56:08 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/apic.c	Thu Apr 29 00:13:49 2004
@@ -26,6 +26,7 @@
 #include <linux/mc146818rtc.h>
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
+#include <linux/dmi.h>
 
 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -624,11 +625,66 @@ static int __init lapic_enable(char *str
 }
 __setup("lapic", lapic_enable);
 
+/*
+ * Some machines, usually laptops, can't handle an enabled local APIC.
+ * The symptoms include hangs or reboots when suspending or resuming,
+ * attaching or detaching the power cord, or entering BIOS setup screens
+ * through magic key sequences.
+ */
+static int __init local_apic_kills_bios(struct dmi_system_id *d)
+{
+	if (enable_local_apic == 0) {
+		enable_local_apic = -1;
+		printk(KERN_WARNING "%s with broken BIOS detected. "
+		       "Refusing to enable the local APIC.\n",
+		       d->ident);
+	}
+	return 0;
+}
+
+static struct dmi_system_id __initdata apic_dmi_table[] = {
+	{
+		.callback = local_apic_kills_bios,
+		.ident = "Dell Inspiron",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron"),
+		},
+	},
+	{
+		.callback = local_apic_kills_bios,
+		.ident = "Dell Latitude",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
+		},
+	},
+	{
+		.callback = local_apic_kills_bios,
+		.ident = "IBM Thinkpad T20",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+			DMI_MATCH(DMI_BOARD_NAME, "264741U"),
+		},
+	},
+	{
+		.callback = local_apic_kills_bios, 
+		.ident = "ASUS L3C",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+			DMI_MATCH(DMI_BOARD_NAME, "P4_L3C"),
+		},
+	},
+	{ }
+};
+
 static int __init detect_init_APIC (void)
 {
 	u32 h, l, features;
 	extern void get_cpu_vendor(struct cpuinfo_x86*);
 
+	dmi_check_system(apic_dmi_table);
+
 	/* Disabled by DMI scan or kernel option? */
 	if (enable_local_apic < 0)
 		return -1;
@@ -1159,6 +1215,8 @@ asmlinkage void smp_error_interrupt(void
  */
 int __init APIC_init_uniprocessor (void)
 {
+	dmi_check_system(apic_dmi_table);
+
 	if (enable_local_apic < 0)
 		clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
 
diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:13:36 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:14:26 2004
@@ -156,26 +156,6 @@ static void __init dmi_save_ident(struct
 }
 
 /*
- * Some machines, usually laptops, can't handle an enabled local APIC.
- * The symptoms include hangs or reboots when suspending or resuming,
- * attaching or detaching the power cord, or entering BIOS setup screens
- * through magic key sequences.
- */
-static int __init local_apic_kills_bios(struct dmi_system_id *d)
-{
-#ifdef CONFIG_X86_LOCAL_APIC
-	extern int enable_local_apic;
-	if (enable_local_apic == 0) {
-		enable_local_apic = -1;
-		printk(KERN_WARNING "%s with broken BIOS detected. "
-		       "Refusing to enable the local APIC.\n",
-		       d->ident);
-	}
-#endif
-	return 0;
-}
-
-/*
  * HP Proliant 8500 systems can't use i8042 in mux mode,
  * or they instantly reboot.
  */
@@ -261,28 +241,6 @@ static __init int disable_acpi_pci(struc
  */
  
 static __initdata struct dmi_system_id dmi_blacklist[]={
-
-	/* Machines which have problems handling enabled local APICs */
-
-	{ local_apic_kills_bios, "Dell Inspiron", {
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron"),
-			} },
-
-	{ local_apic_kills_bios, "Dell Latitude", {
-			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
-			} },
-
-	{ local_apic_kills_bios, "IBM Thinkpad T20", {
-			DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
-			DMI_MATCH(DMI_BOARD_NAME, "264741U"),
-			} },
-
-	{ local_apic_kills_bios, "ASUS L3C", {
-			DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-			DMI_MATCH(DMI_BOARD_NAME, "P4_L3C"),
-			} },
 
 	{ broken_acpi_Sx, "ASUS K7V-RM", {		/* Bad ACPI Sx table */
 			DMI_MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),


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

* [PATCH 12/13] 2.6.7-rc1-mm1, Port ACPI sleep quirk to new DMI probing
  2004-05-28 11:56     ` [PATCH 11/13] 2.6.7-rc1-mm1, Port local APIC quirks " Andrey Panin
@ 2004-05-28 11:56       ` Andrey Panin
  2004-05-28 11:56         ` [PATCH 13/13] 2.6.7-rc1-mm1, Port i8042 " Andrey Panin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Panin @ 2004-05-28 11:56 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel



diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:15:56 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:16:13 2004
@@ -193,17 +193,6 @@ static __init int broken_toshiba_keyboar
 	return 0;
 }
 
-/*
- * Toshiba fails to preserve interrupts over S1
- */
-
-static __init int init_ints_after_s1(struct dmi_system_id *d)
-{
-	printk(KERN_WARNING "Toshiba with broken S1 detected.\n");
-	dmi_broken |= BROKEN_INIT_AFTER_S1;
-	return 0;
-}
-
 #ifdef CONFIG_ACPI_SLEEP
 static __init int reset_videomode_after_s3(struct dmi_system_id *d)
 {
@@ -248,9 +237,6 @@ static __initdata struct dmi_system_id d
 			} },
 
 	{ broken_toshiba_keyboard, "Toshiba Satellite 4030cdt", { /* Keyboard generates spurious repeats */
-			DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
-			} },
-	{ init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */
 			DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
 			} },
 #ifdef CONFIG_ACPI_SLEEP
diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/drivers/acpi/sleep/main.c linux-2.6.7-rc1-mm1/drivers/acpi/sleep/main.c
--- linux-2.6.7-rc1-mm1.vanilla/drivers/acpi/sleep/main.c	Wed Apr 28 22:55:43 2004
+++ linux-2.6.7-rc1-mm1/drivers/acpi/sleep/main.c	Thu Apr 29 00:16:13 2004
@@ -10,6 +10,7 @@
 
 #include <linux/delay.h>
 #include <linux/irq.h>
+#include <linux/dmi.h>
 #include <linux/device.h>
 #include <linux/suspend.h>
 #include <acpi/acpi_bus.h>
@@ -30,6 +31,8 @@ static u32 acpi_suspend_states[] = {
 	[PM_SUSPEND_DISK]	= ACPI_STATE_S4,
 };
 
+static int init_8259A_after_S1;
+
 /**
  *	acpi_pm_prepare - Do preliminary suspend work.
  *	@state:		suspend state we're entering.
@@ -138,7 +141,7 @@ static int acpi_pm_finish(u32 state)
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);
 
-	if (dmi_broken & BROKEN_INIT_AFTER_S1) {
+	if (init_8259A_after_S1) {
 		printk("Broken toshiba laptop -> kicking interrupts\n");
 		init_8259A(0);
 	}
@@ -159,16 +162,38 @@ int acpi_suspend(u32 acpi_state)
 	return -EINVAL;
 }
 
-
 static struct pm_ops acpi_pm_ops = {
 	.prepare	= acpi_pm_prepare,
 	.enter		= acpi_pm_enter,
 	.finish		= acpi_pm_finish,
 };
 
+
+/*
+ * Toshiba fails to preserve interrupts over S1, reinitialization 
+ * of 8259 is needed after S1 resume.
+ */
+static int __init init_ints_after_s1(struct dmi_system_id *d)
+{
+	printk(KERN_WARNING "%s with broken S1 detected.\n", d->ident);
+	init_8259A_after_S1 = 1;
+	return 0;
+}
+
+static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
+	{	
+		.callback = init_ints_after_s1,
+		.ident = "Toshiba Satellite 4030cdt",
+		.matches = { DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), },
+	},
+	{ },
+};
+
 static int __init acpi_sleep_init(void)
 {
 	int			i = 0;
+
+	dmi_check_system(acpisleep_dmi_table);
 
 	if (acpi_disabled)
 		return 0;


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

* [PATCH 13/13] 2.6.7-rc1-mm1, Port i8042 quirk to new DMI probing
  2004-05-28 11:56       ` [PATCH 12/13] 2.6.7-rc1-mm1, Port ACPI sleep quirk " Andrey Panin
@ 2004-05-28 11:56         ` Andrey Panin
  0 siblings, 0 replies; 5+ messages in thread
From: Andrey Panin @ 2004-05-28 11:56 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel



diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:18:14 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c	Thu Apr 29 00:26:56 2004
@@ -155,22 +155,6 @@ static void __init dmi_save_ident(struct
 		printk(KERN_ERR "dmi_save_ident: out of memory.\n");
 }
 
-/*
- * HP Proliant 8500 systems can't use i8042 in mux mode,
- * or they instantly reboot.
- */
-#ifdef CONFIG_SERIO_I8042
-extern unsigned int i8042_nomux;
-static __init int set_8042_nomux(struct dmi_system_id *d)
-{
-	if (i8042_nomux == 0)
-	{
-		i8042_nomux = 1;
-		printk(KERN_INFO "Disabling i8042 mux mode\n");
-	}
-	return 0;
-}
-#endif
 
 /*
  * ASUS K7V-RM has broken ACPI table defining sleep modes
@@ -243,14 +227,6 @@ static __initdata struct dmi_system_id d
 	{ reset_videomode_after_s3, "Toshiba Satellite 4030cdt", { /* Reset video mode after returning from ACPI S3 sleep */
 			DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
 			} },
-#endif
-
-#ifdef CONFIG_SERIO_I8042
-	{ set_8042_nomux, "Compaq Proliant 8500", {
-			DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
-			DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
-			DMI_MATCH(DMI_PRODUCT_VERSION, "8500"),
-			}},
 #endif
 
 #ifdef	CONFIG_ACPI_PCI
diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/drivers/input/serio/i8042.c linux-2.6.7-rc1-mm1/drivers/input/serio/i8042.c
--- linux-2.6.7-rc1-mm1.vanilla/drivers/input/serio/i8042.c	Wed Apr 28 22:55:59 2004
+++ linux-2.6.7-rc1-mm1/drivers/input/serio/i8042.c	Thu Apr 29 00:29:19 2004
@@ -21,6 +21,7 @@
 #include <linux/sysdev.h>
 #include <linux/pm.h>
 #include <linux/serio.h>
+#include <linux/dmi.h>
 
 #include <asm/io.h>
 
@@ -32,7 +33,7 @@ static unsigned int i8042_noaux;
 module_param_named(noaux, i8042_noaux, bool, 0);
 MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
 
-unsigned int i8042_nomux;
+static unsigned int i8042_nomux;
 module_param_named(nomux, i8042_nomux, bool, 0);
 MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing conrtoller is present.");
 
@@ -943,11 +944,39 @@ static void __init i8042_init_mux_values
 	values->mux = index;
 }
 
+/*
+ * HP Proliant 8500 systems can't use i8042 in mux mode,
+ * or they instantly reboot.
+ */
+static int __init set_8042_nomux(struct dmi_system_id *d)
+{
+	if (!i8042_nomux) {
+		i8042_nomux = 1;
+		printk(KERN_INFO "Disabling i8042 mux mode\n");
+	}
+	return 0;
+}
+
+static struct dmi_system_id __initdata i8042_dmi_table[] = {
+	{ 
+		.callback = set_8042_nomux,
+		.ident = "Compaq Proliant 8500",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+			DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "8500"),
+		},
+	},
+	{ },
+};
+
 int __init i8042_init(void)
 {
 	int i;
 
 	dbg_init();
+
+	dmi_check_system(i8042_dmi_table);
 
 	init_timer(&i8042_timer);
 	i8042_timer.function = i8042_timer_func;


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

end of thread, other threads:[~2004-05-28 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1085745352794@donpac.ru>
2004-05-28 11:55 ` [PATCH 9/13] 2.6.7-rc1-mm1, Port reboot related quirks to new DMI probing Andrey Panin
2004-05-28 11:55   ` [PATCH 10/13] 2.6.7-rc1-mm1, Port powernow-k7 driver " Andrey Panin
2004-05-28 11:56     ` [PATCH 11/13] 2.6.7-rc1-mm1, Port local APIC quirks " Andrey Panin
2004-05-28 11:56       ` [PATCH 12/13] 2.6.7-rc1-mm1, Port ACPI sleep quirk " Andrey Panin
2004-05-28 11:56         ` [PATCH 13/13] 2.6.7-rc1-mm1, Port i8042 " Andrey Panin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox