* [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data
@ 2004-05-07 8:33 Andrey Panin
2004-05-07 8:33 ` [PATCH 1/8] 2.6.3-rc3-mm1, Export DMI probe function Andrey Panin
2004-05-07 22:00 ` [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data Andrew Morton
0 siblings, 2 replies; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 09:45:23.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 09:49:49.000000000 +0400
@@ -142,6 +142,7 @@ static int __init dmi_iterate(void (*dec
enum
{
+ DMI_NONE,
DMI_BIOS_VENDOR,
DMI_BIOS_VERSION,
DMI_BIOS_DATE,
@@ -185,8 +186,6 @@ struct dmi_strmatch
char *substr;
};
-#define NONE 255
-
struct dmi_blacklist
{
int (*callback)(struct dmi_blacklist *);
@@ -194,7 +193,6 @@ struct dmi_blacklist
struct dmi_strmatch matches[4];
};
-#define NO_MATCH { NONE, NULL}
#define MATCH(a,b) { a, b }
/*
@@ -589,12 +587,10 @@ static __initdata struct dmi_blacklist d
{ broken_ps2_resume, "Dell Latitude C600", { /* Handle problems with APM on the C600 */
MATCH(DMI_SYS_VENDOR, "Dell"),
MATCH(DMI_PRODUCT_NAME, "Latitude C600"),
- NO_MATCH, NO_MATCH
} },
{ set_apm_ints, "Dell Latitude", { /* Allow interrupts during suspend on Dell Latitude laptops*/
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "Latitude C510"),
- NO_MATCH, NO_MATCH
} },
{ apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
@@ -605,17 +601,16 @@ static __initdata struct dmi_blacklist d
{ set_apm_ints, "Dell Inspiron", { /* Allow interrupts during suspend on Dell Inspiron laptops*/
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"),
- NO_MATCH, NO_MATCH
} },
{ broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "A04"),
- MATCH(DMI_BIOS_DATE, "08/24/2000"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "08/24/2000"),
} },
{ broken_apm_power, "Dell Inspiron 2500", { /* Handle problems with APM on Inspiron 2500 */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "A12"),
- MATCH(DMI_BIOS_DATE, "02/04/2002"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "02/04/2002"),
} },
{ apm_is_horked, "Dell Dimension 4100", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
@@ -626,22 +621,19 @@ static __initdata struct dmi_blacklist d
{ set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
- MATCH(DMI_BIOS_DATE, "134526184"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "134526184"),
} },
{ set_smp_bios_reboot, "Dell PowerEdge 1300", { /* Handle problems with rebooting on Dell 1300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
- NO_MATCH, NO_MATCH
} },
{ set_bios_reboot, "Dell PowerEdge 300", { /* Handle problems with rebooting on Dell 300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
- NO_MATCH, NO_MATCH
} },
{ set_bios_reboot, "Dell PowerEdge 2400", { /* Handle problems with rebooting on Dell 2400's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
- NO_MATCH, NO_MATCH
} },
{ set_apm_ints, "Compaq 12XL125", { /* Allow interrupts during suspend on Compaq Laptops*/
MATCH(DMI_SYS_VENDOR, "Compaq"),
@@ -652,38 +644,31 @@ static __initdata struct dmi_blacklist d
{ set_apm_ints, "ASUSTeK", { /* Allow interrupts during APM or the clock goes slow */
MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
- NO_MATCH, NO_MATCH
} },
{ apm_is_horked, "ABIT KX7-333[R]", { /* APM blows on shutdown */
MATCH(DMI_BOARD_VENDOR, "ABIT"),
MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"),
- NO_MATCH, NO_MATCH,
} },
{ apm_is_horked, "Trigem Delhi3", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
MATCH(DMI_PRODUCT_NAME, "Delhi3"),
- NO_MATCH, NO_MATCH,
} },
{ apm_is_horked, "Fujitsu-Siemens", { /* APM crashes */
MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
MATCH(DMI_BIOS_VERSION, "Version1.01"),
- NO_MATCH, NO_MATCH,
} },
{ apm_is_horked_d850md, "Intel D850MD", { /* APM crashes */
MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"),
- NO_MATCH, NO_MATCH,
} },
{ apm_is_horked, "Intel D810EMO", { /* APM crashes */
MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"),
- NO_MATCH, NO_MATCH,
} },
{ apm_is_horked, "Dell XPS-Z", { /* APM crashes */
MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
MATCH(DMI_BIOS_VERSION, "A11"),
MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
- NO_MATCH,
} },
{ apm_is_horked, "Sharp PC-PJ/AX", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "SHARP"),
@@ -700,94 +685,91 @@ static __initdata struct dmi_blacklist d
{ apm_likes_to_melt, "Jabil AMD", { /* APM idle hangs */
MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
MATCH(DMI_BIOS_VERSION, "0AASNP06"),
- NO_MATCH, NO_MATCH,
} },
{ apm_likes_to_melt, "AMI Bios", { /* APM idle hangs */
MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
MATCH(DMI_BIOS_VERSION, "0AASNP05"),
- NO_MATCH, NO_MATCH,
} },
{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
MATCH(DMI_PRODUCT_NAME, "PCG-"),
- NO_MATCH, NO_MATCH,
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0206H"),
- MATCH(DMI_BIOS_DATE, "08/23/99"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "08/23/99"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505VX */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "W2K06H0"),
- MATCH(DMI_BIOS_DATE, "02/03/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "02/03/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-XG29 */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0117A0"),
- MATCH(DMI_BIOS_DATE, "04/25/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "04/25/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0121Z1"),
- MATCH(DMI_BIOS_DATE, "05/11/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "05/11/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "WME01Z1"),
- MATCH(DMI_BIOS_DATE, "08/11/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "08/11/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0206Z3"),
- MATCH(DMI_BIOS_DATE, "12/25/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "12/25/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0203D0"),
- MATCH(DMI_BIOS_DATE, "05/12/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "05/12/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0203Z3"),
- MATCH(DMI_BIOS_DATE, "08/25/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "08/25/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0209Z3"),
- MATCH(DMI_BIOS_DATE, "05/12/01"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "05/12/01"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-F104K */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0204K2"),
- MATCH(DMI_BIOS_DATE, "08/28/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "08/28/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0208P1"),
- MATCH(DMI_BIOS_DATE, "11/09/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "11/09/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0204P1"),
- MATCH(DMI_BIOS_DATE, "09/12/00"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "09/12/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
- MATCH(DMI_BIOS_DATE, "10/26/01"), NO_MATCH
+ MATCH(DMI_BIOS_DATE, "10/26/01"),
} },
{ exploding_pnp_bios, "Higraded P14H", { /* PnPBIOS GPF on boot */
@@ -806,52 +788,43 @@ static __initdata struct dmi_blacklist d
{ local_apic_kills_bios, "Dell Inspiron", {
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "Inspiron"),
- NO_MATCH, NO_MATCH
} },
{ local_apic_kills_bios, "Dell Latitude", {
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "Latitude"),
- NO_MATCH, NO_MATCH
} },
{ local_apic_kills_bios, "IBM Thinkpad T20", {
MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_BOARD_NAME, "264741U"),
- NO_MATCH, NO_MATCH
} },
{ local_apic_kills_bios, "ASUS L3C", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
MATCH(DMI_BOARD_NAME, "P4_L3C"),
- NO_MATCH, NO_MATCH
} },
{ broken_acpi_Sx, "ASUS K7V-RM", { /* Bad ACPI Sx table */
MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
MATCH(DMI_BOARD_NAME, "<K7V-RM>"),
- NO_MATCH, NO_MATCH
} },
{ broken_toshiba_keyboard, "Toshiba Satellite 4030cdt", { /* Keyboard generates spurious repeats */
MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
- NO_MATCH, NO_MATCH, NO_MATCH
} },
{ init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */
MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
- NO_MATCH, NO_MATCH, NO_MATCH
} },
#ifdef CONFIG_ACPI_SLEEP
{ reset_videomode_after_s3, "Toshiba Satellite 4030cdt", { /* Reset video mode after returning from ACPI S3 sleep */
MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
- NO_MATCH, NO_MATCH, NO_MATCH
} },
#endif
{ print_if_true, KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", {
MATCH(DMI_SYS_VENDOR, "IBM"),
MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
- NO_MATCH, NO_MATCH
} },
{ fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
@@ -864,7 +837,6 @@ static __initdata struct dmi_blacklist d
{ fix_acer_tm360_irqrouting, "Acer TravelMate 36x Laptop", {
MATCH(DMI_SYS_VENDOR, "Acer"),
MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
- NO_MATCH, NO_MATCH
} },
@@ -875,7 +847,6 @@ static __initdata struct dmi_blacklist d
{ set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
MATCH(DMI_SYS_VENDOR, "IBM"),
- NO_MATCH, NO_MATCH, NO_MATCH
} },
/*
@@ -884,7 +855,6 @@ static __initdata struct dmi_blacklist d
{ disable_smbus, "IBM", {
MATCH(DMI_SYS_VENDOR, "IBM"),
- NO_MATCH, NO_MATCH, NO_MATCH
} },
/*
@@ -895,7 +865,6 @@ static __initdata struct dmi_blacklist d
{ acer_cpufreq_pst, "Acer Aspire", {
MATCH(DMI_SYS_VENDOR, "Insyde Software"),
MATCH(DMI_BIOS_VERSION, "3A71"),
- NO_MATCH, NO_MATCH,
} },
#ifdef CONFIG_ACPI_BOOT
@@ -911,7 +880,7 @@ static __initdata struct dmi_blacklist d
{ dmi_disable_acpi, "IBM Thinkpad", {
MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_BOARD_NAME, "2629H1G"),
- NO_MATCH, NO_MATCH }},
+ } },
/*
* Boxes that need acpi=ht
@@ -920,77 +889,77 @@ static __initdata struct dmi_blacklist d
{ force_acpi_ht, "FSC Primergy T850", {
MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "DELL GX240", {
MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "HP VISUALIZE NT Workstation", {
MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "Compaq ProLiant DL380 G2", {
MATCH(DMI_SYS_VENDOR, "Compaq"),
MATCH(DMI_PRODUCT_NAME, "ProLiant DL380 G2"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "Compaq ProLiant ML530 G2", {
MATCH(DMI_SYS_VENDOR, "Compaq"),
MATCH(DMI_PRODUCT_NAME, "ProLiant ML530 G2"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "Compaq ProLiant ML350 G3", {
MATCH(DMI_SYS_VENDOR, "Compaq"),
MATCH(DMI_PRODUCT_NAME, "ProLiant ML350 G3"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "Compaq Workstation W8000", {
MATCH(DMI_SYS_VENDOR, "Compaq"),
MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "ASUS P4B266", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
MATCH(DMI_BOARD_NAME, "P4B266"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "ASUS P2B-DS", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
MATCH(DMI_BOARD_NAME, "P2B-DS"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "ASUS CUR-DLS", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
MATCH(DMI_BOARD_NAME, "CUR-DLS"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "ABIT i440BX-W83977", {
MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "IBM Bladecenter", {
MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "IBM eServer xSeries 360", {
MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "IBM eserver xSeries 330", {
MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
- NO_MATCH, NO_MATCH }},
+ }},
{ force_acpi_ht, "IBM eserver xSeries 440", {
MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
- NO_MATCH, NO_MATCH }},
+ }},
/*
* Systems with nForce2 BIOS timer override bug
@@ -1046,7 +1015,7 @@ static __initdata struct dmi_blacklist d
MATCH(DMI_BOARD_NAME, "<A7V>"),
/* newer BIOS, Revision 1011, does work */
MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
- NO_MATCH }},
+ }},
/*
* Boxes that need ACPI PCI IRQ routing and PCI scan disabled
@@ -1059,7 +1028,6 @@ static __initdata struct dmi_blacklist d
{ disable_acpi_pci, "Acer TravelMate 36x Laptop", {
MATCH(DMI_SYS_VENDOR, "Acer"),
MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
- NO_MATCH, NO_MATCH
} },
#endif
@@ -1106,7 +1074,7 @@ static __init void dmi_check_blacklist(v
for(i=0;i<4;i++)
{
int s = d->matches[i].slot;
- if(s==NONE)
+ if(s==DMI_NONE)
continue;
if(dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
continue;
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/8] 2.6.3-rc3-mm1, Export DMI probe function
2004-05-07 8:33 [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 2/8] 2.6.3-rc3-mm1, Whitespace cleanups Andrey Panin
2004-05-07 22:00 ` [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data Andrew Morton
1 sibling, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 10:03:36.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 10:10:10.000000000 +0400
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <linux/pm.h>
#include <asm/system.h>
+#include <linux/dmi.h>
#include <linux/bootmem.h>
unsigned long dmi_broken;
@@ -139,22 +140,6 @@ static int __init dmi_iterate(void (*dec
return -1;
}
-
-enum
-{
- DMI_NONE,
- DMI_BIOS_VENDOR,
- DMI_BIOS_VERSION,
- DMI_BIOS_DATE,
- DMI_SYS_VENDOR,
- DMI_PRODUCT_NAME,
- DMI_PRODUCT_VERSION,
- DMI_BOARD_VENDOR,
- DMI_BOARD_NAME,
- DMI_BOARD_VERSION,
- DMI_STRING_MAX
-};
-
static char *dmi_ident[DMI_STRING_MAX];
/*
@@ -176,25 +161,6 @@ static void __init dmi_save_ident(struct
printk(KERN_ERR "dmi_save_ident: out of memory.\n");
}
-/*
- * DMI callbacks for problem boards
- */
-
-struct dmi_strmatch
-{
- u8 slot;
- char *substr;
-};
-
-struct dmi_blacklist
-{
- int (*callback)(struct dmi_blacklist *);
- char *ident;
- struct dmi_strmatch matches[4];
-};
-
-#define MATCH(a,b) { a, b }
-
/*
* Reboot options and system auto-detection code provided by
* Dell Inc. so their systems "just work". :-)
@@ -203,7 +169,7 @@ struct dmi_blacklist
/*
* Some machines require the "reboot=b" commandline option, this quirk makes that automatic.
*/
-static __init int set_bios_reboot(struct dmi_blacklist *d)
+static __init int set_bios_reboot(struct dmi_system_id *d)
{
extern int reboot_thru_bios;
if (reboot_thru_bios == 0)
@@ -217,7 +183,7 @@ static __init int set_bios_reboot(struct
/*
* Some machines require the "reboot=s" commandline option, this quirk makes that automatic.
*/
-static __init int set_smp_reboot(struct dmi_blacklist *d)
+static __init int set_smp_reboot(struct dmi_system_id *d)
{
#ifdef CONFIG_SMP
extern int reboot_smp;
@@ -233,7 +199,7 @@ static __init int set_smp_reboot(struct
/*
* Some machines require the "reboot=b,s" commandline option, this quirk makes that automatic.
*/
-static __init int set_smp_bios_reboot(struct dmi_blacklist *d)
+static __init int set_smp_bios_reboot(struct dmi_system_id *d)
{
set_smp_reboot(d);
set_bios_reboot(d);
@@ -244,7 +210,7 @@ static __init int set_smp_bios_reboot(st
* Some bioses have a broken protected mode poweroff and need to use realmode
*/
-static __init int set_realmode_power_off(struct dmi_blacklist *d)
+static __init int set_realmode_power_off(struct dmi_system_id *d)
{
if (apm_info.realmode_power_off == 0)
{
@@ -259,7 +225,7 @@ static __init int set_realmode_power_off
* Some laptops require interrupts to be enabled during APM calls
*/
-static __init int set_apm_ints(struct dmi_blacklist *d)
+static __init int set_apm_ints(struct dmi_system_id *d)
{
if (apm_info.allow_ints == 0)
{
@@ -273,7 +239,7 @@ static __init int set_apm_ints(struct dm
* Some APM bioses corrupt memory or just plain do not work
*/
-static __init int apm_is_horked(struct dmi_blacklist *d)
+static __init int apm_is_horked(struct dmi_system_id *d)
{
if (apm_info.disabled == 0)
{
@@ -283,7 +249,7 @@ static __init int apm_is_horked(struct d
return 0;
}
-static __init int apm_is_horked_d850md(struct dmi_blacklist *d)
+static __init int apm_is_horked_d850md(struct dmi_system_id *d)
{
if (apm_info.disabled == 0) {
apm_info.disabled = 1;
@@ -298,7 +264,7 @@ static __init int apm_is_horked_d850md(s
* Some APM bioses hang on APM idle calls
*/
-static __init int apm_likes_to_melt(struct dmi_blacklist *d)
+static __init int apm_likes_to_melt(struct dmi_system_id *d)
{
if (apm_info.forbid_idle == 0) {
apm_info.forbid_idle = 1;
@@ -313,7 +279,7 @@ static __init int apm_likes_to_melt(stru
* attaching or detaching the power cord, or entering BIOS setup screens
* through magic key sequences.
*/
-static int __init local_apic_kills_bios(struct dmi_blacklist *d)
+static int __init local_apic_kills_bios(struct dmi_system_id *d)
{
#ifdef CONFIG_X86_LOCAL_APIC
extern int enable_local_apic;
@@ -331,7 +297,7 @@ static int __init local_apic_kills_bios(
* Don't access SMBus on IBM systems which get corrupted eeproms
*/
-static __init int disable_smbus(struct dmi_blacklist *d)
+static __init int disable_smbus(struct dmi_system_id *d)
{
if (is_unsafe_smbus == 0) {
is_unsafe_smbus = 1;
@@ -344,7 +310,7 @@ static __init int disable_smbus(struct d
* Work around broken HP Pavilion Notebooks which assign USB to
* IRQ 9 even though it is actually wired to IRQ 11
*/
-static __init int fix_broken_hp_bios_irq9(struct dmi_blacklist *d)
+static __init int fix_broken_hp_bios_irq9(struct dmi_system_id *d)
{
#ifdef CONFIG_PCI
extern int broken_hp_bios_irq9;
@@ -361,7 +327,7 @@ static __init int fix_broken_hp_bios_irq
* Work around broken Acer TravelMate 360 Notebooks which assign Cardbus to
* IRQ 11 even though it is actually wired to IRQ 10
*/
-static __init int fix_acer_tm360_irqrouting(struct dmi_blacklist *d)
+static __init int fix_acer_tm360_irqrouting(struct dmi_system_id *d)
{
#ifdef CONFIG_PCI
extern int acer_tm360_irqrouting;
@@ -389,7 +355,7 @@ static __init int fix_acer_tm360_irqrout
* Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
*/
-static __init int broken_apm_power(struct dmi_blacklist *d)
+static __init int broken_apm_power(struct dmi_system_id *d)
{
apm_info.get_power_status_broken = 1;
printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
@@ -404,7 +370,7 @@ static __init int broken_apm_power(struc
* We also want to avoid using certain functions of the PnP BIOS.
*/
-static __init int sony_vaio_laptop(struct dmi_blacklist *d)
+static __init int sony_vaio_laptop(struct dmi_system_id *d)
{
if (is_sony_vaio_laptop == 0)
{
@@ -419,7 +385,7 @@ static __init int sony_vaio_laptop(struc
* have this problem).
*/
-static __init int swab_apm_power_in_minutes(struct dmi_blacklist *d)
+static __init int swab_apm_power_in_minutes(struct dmi_system_id *d)
{
apm_info.get_power_status_swabinminutes = 1;
printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n");
@@ -430,7 +396,7 @@ static __init int swab_apm_power_in_minu
* ASUS K7V-RM has broken ACPI table defining sleep modes
*/
-static __init int broken_acpi_Sx(struct dmi_blacklist *d)
+static __init int broken_acpi_Sx(struct dmi_system_id *d)
{
printk(KERN_WARNING "Detected ASUS mainboard with broken ACPI sleep table\n");
dmi_broken |= BROKEN_ACPI_Sx;
@@ -441,7 +407,7 @@ static __init int broken_acpi_Sx(struct
* Toshiba keyboard likes to repeat keys when they are not repeated.
*/
-static __init int broken_toshiba_keyboard(struct dmi_blacklist *d)
+static __init int broken_toshiba_keyboard(struct dmi_system_id *d)
{
printk(KERN_WARNING "Toshiba with broken keyboard detected. If your keyboard sometimes generates 3 keypresses instead of one, see http://davyd.ucc.asn.au/projects/toshiba/README\n");
return 0;
@@ -451,7 +417,7 @@ static __init int broken_toshiba_keyboar
* Toshiba fails to preserve interrupts over S1
*/
-static __init int init_ints_after_s1(struct dmi_blacklist *d)
+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;
@@ -459,7 +425,7 @@ static __init int init_ints_after_s1(str
}
#ifdef CONFIG_ACPI_SLEEP
-static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
+static __init int reset_videomode_after_s3(struct dmi_system_id *d)
{
/* See acpi_wakeup.S */
extern long acpi_video_flags;
@@ -473,7 +439,7 @@ static __init int reset_videomode_after_
* disabled before the suspend. Linux used to get terribly confused by that.
*/
-static __init int broken_ps2_resume(struct dmi_blacklist *d)
+static __init int broken_ps2_resume(struct dmi_system_id *d)
{
printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident);
return 0;
@@ -484,14 +450,14 @@ static __init int broken_ps2_resume(stru
* some entries
*/
-static __init int exploding_pnp_bios(struct dmi_blacklist *d)
+static __init int exploding_pnp_bios(struct dmi_system_id *d)
{
printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
dmi_broken |= BROKEN_PNP_BIOS;
return 0;
}
-static __init int acer_cpufreq_pst(struct dmi_blacklist *d)
+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");
@@ -505,7 +471,7 @@ static __init int acer_cpufreq_pst(struc
* Simple "print if true" callback
*/
-static __init int print_if_true(struct dmi_blacklist *d)
+static __init int print_if_true(struct dmi_system_id *d)
{
printk("%s\n", d->ident);
return 0;
@@ -515,7 +481,7 @@ static __init int print_if_true(struct d
#ifdef CONFIG_ACPI_BOOT
extern int acpi_force;
-static __init __attribute__((unused)) int dmi_disable_acpi(struct dmi_blacklist *d)
+static __init __attribute__((unused)) int dmi_disable_acpi(struct dmi_system_id *d)
{
if (!acpi_force) {
printk(KERN_NOTICE "%s detected: acpi off\n",d->ident);
@@ -530,7 +496,7 @@ static __init __attribute__((unused)) in
/*
* Limit ACPI to CPU enumeration for HT
*/
-static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d)
+static __init __attribute__((unused)) int force_acpi_ht(struct dmi_system_id *d)
{
if (!acpi_force) {
printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", d->ident);
@@ -547,7 +513,7 @@ static __init __attribute__((unused)) in
* early nForce2 reference BIOS shipped with a
* bogus ACPI IRQ0 -> pin2 interrupt override -- ignore it
*/
-static __init int ignore_timer_override(struct dmi_blacklist *d)
+static __init int ignore_timer_override(struct dmi_system_id *d)
{
extern int acpi_skip_timer_override;
printk(KERN_NOTICE "%s detected: BIOS IRQ0 pin2 override"
@@ -559,13 +525,13 @@ static __init int ignore_timer_override(
#endif
#ifdef CONFIG_ACPI_PCI
-static __init int disable_acpi_irq(struct dmi_blacklist *d)
+static __init int disable_acpi_irq(struct dmi_system_id *d)
{
printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n", d->ident);
acpi_noirq_set();
return 0;
}
-static __init int disable_acpi_pci(struct dmi_blacklist *d)
+static __init int disable_acpi_pci(struct dmi_system_id *d)
{
printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident);
acpi_disable_pci();
@@ -583,260 +549,260 @@ static __init int disable_acpi_pci(struc
* interrupt mask settings according to the laptop
*/
-static __initdata struct dmi_blacklist dmi_blacklist[]={
+static __initdata struct dmi_system_id dmi_blacklist[]={
{ broken_ps2_resume, "Dell Latitude C600", { /* Handle problems with APM on the C600 */
- MATCH(DMI_SYS_VENDOR, "Dell"),
- MATCH(DMI_PRODUCT_NAME, "Latitude C600"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C600"),
} },
{ set_apm_ints, "Dell Latitude", { /* Allow interrupts during suspend on Dell Latitude laptops*/
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "Latitude C510"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C510"),
} },
{ apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
- MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION,"A11")
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION,"A11")
} },
{ set_apm_ints, "Dell Inspiron", { /* Allow interrupts during suspend on Dell Inspiron laptops*/
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"),
} },
{ broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "A04"),
- MATCH(DMI_BIOS_DATE, "08/24/2000"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "A04"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/24/2000"),
} },
{ broken_apm_power, "Dell Inspiron 2500", { /* Handle problems with APM on Inspiron 2500 */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "A12"),
- MATCH(DMI_BIOS_DATE, "02/04/2002"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "A12"),
+ DMI_MATCH(DMI_BIOS_DATE, "02/04/2002"),
} },
{ apm_is_horked, "Dell Dimension 4100", { /* APM crashes */
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
- MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
- MATCH(DMI_BIOS_VERSION,"A11")
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION,"A11")
} },
{ set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
- MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
- MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
- MATCH(DMI_BIOS_DATE, "134526184"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
+ DMI_MATCH(DMI_BIOS_DATE, "134526184"),
} },
{ set_smp_bios_reboot, "Dell PowerEdge 1300", { /* Handle problems with rebooting on Dell 1300's */
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
+ 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 */
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
+ 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 */
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
} },
{ set_apm_ints, "Compaq 12XL125", { /* Allow interrupts during suspend on Compaq Laptops*/
- MATCH(DMI_SYS_VENDOR, "Compaq"),
- MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION,"4.06")
+ DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION,"4.06")
} },
{ set_apm_ints, "ASUSTeK", { /* Allow interrupts during APM or the clock goes slow */
- MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
- MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
} },
{ apm_is_horked, "ABIT KX7-333[R]", { /* APM blows on shutdown */
- MATCH(DMI_BOARD_VENDOR, "ABIT"),
- MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ABIT"),
+ DMI_MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"),
} },
{ apm_is_horked, "Trigem Delhi3", { /* APM crashes */
- MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
- MATCH(DMI_PRODUCT_NAME, "Delhi3"),
+ DMI_MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Delhi3"),
} },
{ apm_is_horked, "Fujitsu-Siemens", { /* APM crashes */
- MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
- MATCH(DMI_BIOS_VERSION, "Version1.01"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_BIOS_VERSION, "Version1.01"),
} },
{ apm_is_horked_d850md, "Intel D850MD", { /* APM crashes */
- MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
- MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"),
} },
{ apm_is_horked, "Intel D810EMO", { /* APM crashes */
- MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
- MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"),
} },
{ apm_is_horked, "Dell XPS-Z", { /* APM crashes */
- MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
- MATCH(DMI_BIOS_VERSION, "A11"),
- MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION, "A11"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
} },
{ apm_is_horked, "Sharp PC-PJ/AX", { /* APM crashes */
- MATCH(DMI_SYS_VENDOR, "SHARP"),
- MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
- MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
- MATCH(DMI_BIOS_VERSION,"Version R2.08")
+ DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
+ DMI_MATCH(DMI_BIOS_VERSION,"Version R2.08")
} },
{ apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
- MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION,"A11")
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION,"A11")
} },
{ apm_likes_to_melt, "Jabil AMD", { /* APM idle hangs */
- MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- MATCH(DMI_BIOS_VERSION, "0AASNP06"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "0AASNP06"),
} },
{ apm_likes_to_melt, "AMI Bios", { /* APM idle hangs */
- MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- MATCH(DMI_BIOS_VERSION, "0AASNP05"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "0AASNP05"),
} },
{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
- MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
- MATCH(DMI_PRODUCT_NAME, "PCG-"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0206H"),
- MATCH(DMI_BIOS_DATE, "08/23/99"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0206H"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/23/99"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505VX */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "W2K06H0"),
- MATCH(DMI_BIOS_DATE, "02/03/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "W2K06H0"),
+ DMI_MATCH(DMI_BIOS_DATE, "02/03/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-XG29 */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0117A0"),
- MATCH(DMI_BIOS_DATE, "04/25/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0117A0"),
+ DMI_MATCH(DMI_BIOS_DATE, "04/25/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0121Z1"),
- MATCH(DMI_BIOS_DATE, "05/11/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0121Z1"),
+ DMI_MATCH(DMI_BIOS_DATE, "05/11/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "WME01Z1"),
- MATCH(DMI_BIOS_DATE, "08/11/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "WME01Z1"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/11/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0206Z3"),
- MATCH(DMI_BIOS_DATE, "12/25/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0206Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "12/25/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0203D0"),
- MATCH(DMI_BIOS_DATE, "05/12/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0203D0"),
+ DMI_MATCH(DMI_BIOS_DATE, "05/12/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0203Z3"),
- MATCH(DMI_BIOS_DATE, "08/25/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0203Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/25/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0209Z3"),
- MATCH(DMI_BIOS_DATE, "05/12/01"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0209Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "05/12/01"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-F104K */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0204K2"),
- MATCH(DMI_BIOS_DATE, "08/28/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0204K2"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/28/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0208P1"),
- MATCH(DMI_BIOS_DATE, "11/09/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0208P1"),
+ DMI_MATCH(DMI_BIOS_DATE, "11/09/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "R0204P1"),
- MATCH(DMI_BIOS_DATE, "09/12/00"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0204P1"),
+ DMI_MATCH(DMI_BIOS_DATE, "09/12/00"),
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
- MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
- MATCH(DMI_BIOS_DATE, "10/26/01"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "10/26/01"),
} },
{ exploding_pnp_bios, "Higraded P14H", { /* PnPBIOS GPF on boot */
- MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- MATCH(DMI_BIOS_VERSION, "07.00T"),
- MATCH(DMI_SYS_VENDOR, "Higraded"),
- MATCH(DMI_PRODUCT_NAME, "P14H")
+ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "07.00T"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Higraded"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "P14H")
} },
{ exploding_pnp_bios, "ASUS P4P800", { /* PnPBIOS GPF on boot */
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
- MATCH(DMI_BOARD_NAME, "P4P800"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
+ DMI_MATCH(DMI_BOARD_NAME, "P4P800"),
} },
/* Machines which have problems handling enabled local APICs */
{ local_apic_kills_bios, "Dell Inspiron", {
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "Inspiron"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron"),
} },
{ local_apic_kills_bios, "Dell Latitude", {
- MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_PRODUCT_NAME, "Latitude"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
} },
{ local_apic_kills_bios, "IBM Thinkpad T20", {
- MATCH(DMI_BOARD_VENDOR, "IBM"),
- MATCH(DMI_BOARD_NAME, "264741U"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BOARD_NAME, "264741U"),
} },
{ local_apic_kills_bios, "ASUS L3C", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "P4_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 */
- MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
- MATCH(DMI_BOARD_NAME, "<K7V-RM>"),
+ DMI_MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
+ DMI_MATCH(DMI_BOARD_NAME, "<K7V-RM>"),
} },
{ broken_toshiba_keyboard, "Toshiba Satellite 4030cdt", { /* Keyboard generates spurious repeats */
- MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
} },
{ init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */
- MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
} },
#ifdef CONFIG_ACPI_SLEEP
{ reset_videomode_after_s3, "Toshiba Satellite 4030cdt", { /* Reset video mode after returning from ACPI S3 sleep */
- MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
} },
#endif
{ print_if_true, KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", {
- MATCH(DMI_SYS_VENDOR, "IBM"),
- MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
+ DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
} },
{ fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
- MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
- MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
- MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
+ DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
} },
{ fix_acer_tm360_irqrouting, "Acer TravelMate 36x Laptop", {
- MATCH(DMI_SYS_VENDOR, "Acer"),
- MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
} },
@@ -846,7 +812,7 @@ static __initdata struct dmi_blacklist d
*/
{ set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
- MATCH(DMI_SYS_VENDOR, "IBM"),
+ DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
} },
/*
@@ -854,7 +820,7 @@ static __initdata struct dmi_blacklist d
*/
{ disable_smbus, "IBM", {
- MATCH(DMI_SYS_VENDOR, "IBM"),
+ DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
} },
/*
@@ -863,8 +829,8 @@ static __initdata struct dmi_blacklist d
* Mention this, and disable cpufreq.
*/
{ acer_cpufreq_pst, "Acer Aspire", {
- MATCH(DMI_SYS_VENDOR, "Insyde Software"),
- MATCH(DMI_BIOS_VERSION, "3A71"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde Software"),
+ DMI_MATCH(DMI_BIOS_VERSION, "3A71"),
} },
#ifdef CONFIG_ACPI_BOOT
@@ -878,8 +844,8 @@ static __initdata struct dmi_blacklist d
*/
{ dmi_disable_acpi, "IBM Thinkpad", {
- MATCH(DMI_BOARD_VENDOR, "IBM"),
- MATCH(DMI_BOARD_NAME, "2629H1G"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BOARD_NAME, "2629H1G"),
} },
/*
@@ -887,78 +853,78 @@ static __initdata struct dmi_blacklist d
*/
{ force_acpi_ht, "FSC Primergy T850", {
- MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
- MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PRIMERGY T850"),
}},
{ force_acpi_ht, "DELL GX240", {
- MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
- MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
}},
{ force_acpi_ht, "HP VISUALIZE NT Workstation", {
- MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
- MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP VISUALIZE NT Workstation"),
}},
{ force_acpi_ht, "Compaq ProLiant DL380 G2", {
- MATCH(DMI_SYS_VENDOR, "Compaq"),
- MATCH(DMI_PRODUCT_NAME, "ProLiant DL380 G2"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380 G2"),
}},
{ force_acpi_ht, "Compaq ProLiant ML530 G2", {
- MATCH(DMI_SYS_VENDOR, "Compaq"),
- MATCH(DMI_PRODUCT_NAME, "ProLiant ML530 G2"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant ML530 G2"),
}},
{ force_acpi_ht, "Compaq ProLiant ML350 G3", {
- MATCH(DMI_SYS_VENDOR, "Compaq"),
- MATCH(DMI_PRODUCT_NAME, "ProLiant ML350 G3"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant ML350 G3"),
}},
{ force_acpi_ht, "Compaq Workstation W8000", {
- MATCH(DMI_SYS_VENDOR, "Compaq"),
- MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Workstation W8000"),
}},
{ force_acpi_ht, "ASUS P4B266", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "P4B266"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "P4B266"),
}},
{ force_acpi_ht, "ASUS P2B-DS", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "P2B-DS"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
}},
{ force_acpi_ht, "ASUS CUR-DLS", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "CUR-DLS"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "CUR-DLS"),
}},
{ force_acpi_ht, "ABIT i440BX-W83977", {
- MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
- MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ABIT <http://www.abit.com>"),
+ DMI_MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"),
}},
{ force_acpi_ht, "IBM Bladecenter", {
- MATCH(DMI_BOARD_VENDOR, "IBM"),
- MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BOARD_NAME, "IBM eServer BladeCenter HS20"),
}},
{ force_acpi_ht, "IBM eServer xSeries 360", {
- MATCH(DMI_BOARD_VENDOR, "IBM"),
- MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BOARD_NAME, "eServer xSeries 360"),
}},
{ force_acpi_ht, "IBM eserver xSeries 330", {
- MATCH(DMI_BOARD_VENDOR, "IBM"),
- MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BOARD_NAME, "eserver xSeries 330"),
}},
{ force_acpi_ht, "IBM eserver xSeries 440", {
- MATCH(DMI_BOARD_VENDOR, "IBM"),
- MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
}},
/*
@@ -969,40 +935,40 @@ static __initdata struct dmi_blacklist d
* with something to key of chipset PCI-ID.
*/
{ ignore_timer_override, "Abit NF7-S v2", {
- MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
- MATCH(DMI_BOARD_NAME, "NF7-S/NF7,NF7-V (nVidia-nForce2)"),
- MATCH(DMI_BIOS_VERSION, "6.00 PG"),
- MATCH(DMI_BIOS_DATE, "03/24/2004") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
+ DMI_MATCH(DMI_BOARD_NAME, "NF7-S/NF7,NF7-V (nVidia-nForce2)"),
+ DMI_MATCH(DMI_BIOS_VERSION, "6.00 PG"),
+ DMI_MATCH(DMI_BIOS_DATE, "03/24/2004") }},
{ ignore_timer_override, "Asus A7N8X v2", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "A7N8X2.0"),
- MATCH(DMI_BIOS_VERSION, "ASUS A7N8X2.0 Deluxe ACPI BIOS Rev 1007"),
- MATCH(DMI_BIOS_DATE, "10/06/2003") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "A7N8X2.0"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7N8X2.0 Deluxe ACPI BIOS Rev 1007"),
+ DMI_MATCH(DMI_BIOS_DATE, "10/06/2003") }},
{ ignore_timer_override, "Asus A7N8X-X", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "A7N8X-X"),
- MATCH(DMI_BIOS_VERSION, "ASUS A7N8X-X ACPI BIOS Rev 1009"),
- MATCH(DMI_BIOS_DATE, "2/3/2004") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "A7N8X-X"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7N8X-X ACPI BIOS Rev 1009"),
+ DMI_MATCH(DMI_BIOS_DATE, "2/3/2004") }},
{ ignore_timer_override, "MSI K7N2-Delta", {
- MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
- MATCH(DMI_BOARD_NAME, "MS-6570"),
- MATCH(DMI_BIOS_VERSION, "6.00 PG"),
- MATCH(DMI_BIOS_DATE, "03/29/2004") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
+ DMI_MATCH(DMI_BOARD_NAME, "MS-6570"),
+ DMI_MATCH(DMI_BIOS_VERSION, "6.00 PG"),
+ DMI_MATCH(DMI_BIOS_DATE, "03/29/2004") }},
{ ignore_timer_override, "Shuttle SN41G2", {
- MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"),
- MATCH(DMI_BOARD_NAME, "FN41"),
- MATCH(DMI_BIOS_VERSION, "6.00 PG"),
- MATCH(DMI_BIOS_DATE, "01/14/2004") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"),
+ DMI_MATCH(DMI_BOARD_NAME, "FN41"),
+ DMI_MATCH(DMI_BIOS_VERSION, "6.00 PG"),
+ DMI_MATCH(DMI_BIOS_DATE, "01/14/2004") }},
{ ignore_timer_override, "Shuttle AN35N", {
- MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"),
- MATCH(DMI_BOARD_NAME, "AN35"),
- MATCH(DMI_BIOS_VERSION, "6.00 PG"),
- MATCH(DMI_BIOS_DATE, "12/05/2003") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"),
+ DMI_MATCH(DMI_BOARD_NAME, "AN35"),
+ DMI_MATCH(DMI_BIOS_VERSION, "6.00 PG"),
+ DMI_MATCH(DMI_BIOS_DATE, "12/05/2003") }},
#endif // CONFIG_ACPI_BOOT
#ifdef CONFIG_ACPI_PCI
@@ -1011,23 +977,23 @@ static __initdata struct dmi_blacklist d
*/
{ disable_acpi_irq, "ASUS A7V", {
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
- MATCH(DMI_BOARD_NAME, "<A7V>"),
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
+ DMI_MATCH(DMI_BOARD_NAME, "<A7V>"),
/* newer BIOS, Revision 1011, does work */
- MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
}},
/*
* Boxes that need ACPI PCI IRQ routing and PCI scan disabled
*/
{ disable_acpi_pci, "ASUS PR-DLS", { /* _BBN 0 bug */
- MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- MATCH(DMI_BOARD_NAME, "PR-DLS"),
- MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"),
- MATCH(DMI_BIOS_DATE, "03/21/2003") }},
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"),
+ DMI_MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"),
+ DMI_MATCH(DMI_BIOS_DATE, "03/21/2003") }},
{ disable_acpi_pci, "Acer TravelMate 36x Laptop", {
- MATCH(DMI_SYS_VENDOR, "Acer"),
- MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
} },
#endif
@@ -1036,16 +1002,41 @@ static __initdata struct dmi_blacklist d
/*
- * Walk the blacklist table running matching functions until someone
- * returns 1 or we hit the end.
- */
-
+ * dmi_check_system - check system DMI data
+ * @list: array of dmi_system_id structures to match against
+ *
+ * Walk the blacklist table running matching functions until someone
+ * returns non zero or we hit the end. Callback function is called for
+ * each successfull match. Returns the number of matches.
+ */
+int dmi_check_system(struct dmi_system_id *list)
+{
+ int i, count = 0;
+
+ while (list->ident) {
+ for (i = 0; i < ARRAY_SIZE(list->matches); i++) {
+ int s = list->matches[i].slot;
+ if (s == DMI_NONE)
+ continue;
+ if (dmi_ident[s] && strstr(dmi_ident[s], list->matches[i].substr))
+ continue;
+ /* No match */
+ goto fail;
+ }
+ if (list->callback && list->callback(list))
+ break;
+ count++;
+fail: list++;
+ }
+
+ return count;
+}
+
+EXPORT_SYMBOL(dmi_check_system);
+
static __init void dmi_check_blacklist(void)
{
- struct dmi_blacklist *d;
- int i;
-
#ifdef CONFIG_ACPI_BOOT
#define ACPI_BLACKLIST_CUTOFF_YEAR 2001
@@ -1068,24 +1059,7 @@ static __init void dmi_check_blacklist(v
}
#endif
- d=&dmi_blacklist[0];
- while(d->callback)
- {
- for(i=0;i<4;i++)
- {
- int s = d->matches[i].slot;
- if(s==DMI_NONE)
- continue;
- if(dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
- continue;
- /* No match */
- goto fail;
- }
- if(d->callback(d))
- return;
-fail:
- d++;
- }
+ dmi_check_system(dmi_blacklist);
}
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/include/linux/dmi.h linux-2.6.6-rc3-mm1/include/linux/dmi.h
--- linux-2.6.6-rc3-mm1.vanulla/include/linux/dmi.h 1970-01-01 03:00:00.000000000 +0300
+++ linux-2.6.6-rc3-mm1/include/linux/dmi.h 2004-05-07 10:04:21.000000000 +0400
@@ -0,0 +1,44 @@
+#ifndef __DMI_H__
+#define __DMI_H__
+
+enum {
+ DMI_NONE,
+ DMI_BIOS_VENDOR,
+ DMI_BIOS_VERSION,
+ DMI_BIOS_DATE,
+ DMI_SYS_VENDOR,
+ DMI_PRODUCT_NAME,
+ DMI_PRODUCT_VERSION,
+ DMI_BOARD_VENDOR,
+ DMI_BOARD_NAME,
+ DMI_BOARD_VERSION,
+ DMI_STRING_MAX,
+};
+
+/*
+ * DMI callbacks for problem boards
+ */
+struct dmi_strmatch {
+ u8 slot;
+ char *substr;
+};
+
+struct dmi_system_id {
+ int (*callback)(struct dmi_system_id *);
+ char *ident;
+ struct dmi_strmatch matches[4];
+};
+
+#define DMI_MATCH(a,b) { a, b }
+
+#ifdef CONFIG_X86
+
+extern int dmi_check_system(struct dmi_system_id *list);
+
+#else
+
+static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
+
+#endif
+
+#endif /* __DMI_H__ */
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/8] 2.6.3-rc3-mm1, Whitespace cleanups
2004-05-07 8:33 ` [PATCH 1/8] 2.6.3-rc3-mm1, Export DMI probe function Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 3/8] 2.6.3-rc3-mm1, Port sonypi driver to new DMI probing Andrey Panin
0 siblings, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 10:49:30.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 10:50:50.000000000 +0400
@@ -22,9 +22,9 @@ int es7000_plat = 0;
struct dmi_header
{
- u8 type;
- u8 length;
- u16 handle;
+ u8 type;
+ u8 length;
+ u16 handle;
};
#undef DMI_DEBUG
@@ -37,15 +37,14 @@ struct dmi_header
static char * __init dmi_string(struct dmi_header *dm, u8 s)
{
- u8 *bp=(u8 *)dm;
- bp+=dm->length;
- if(!s)
+ u8 *bp = ((u8 *) dm) + dm->length;
+
+ if (!s)
return "";
s--;
- while(s>0 && *bp)
- {
- bp+=strlen(bp);
- bp++;
+
+ while (s > 0 && *bp) {
+ bp += strlen(bp) + 1;
s--;
}
return bp;
@@ -58,13 +57,12 @@ static char * __init dmi_string(struct d
static int __init dmi_table(u32 base, int len, int num, void (*decode)(struct dmi_header *))
{
- u8 *buf;
+ u8 *buf, *data;
struct dmi_header *dm;
- u8 *data;
- int i=0;
+ int i = 0;
buf = bt_ioremap(base, len);
- if(buf==NULL)
+ if (buf == NULL)
return -1;
data = buf;
@@ -74,20 +72,19 @@ static int __init dmi_table(u32 base, in
* OR we run off the end of the table (also happens)
*/
- while(i<num && data-buf+sizeof(struct dmi_header)<=len)
- {
- dm=(struct dmi_header *)data;
+ while ((i < num) && ((data-buf + sizeof(struct dmi_header)) <= len)) {
+ dm = (struct dmi_header *) data;
/*
* We want to know the total length (formated area and strings)
* before decoding to make sure we won't run off the table in
* dmi_decode or dmi_string
*/
- data+=dm->length;
- while(data-buf<len-1 && (data[0] || data[1]))
+ data += dm->length;
+ while (((data - buf) < (len - 1)) && (data[0] || data[1]))
data++;
- if(data-buf<len-1)
+ if ((data - buf) < (len - 1))
decode(dm);
- data+=2;
+ data += 2;
i++;
}
bt_iounmap(buf, len);
@@ -95,47 +92,46 @@ static int __init dmi_table(u32 base, in
}
-inline static int __init dmi_checksum(u8 *buf)
+static inline int dmi_checksum(u8 *buf)
{
- u8 sum=0;
- int a;
-
- for(a=0; a<15; a++)
- sum+=buf[a];
- return (sum==0);
+ u8 sum = 0;
+ int a = 16;
+
+ for ( ; --a; )
+ sum += *buf++;
+
+ return sum == 0;
}
static int __init dmi_iterate(void (*decode)(struct dmi_header *))
{
u8 buf[15];
- u32 fp=0xF0000;
+ u32 fp = 0xF0000;
- while (fp < 0xFFFFF)
- {
+ while (fp < 0xFFFFF) {
isa_memcpy_fromio(buf, fp, 15);
- if(memcmp(buf, "_DMI_", 5)==0 && dmi_checksum(buf))
- {
- u16 num=buf[13]<<8|buf[12];
- u16 len=buf[7]<<8|buf[6];
- u32 base=buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8];
+ if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
+ u16 len = readw(buf + 6);
+ u32 base = readl(buf + 8);
+ u16 num = readw(buf + 12);
/*
* DMI version 0.0 means that the real version is taken from
* the SMBIOS version, which we don't know at this point.
*/
- if(buf[14]!=0)
+ if (buf[14] != 0)
printk(KERN_INFO "DMI %d.%d present.\n",
- buf[14]>>4, buf[14]&0x0F);
+ buf[14] >> 4, buf[14] & 0x0F);
else
printk(KERN_INFO "DMI present.\n");
dmi_printk((KERN_INFO "%d structures occupying %d bytes.\n",
num, len));
dmi_printk((KERN_INFO "DMI table at 0x%08X.\n",
base));
- if(dmi_table(base,len, num, decode)==0)
+ if (!dmi_table(base, len, num, decode))
return 0;
}
- fp+=16;
+ fp += 16;
}
return -1;
}
@@ -150,12 +146,13 @@ static void __init dmi_save_ident(struct
{
char *d = (char*)dm;
char *p = dmi_string(dm, d[string]);
- if(p==NULL || *p == 0)
+
+ if (!p || !*p)
return;
if (dmi_ident[slot])
return;
- dmi_ident[slot] = alloc_bootmem(strlen(p)+1);
- if(dmi_ident[slot])
+ dmi_ident[slot] = alloc_bootmem(strlen(p) + 1);
+ if (dmi_ident[slot])
strcpy(dmi_ident[slot], p);
else
printk(KERN_ERR "dmi_save_ident: out of memory.\n");
@@ -1040,25 +1037,23 @@ static __init void dmi_check_blacklist(v
#ifdef CONFIG_ACPI_BOOT
#define ACPI_BLACKLIST_CUTOFF_YEAR 2001
- if (dmi_ident[DMI_BIOS_DATE]) {
- char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/');
- if (s) {
- int year, disable = 0;
- s++;
- year = simple_strtoul(s,NULL,0);
- if (year >= 1000)
- disable = year < ACPI_BLACKLIST_CUTOFF_YEAR;
+ if (dmi_ident[DMI_BIOS_DATE]) {
+ char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/');
+ if (s) {
+ int disable = 0, year = simple_strtoul(++s, NULL, 0);
+
+ if (year >= 1000)
+ disable = year < ACPI_BLACKLIST_CUTOFF_YEAR;
else if (year < 1 || (year > 90 && year <= 99))
- disable = 1;
- if (disable && !acpi_force) {
+ disable = 1;
+ if (disable && !acpi_force) {
printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
printk(KERN_NOTICE "You can enable it with acpi=force\n");
disable_acpi();
- }
+ }
}
}
#endif
-
dmi_check_system(dmi_blacklist);
}
@@ -1118,8 +1113,7 @@ static void __init dmi_decode(struct dmi
void __init dmi_scan_machine(void)
{
- int err = dmi_iterate(dmi_decode);
- if(err == 0)
+ if (!dmi_iterate(dmi_decode))
dmi_check_blacklist();
else
printk(KERN_INFO "DMI not present.\n");
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/8] 2.6.3-rc3-mm1, Port sonypi driver to new DMI probing
2004-05-07 8:33 ` [PATCH 2/8] 2.6.3-rc3-mm1, Whitespace cleanups Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 4/8] 2.6.3-rc3-mm1, Port APM BIOS " Andrey Panin
0 siblings, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 10:55:56.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 10:56:29.000000000 +0400
@@ -16,7 +16,6 @@
unsigned long dmi_broken;
EXPORT_SYMBOL(dmi_broken);
-int is_sony_vaio_laptop;
int is_unsafe_smbus;
int es7000_plat = 0;
@@ -360,24 +359,6 @@ static __init int broken_apm_power(struc
}
/*
- * Check for a Sony Vaio system
- *
- * On a Sony system we want to enable the use of the sonypi
- * driver for Sony-specific goodies like the camera and jogdial.
- * We also want to avoid using certain functions of the PnP BIOS.
- */
-
-static __init int sony_vaio_laptop(struct dmi_system_id *d)
-{
- if (is_sony_vaio_laptop == 0)
- {
- is_sony_vaio_laptop = 1;
- printk(KERN_INFO "%s laptop detected.\n", d->ident);
- }
- return 0;
-}
-
-/*
* This bios swaps the APM minute reporting bytes over (Many sony laptops
* have this problem).
*/
@@ -653,10 +634,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
DMI_MATCH(DMI_BIOS_VERSION, "0AASNP05"),
} },
- { sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
- DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
- } },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
DMI_MATCH(DMI_BIOS_VERSION, "R0206H"),
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/i386_ksyms.c linux-2.6.6-rc3-mm1/arch/i386/kernel/i386_ksyms.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/i386_ksyms.c 2004-05-07 09:45:23.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/i386_ksyms.c 2004-05-07 10:56:29.000000000 +0400
@@ -187,9 +187,6 @@ EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL(atomic_dec_and_lock);
#endif
-extern int is_sony_vaio_laptop;
-EXPORT_SYMBOL(is_sony_vaio_laptop);
-
EXPORT_SYMBOL(__PAGE_KERNEL);
#ifdef CONFIG_HIGHMEM
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/drivers/char/sonypi.c linux-2.6.6-rc3-mm1/drivers/char/sonypi.c
--- linux-2.6.6-rc3-mm1.vanulla/drivers/char/sonypi.c 2004-04-04 07:37:37.000000000 +0400
+++ linux-2.6.6-rc3-mm1/drivers/char/sonypi.c 2004-05-07 10:56:29.000000000 +0400
@@ -43,6 +43,7 @@
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/acpi.h>
+#include <linux/dmi.h>
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -818,10 +819,21 @@ static void __devexit sonypi_remove(void
printk(KERN_INFO "sonypi: removed.\n");
}
-static int __init sonypi_init_module(void) {
- struct pci_dev *pcidev = NULL;
+static struct dmi_system_id __initdata sonypi_dmi_table[] = {
+ {
+ .ident = "Sony Vaio",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
+ },
+ },
+ { }
+};
- if (is_sony_vaio_laptop) {
+static int __init sonypi_init_module(void)
+{
+ struct pci_dev *pcidev = NULL;
+ if (dmi_check_system(sonypi_dmi_table)) {
pcidev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82371AB_3,
NULL);
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/8] 2.6.3-rc3-mm1, Port APM BIOS driver to new DMI probing
2004-05-07 8:33 ` [PATCH 3/8] 2.6.3-rc3-mm1, Port sonypi driver to new DMI probing Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 5/8] 2.6.3-rc3-mm1, Move HP Pavilion and Acer TravelMate 360 irq workarounds where they belong Andrey Panin
0 siblings, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/apm.c linux-2.6.6-rc3-mm1/arch/i386/kernel/apm.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/apm.c 2004-05-07 09:44:11.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/apm.c 2004-05-07 11:06:39.000000000 +0400
@@ -222,6 +222,7 @@
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
+#include <linux/dmi.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@ -1884,6 +1885,319 @@ static struct miscdevice apm_device = {
&apm_bios_fops
};
+
+/* Simple "print if true" callback */
+static int __init print_if_true(struct dmi_system_id *d)
+{
+ printk("%s\n", d->ident);
+ return 0;
+}
+
+/*
+ * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was
+ * disabled before the suspend. Linux used to get terribly confused by that.
+ */
+static int __init broken_ps2_resume(struct dmi_system_id *d)
+{
+ printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident);
+ return 0;
+}
+
+/* Some bioses have a broken protected mode poweroff and need to use realmode */
+static int __init set_realmode_power_off(struct dmi_system_id *d)
+{
+ if (apm_info.realmode_power_off == 0) {
+ apm_info.realmode_power_off = 1;
+ printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
+ }
+ return 0;
+}
+
+/* Some laptops require interrupts to be enabled during APM calls */
+static int __init set_apm_ints(struct dmi_system_id *d)
+{
+ if (apm_info.allow_ints == 0) {
+ apm_info.allow_ints = 1;
+ printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
+ }
+ return 0;
+}
+
+/* Some APM bioses corrupt memory or just plain do not work */
+static int __init apm_is_horked(struct dmi_system_id *d)
+{
+ if (apm_info.disabled == 0) {
+ apm_info.disabled = 1;
+ printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
+ }
+ return 0;
+}
+
+static int __init apm_is_horked_d850md(struct dmi_system_id *d)
+{
+ if (apm_info.disabled == 0) {
+ apm_info.disabled = 1;
+ printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
+ printk(KERN_INFO "This bug is fixed in bios P15 which is available for \n");
+ printk(KERN_INFO "download from support.intel.com \n");
+ }
+ return 0;
+}
+
+/* Some APM bioses hang on APM idle calls */
+static int __init apm_likes_to_melt(struct dmi_system_id *d)
+{
+ if (apm_info.forbid_idle == 0) {
+ apm_info.forbid_idle = 1;
+ printk(KERN_INFO "%s machine detected. Disabling APM idle calls.\n", d->ident);
+ }
+ return 0;
+}
+
+/*
+ * Check for clue free BIOS implementations who use
+ * the following QA technique
+ *
+ * [ Write BIOS Code ]<------
+ * | ^
+ * < Does it Compile >----N--
+ * |Y ^
+ * < Does it Boot Win98 >-N--
+ * |Y
+ * [Ship It]
+ *
+ * Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
+ * Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
+ */
+static int __init broken_apm_power(struct dmi_system_id *d)
+{
+ apm_info.get_power_status_broken = 1;
+ printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
+ return 0;
+}
+
+/*
+ * This bios swaps the APM minute reporting bytes over (Many sony laptops
+ * have this problem).
+ */
+static int __init swab_apm_power_in_minutes(struct dmi_system_id *d)
+{
+ apm_info.get_power_status_swabinminutes = 1;
+ printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n");
+ return 0;
+}
+
+static struct dmi_system_id __initdata apm_dmi_table[] = {
+ {
+ print_if_true,
+ KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.",
+ { DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
+ DMI_MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"), },
+ },
+ { /* Handle problems with APM on the C600 */
+ broken_ps2_resume, "Dell Latitude C600",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C600"), },
+ },
+ { /* Allow interrupts during suspend on Dell Latitude laptops*/
+ set_apm_ints, "Dell Latitude",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C510"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Dell Inspiron 2500",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION,"A11"), },
+ },
+ { /* Allow interrupts during suspend on Dell Inspiron laptops*/
+ set_apm_ints, "Dell Inspiron",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"), },
+ },
+ { /* Handle problems with APM on Inspiron 5000e */
+ broken_apm_power, "Dell Inspiron 5000e",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "A04"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/24/2000"), },
+ },
+ { /* Handle problems with APM on Inspiron 2500 */
+ broken_apm_power, "Dell Inspiron 2500",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "A12"),
+ DMI_MATCH(DMI_BIOS_DATE, "02/04/2002"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Dell Dimension 4100",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION,"A11"), },
+ },
+ { /* Allow interrupts during suspend on Compaq Laptops*/
+ set_apm_ints, "Compaq 12XL125",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION,"4.06"), },
+ },
+ { /* Allow interrupts during APM or the clock goes slow */
+ set_apm_ints, "ASUSTeK",
+ { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"), },
+ },
+ { /* APM blows on shutdown */
+ apm_is_horked, "ABIT KX7-333[R]",
+ { DMI_MATCH(DMI_BOARD_VENDOR, "ABIT"),
+ DMI_MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Trigem Delhi3",
+ { DMI_MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Delhi3"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Fujitsu-Siemens",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_BIOS_VERSION, "Version1.01"), },
+ },
+ { /* APM crashes */
+ apm_is_horked_d850md, "Intel D850MD",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Intel D810EMO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Dell XPS-Z",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
+ DMI_MATCH(DMI_BIOS_VERSION, "A11"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Sharp PC-PJ/AX",
+ { DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
+ DMI_MATCH(DMI_BIOS_VERSION,"Version R2.08"), },
+ },
+ { /* APM crashes */
+ apm_is_horked, "Dell Inspiron 2500",
+ { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
+ DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION,"A11"), },
+ },
+ { /* APM idle hangs */
+ apm_likes_to_melt, "Jabil AMD",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "0AASNP06"), },
+ },
+ { /* APM idle hangs */
+ apm_likes_to_melt, "AMI Bios",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "0AASNP05"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0206H"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/23/99"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-N505VX */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "W2K06H0"),
+ DMI_MATCH(DMI_BIOS_DATE, "02/03/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-XG29 */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0117A0"),
+ DMI_MATCH(DMI_BIOS_DATE, "04/25/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0121Z1"),
+ DMI_MATCH(DMI_BIOS_DATE, "05/11/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "WME01Z1"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/11/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0206Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "12/25/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0203D0"),
+ DMI_MATCH(DMI_BIOS_DATE, "05/12/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0203Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/25/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0209Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "05/12/01"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-F104K */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0204K2"),
+ DMI_MATCH(DMI_BIOS_DATE, "08/28/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0208P1"),
+ DMI_MATCH(DMI_BIOS_DATE, "11/09/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-C1VE */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "R0204P1"),
+ DMI_MATCH(DMI_BIOS_DATE, "09/12/00"), },
+ },
+ { /* Handle problems with APM on Sony Vaio PCG-C1VE */
+ swab_apm_power_in_minutes, "Sony VAIO",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+ DMI_MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
+ DMI_MATCH(DMI_BIOS_DATE, "10/26/01"), },
+ },
+ { /* broken PM poweroff bios */
+ set_realmode_power_off, "Award Software v4.60 PGMA",
+ { DMI_MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
+ DMI_MATCH(DMI_BIOS_DATE, "134526184"), },
+ },
+
+ /* Generic per vendor APM settings */
+
+ { /* Allow interrupts during suspend on IBM laptops */
+ set_apm_ints, "IBM",
+ { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
+ },
+
+ { }
+};
+
+
/*
* Just start the APM thread. We do NOT want to do APM BIOS
* calls from anything but the APM thread, if for no other reason
@@ -1900,6 +2214,8 @@ static int __init apm_init(void)
int ret;
int i;
+ dmi_check_system(apm_dmi_table);
+
if (apm_info.bios.version == 0) {
printk(KERN_INFO "apm: BIOS not found.\n");
return -ENODEV;
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 11:05:56.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 11:07:39.000000000 +0400
@@ -4,7 +4,6 @@
#include <linux/string.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/apm_bios.h>
#include <linux/slab.h>
#include <asm/acpi.h>
#include <asm/io.h>
@@ -203,73 +202,6 @@ static __init int set_smp_bios_reboot(st
}
/*
- * Some bioses have a broken protected mode poweroff and need to use realmode
- */
-
-static __init int set_realmode_power_off(struct dmi_system_id *d)
-{
- if (apm_info.realmode_power_off == 0)
- {
- apm_info.realmode_power_off = 1;
- printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
- }
- return 0;
-}
-
-
-/*
- * Some laptops require interrupts to be enabled during APM calls
- */
-
-static __init int set_apm_ints(struct dmi_system_id *d)
-{
- if (apm_info.allow_ints == 0)
- {
- apm_info.allow_ints = 1;
- printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
- }
- return 0;
-}
-
-/*
- * Some APM bioses corrupt memory or just plain do not work
- */
-
-static __init int apm_is_horked(struct dmi_system_id *d)
-{
- if (apm_info.disabled == 0)
- {
- apm_info.disabled = 1;
- printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
- }
- return 0;
-}
-
-static __init int apm_is_horked_d850md(struct dmi_system_id *d)
-{
- if (apm_info.disabled == 0) {
- apm_info.disabled = 1;
- printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
- printk(KERN_INFO "This bug is fixed in bios P15 which is available for \n");
- printk(KERN_INFO "download from support.intel.com \n");
- }
- return 0;
-}
-
-/*
- * Some APM bioses hang on APM idle calls
- */
-
-static __init int apm_likes_to_melt(struct dmi_system_id *d)
-{
- if (apm_info.forbid_idle == 0) {
- apm_info.forbid_idle = 1;
- printk(KERN_INFO "%s machine detected. Disabling APM idle calls.\n", d->ident);
- }
- return 0;
-}
-
-/*
* 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
@@ -335,40 +267,6 @@ static __init int fix_acer_tm360_irqrout
#endif
return 0;
}
-/*
- * Check for clue free BIOS implementations who use
- * the following QA technique
- *
- * [ Write BIOS Code ]<------
- * | ^
- * < Does it Compile >----N--
- * |Y ^
- * < Does it Boot Win98 >-N--
- * |Y
- * [Ship It]
- *
- * Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
- * Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
- */
-
-static __init int broken_apm_power(struct dmi_system_id *d)
-{
- apm_info.get_power_status_broken = 1;
- printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
- return 0;
-}
-
-/*
- * This bios swaps the APM minute reporting bytes over (Many sony laptops
- * have this problem).
- */
-
-static __init int swab_apm_power_in_minutes(struct dmi_system_id *d)
-{
- apm_info.get_power_status_swabinminutes = 1;
- printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n");
- return 0;
-}
/*
* ASUS K7V-RM has broken ACPI table defining sleep modes
@@ -413,17 +311,6 @@ static __init int reset_videomode_after_
#endif
/*
- * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was
- * disabled before the suspend. Linux used to get terribly confused by that.
- */
-
-static __init int broken_ps2_resume(struct dmi_system_id *d)
-{
- printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident);
- return 0;
-}
-
-/*
* Exploding PnPBIOS. Don't yet know if its the BIOS or us for
* some entries
*/
@@ -445,17 +332,6 @@ static __init int acer_cpufreq_pst(struc
}
-/*
- * Simple "print if true" callback
- */
-
-static __init int print_if_true(struct dmi_system_id *d)
-{
- printk("%s\n", d->ident);
- return 0;
-}
-
-
#ifdef CONFIG_ACPI_BOOT
extern int acpi_force;
@@ -528,45 +404,6 @@ static __init int disable_acpi_pci(struc
*/
static __initdata struct dmi_system_id dmi_blacklist[]={
- { broken_ps2_resume, "Dell Latitude C600", { /* Handle problems with APM on the C600 */
- DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C600"),
- } },
- { set_apm_ints, "Dell Latitude", { /* Allow interrupts during suspend on Dell Latitude laptops*/
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C510"),
- } },
- { apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
- DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION,"A11")
- } },
- { set_apm_ints, "Dell Inspiron", { /* Allow interrupts during suspend on Dell Inspiron laptops*/
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"),
- } },
- { broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "A04"),
- DMI_MATCH(DMI_BIOS_DATE, "08/24/2000"),
- } },
- { broken_apm_power, "Dell Inspiron 2500", { /* Handle problems with APM on Inspiron 2500 */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "A12"),
- DMI_MATCH(DMI_BIOS_DATE, "02/04/2002"),
- } },
- { apm_is_horked, "Dell Dimension 4100", { /* APM crashes */
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
- DMI_MATCH(DMI_BIOS_VENDOR,"Intel Corp."),
- DMI_MATCH(DMI_BIOS_VERSION,"A11")
- } },
- { set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
- DMI_MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
- DMI_MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
- DMI_MATCH(DMI_BIOS_DATE, "134526184"),
- } },
{ 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/"),
@@ -579,138 +416,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
} },
- { set_apm_ints, "Compaq 12XL125", { /* Allow interrupts during suspend on Compaq Laptops*/
- DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Compaq PC"),
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION,"4.06")
- } },
- { set_apm_ints, "ASUSTeK", { /* Allow interrupts during APM or the clock goes slow */
- DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
- } },
- { apm_is_horked, "ABIT KX7-333[R]", { /* APM blows on shutdown */
- DMI_MATCH(DMI_BOARD_VENDOR, "ABIT"),
- DMI_MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"),
- } },
- { apm_is_horked, "Trigem Delhi3", { /* APM crashes */
- DMI_MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Delhi3"),
- } },
- { apm_is_horked, "Fujitsu-Siemens", { /* APM crashes */
- DMI_MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"),
- DMI_MATCH(DMI_BIOS_VERSION, "Version1.01"),
- } },
- { apm_is_horked_d850md, "Intel D850MD", { /* APM crashes */
- DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
- DMI_MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"),
- } },
- { apm_is_horked, "Intel D810EMO", { /* APM crashes */
- DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
- DMI_MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"),
- } },
- { apm_is_horked, "Dell XPS-Z", { /* APM crashes */
- DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."),
- DMI_MATCH(DMI_BIOS_VERSION, "A11"),
- DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"),
- } },
- { apm_is_horked, "Sharp PC-PJ/AX", { /* APM crashes */
- DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"),
- DMI_MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
- DMI_MATCH(DMI_BIOS_VERSION,"Version R2.08")
- } },
- { apm_is_horked, "Dell Inspiron 2500", { /* APM crashes */
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"),
- DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION,"A11")
- } },
- { apm_likes_to_melt, "Jabil AMD", { /* APM idle hangs */
- DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- DMI_MATCH(DMI_BIOS_VERSION, "0AASNP06"),
- } },
- { apm_likes_to_melt, "AMI Bios", { /* APM idle hangs */
- DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- DMI_MATCH(DMI_BIOS_VERSION, "0AASNP05"),
- } },
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0206H"),
- DMI_MATCH(DMI_BIOS_DATE, "08/23/99"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505VX */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "W2K06H0"),
- DMI_MATCH(DMI_BIOS_DATE, "02/03/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-XG29 */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0117A0"),
- DMI_MATCH(DMI_BIOS_DATE, "04/25/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0121Z1"),
- DMI_MATCH(DMI_BIOS_DATE, "05/11/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600NE */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "WME01Z1"),
- DMI_MATCH(DMI_BIOS_DATE, "08/11/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0206Z3"),
- DMI_MATCH(DMI_BIOS_DATE, "12/25/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0203D0"),
- DMI_MATCH(DMI_BIOS_DATE, "05/12/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0203Z3"),
- DMI_MATCH(DMI_BIOS_DATE, "08/25/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0209Z3"),
- DMI_MATCH(DMI_BIOS_DATE, "05/12/01"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-F104K */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0204K2"),
- DMI_MATCH(DMI_BIOS_DATE, "08/28/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0208P1"),
- DMI_MATCH(DMI_BIOS_DATE, "11/09/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "R0204P1"),
- DMI_MATCH(DMI_BIOS_DATE, "09/12/00"),
- } },
-
- { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-C1VE */
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
- DMI_MATCH(DMI_BIOS_VERSION, "WXPO1Z3"),
- DMI_MATCH(DMI_BIOS_DATE, "10/26/01"),
- } },
{ exploding_pnp_bios, "Higraded P14H", { /* PnPBIOS GPF on boot */
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
@@ -761,12 +466,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
} },
#endif
-
- { print_if_true, KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", {
- DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
- DMI_MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
- } },
-
{ fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
@@ -781,13 +480,6 @@ static __initdata struct dmi_system_id d
- /*
- * Generic per vendor APM settings
- */
-
- { set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
- DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
- } },
/*
* SMBus / sensors settings
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5/8] 2.6.3-rc3-mm1, Move HP Pavilion and Acer TravelMate 360 irq workarounds where they belong
2004-05-07 8:33 ` [PATCH 4/8] 2.6.3-rc3-mm1, Port APM BIOS " Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 6/8] 2.6.3-rc3-mm1, Port PIIX4 I2C driver to new DMI probing Andrey Panin
0 siblings, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 11:22:20.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 11:17:53.000000000 +0400
@@ -235,40 +235,6 @@ static __init int disable_smbus(struct d
}
/*
- * Work around broken HP Pavilion Notebooks which assign USB to
- * IRQ 9 even though it is actually wired to IRQ 11
- */
-static __init int fix_broken_hp_bios_irq9(struct dmi_system_id *d)
-{
-#ifdef CONFIG_PCI
- extern int broken_hp_bios_irq9;
- if (broken_hp_bios_irq9 == 0)
- {
- broken_hp_bios_irq9 = 1;
- printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
- }
-#endif
- return 0;
-}
-
-/*
- * Work around broken Acer TravelMate 360 Notebooks which assign Cardbus to
- * IRQ 11 even though it is actually wired to IRQ 10
- */
-static __init int fix_acer_tm360_irqrouting(struct dmi_system_id *d)
-{
-#ifdef CONFIG_PCI
- extern int acer_tm360_irqrouting;
- if (acer_tm360_irqrouting == 0)
- {
- acer_tm360_irqrouting = 1;
- printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
- }
-#endif
- return 0;
-}
-
-/*
* ASUS K7V-RM has broken ACPI table defining sleep modes
*/
@@ -466,19 +432,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
} },
#endif
- { fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
- DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
- } },
-
- { fix_acer_tm360_irqrouting, "Acer TravelMate 36x Laptop", {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
- } },
-
-
/*
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/pci/irq.c linux-2.6.6-rc3-mm1/arch/i386/pci/irq.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/pci/irq.c 2004-05-07 09:45:23.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/pci/irq.c 2004-05-07 11:20:39.000000000 +0400
@@ -12,6 +12,7 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
+#include <linux/dmi.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/io_apic.h>
@@ -22,8 +23,8 @@
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
#define PIRQ_VERSION 0x0100
-int broken_hp_bios_irq9;
-int acer_tm360_irqrouting;
+static int broken_hp_bios_irq9;
+static int acer_tm360_irqrouting;
static struct irq_routing_table *pirq_table;
@@ -902,6 +903,54 @@ static void __init pcibios_fixup_irqs(vo
}
}
+/*
+ * Work around broken HP Pavilion Notebooks which assign USB to
+ * IRQ 9 even though it is actually wired to IRQ 11
+ */
+static int __init fix_broken_hp_bios_irq9(struct dmi_system_id *d)
+{
+ if (!broken_hp_bios_irq9) {
+ broken_hp_bios_irq9 = 1;
+ printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
+ }
+ return 0;
+}
+
+/*
+ * Work around broken Acer TravelMate 360 Notebooks which assign Cardbus to
+ * IRQ 11 even though it is actually wired to IRQ 10
+ */
+static int __init fix_acer_tm360_irqrouting(struct dmi_system_id *d)
+{
+ if (!acer_tm360_irqrouting) {
+ acer_tm360_irqrouting = 1;
+ printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
+ }
+ return 0;
+}
+
+static struct dmi_system_id __initdata pciirq_dmi_table[] = {
+ {
+ .callback = fix_broken_hp_bios_irq9,
+ .ident = "HP Pavilion N5400 Series Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
+ DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
+ },
+ },
+ {
+ .callback = fix_acer_tm360_irqrouting,
+ .ident = "Acer TravelMate 36x Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+ },
+ },
+ { }
+};
+
static int __init pcibios_irq_init(void)
{
DBG("PCI: IRQ init\n");
@@ -909,6 +958,8 @@ static int __init pcibios_irq_init(void)
if (pcibios_enable_irq)
return 0;
+ dmi_check_system(pciirq_dmi_table);
+
pirq_table = pirq_find_routing_table();
#ifdef CONFIG_PCI_BIOS
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 6/8] 2.6.3-rc3-mm1, Port PIIX4 I2C driver to new DMI probing
2004-05-07 8:33 ` [PATCH 5/8] 2.6.3-rc3-mm1, Move HP Pavilion and Acer TravelMate 360 irq workarounds where they belong Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 7/8] 2.6.3-rc3-mm1, Port PnP BIOS " Andrey Panin
0 siblings, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 11:23:42.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 11:24:19.000000000 +0400
@@ -15,7 +15,6 @@
unsigned long dmi_broken;
EXPORT_SYMBOL(dmi_broken);
-int is_unsafe_smbus;
int es7000_plat = 0;
struct dmi_header
@@ -221,19 +220,6 @@ static int __init local_apic_kills_bios(
return 0;
}
-/*
- * Don't access SMBus on IBM systems which get corrupted eeproms
- */
-
-static __init int disable_smbus(struct dmi_system_id *d)
-{
- if (is_unsafe_smbus == 0) {
- is_unsafe_smbus = 1;
- printk(KERN_INFO "%s machine detected. Disabling SMBus accesses.\n", d->ident);
- }
- return 0;
-}
-
/*
* ASUS K7V-RM has broken ACPI table defining sleep modes
*/
@@ -435,14 +421,6 @@ static __initdata struct dmi_system_id d
/*
- * SMBus / sensors settings
- */
-
- { disable_smbus, "IBM", {
- DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
- } },
-
- /*
* Some Athlon laptops have really fucked PST tables.
* A BIOS update is all that can save them.
* Mention this, and disable cpufreq.
@@ -740,5 +718,3 @@ void __init dmi_scan_machine(void)
else
printk(KERN_INFO "DMI not present.\n");
}
-
-EXPORT_SYMBOL(is_unsafe_smbus);
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/drivers/i2c/busses/i2c-piix4.c linux-2.6.6-rc3-mm1/drivers/i2c/busses/i2c-piix4.c
--- linux-2.6.6-rc3-mm1.vanulla/drivers/i2c/busses/i2c-piix4.c 2004-04-04 07:36:54.000000000 +0400
+++ linux-2.6.6-rc3-mm1/drivers/i2c/busses/i2c-piix4.c 2004-05-07 11:24:19.000000000 +0400
@@ -40,6 +40,7 @@
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/apm_bios.h>
+#include <linux/dmi.h>
#include <asm/io.h>
@@ -114,18 +115,13 @@ static int piix4_transaction(void);
static unsigned short piix4_smba = 0;
static struct i2c_adapter piix4_adapter;
-/*
- * Get DMI information.
- */
-static int __devinit ibm_dmi_probe(void)
-{
-#ifdef CONFIG_X86
- extern int is_unsafe_smbus;
- return is_unsafe_smbus;
-#else
- return 0;
-#endif
-}
+static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+ {
+ .ident = "IBM",
+ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
+ },
+ { },
+};
static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
const struct pci_device_id *id)
@@ -138,7 +134,8 @@ static int __devinit piix4_setup(struct
dev_info(&PIIX4_dev->dev, "Found %s device\n", pci_name(PIIX4_dev));
- if(ibm_dmi_probe()) {
+ /* Don't access SMBus on IBM systems which get corrupted eeproms */
+ if (dmi_check_system(piix4_dmi_table)) {
dev_err(&PIIX4_dev->dev, "IBM Laptop detected; this module "
"may corrupt your serial eeprom! Refusing to load "
"module!\n");
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 7/8] 2.6.3-rc3-mm1, Port PnP BIOS driver to new DMI probing
2004-05-07 8:33 ` [PATCH 6/8] 2.6.3-rc3-mm1, Port PIIX4 I2C driver to new DMI probing Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
2004-05-07 8:33 ` [PATCH 8/8] 2.6.3-rc3-mm1, Port powernow-k7 " Andrey Panin
0 siblings, 1 reply; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 12:00:29.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 11:54:35.000000000 +0400
@@ -262,17 +262,6 @@ static __init int reset_videomode_after_
}
#endif
-/*
- * Exploding PnPBIOS. Don't yet know if its the BIOS or us for
- * some entries
- */
-
-static __init int exploding_pnp_bios(struct dmi_system_id *d)
-{
- printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
- dmi_broken |= BROKEN_PNP_BIOS;
- return 0;
-}
static __init int acer_cpufreq_pst(struct dmi_system_id *d)
{
@@ -369,17 +358,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
} },
- { exploding_pnp_bios, "Higraded P14H", { /* PnPBIOS GPF on boot */
- DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- DMI_MATCH(DMI_BIOS_VERSION, "07.00T"),
- DMI_MATCH(DMI_SYS_VENDOR, "Higraded"),
- DMI_MATCH(DMI_PRODUCT_NAME, "P14H")
- } },
- { exploding_pnp_bios, "ASUS P4P800", { /* PnPBIOS GPF on boot */
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
- DMI_MATCH(DMI_BOARD_NAME, "P4P800"),
- } },
-
/* Machines which have problems handling enabled local APICs */
{ local_apic_kills_bios, "Dell Inspiron", {
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/drivers/pnp/pnpbios/core.c linux-2.6.6-rc3-mm1/drivers/pnp/pnpbios/core.c
--- linux-2.6.6-rc3-mm1.vanulla/drivers/pnp/pnpbios/core.c 2004-04-04 07:36:15.000000000 +0400
+++ linux-2.6.6-rc3-mm1/drivers/pnp/pnpbios/core.c 2004-05-07 11:56:59.000000000 +0400
@@ -62,6 +62,7 @@
#include <linux/kmod.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
+#include <linux/dmi.h>
#include <asm/system.h>
#include <asm/byteorder.h>
@@ -498,10 +499,39 @@ int __init pnpbios_probe_system(void)
return 0;
}
+static int __init exploding_pnp_bios(struct dmi_system_id *d)
+{
+ printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
+ return 0;
+}
+
+static struct dmi_system_id pnpbios_dmi_table[] = {
+ { /* PnPBIOS GPF on boot */
+ .callback = exploding_pnp_bios,
+ .ident = "Higraded P14H",
+ .matches = {
+ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+ DMI_MATCH(DMI_BIOS_VERSION, "07.00T"),
+ DMI_MATCH(DMI_SYS_VENDOR, "Higraded"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "P14H"),
+ },
+ },
+ { /* PnPBIOS GPF on boot */
+ .callback = exploding_pnp_bios,
+ .ident = "ASUS P4P800",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
+ DMI_MATCH(DMI_BOARD_NAME, "P4P800"),
+ },
+ },
+ { }
+};
+
int __init pnpbios_init(void)
{
int ret;
- if(pnpbios_disabled || (dmi_broken & BROKEN_PNP_BIOS)) {
+
+ if (pnpbios_disabled || dmi_check_system(pnpbios_dmi_table)) {
printk(KERN_INFO "PnPBIOS: Disabled\n");
return -ENODEV;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 8/8] 2.6.3-rc3-mm1, Port powernow-k7 driver to new DMI probing
2004-05-07 8:33 ` [PATCH 7/8] 2.6.3-rc3-mm1, Port PnP BIOS " Andrey Panin
@ 2004-05-07 8:33 ` Andrey Panin
0 siblings, 0 replies; 10+ messages in thread
From: Andrey Panin @ 2004-05-07 8:33 UTC (permalink / raw)
To: Andrew Morton, linux-kernel
diff -urpN -X /usr/share/dontdiff linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/cpu/cpufreq/powernow-k7.c linux-2.6.6-rc3-mm1/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2004-05-07 09:44:11.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2004-05-07 12:16:06.000000000 +0400
@@ -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>
@@ -540,6 +541,31 @@ static int __init fixup_sgtc(void)
return sgtc;
}
+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;
@@ -558,7 +584,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.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.6-rc3-mm1.vanulla/arch/i386/kernel/dmi_scan.c 2004-05-07 12:00:29.000000000 +0400
+++ linux-2.6.6-rc3-mm1/arch/i386/kernel/dmi_scan.c 2004-05-07 12:16:39.000000000 +0400
@@ -262,27 +262,6 @@ static __init int reset_videomode_after_
}
#endif
-/*
- * Exploding PnPBIOS. Don't yet know if its the BIOS or us for
- * some entries
- */
-
-static __init int exploding_pnp_bios(struct dmi_system_id *d)
-{
- printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident);
- dmi_broken |= BROKEN_PNP_BIOS;
- return 0;
-}
-
-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_BOOT
extern int acpi_force;
@@ -369,17 +348,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
} },
- { exploding_pnp_bios, "Higraded P14H", { /* PnPBIOS GPF on boot */
- DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
- DMI_MATCH(DMI_BIOS_VERSION, "07.00T"),
- DMI_MATCH(DMI_SYS_VENDOR, "Higraded"),
- DMI_MATCH(DMI_PRODUCT_NAME, "P14H")
- } },
- { exploding_pnp_bios, "ASUS P4P800", { /* PnPBIOS GPF on boot */
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
- DMI_MATCH(DMI_BOARD_NAME, "P4P800"),
- } },
-
/* Machines which have problems handling enabled local APICs */
{ local_apic_kills_bios, "Dell Inspiron", {
@@ -419,17 +387,6 @@ static __initdata struct dmi_system_id d
} },
#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_ACPI_BOOT
/*
* If your system is blacklisted here, but you find that acpi=force
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data
2004-05-07 8:33 [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data Andrey Panin
2004-05-07 8:33 ` [PATCH 1/8] 2.6.3-rc3-mm1, Export DMI probe function Andrey Panin
@ 2004-05-07 22:00 ` Andrew Morton
1 sibling, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2004-05-07 22:00 UTC (permalink / raw)
To: Andrey Panin; +Cc: linux-kernel, Brown, Len
Sorry, rejects galore again :( There have been a number of changes to
dmi_scan.c since rc3-mm1. They're probably in rc3-mm2, but it would be
best if you were to base these patches off Linus's latest tree, and we ask
Len to keep his paws off dmi_scan.c for a while.
It might be best to merge these patches via Len's tree anyway - I'll then
pick them up via his tree and they'll hit Linus's tree when Len does the
next ACPI merge?
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-05-07 21:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-07 8:33 [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data Andrey Panin
2004-05-07 8:33 ` [PATCH 1/8] 2.6.3-rc3-mm1, Export DMI probe function Andrey Panin
2004-05-07 8:33 ` [PATCH 2/8] 2.6.3-rc3-mm1, Whitespace cleanups Andrey Panin
2004-05-07 8:33 ` [PATCH 3/8] 2.6.3-rc3-mm1, Port sonypi driver to new DMI probing Andrey Panin
2004-05-07 8:33 ` [PATCH 4/8] 2.6.3-rc3-mm1, Port APM BIOS " Andrey Panin
2004-05-07 8:33 ` [PATCH 5/8] 2.6.3-rc3-mm1, Move HP Pavilion and Acer TravelMate 360 irq workarounds where they belong Andrey Panin
2004-05-07 8:33 ` [PATCH 6/8] 2.6.3-rc3-mm1, Port PIIX4 I2C driver to new DMI probing Andrey Panin
2004-05-07 8:33 ` [PATCH 7/8] 2.6.3-rc3-mm1, Port PnP BIOS " Andrey Panin
2004-05-07 8:33 ` [PATCH 8/8] 2.6.3-rc3-mm1, Port powernow-k7 " Andrey Panin
2004-05-07 22:00 ` [PATCH 0/8] 2.6.3-rc3-mm1, Simplify DMI matching data Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox