diff -urNp linux-760/arch/i386/kernel/apm.c linux-850/arch/i386/kernel/apm.c --- linux-760/arch/i386/kernel/apm.c +++ linux-850/arch/i386/kernel/apm.c @@ -868,6 +868,8 @@ recalc: idle_percentage *= 100; idle_percentage /= jiffies_since_last_check; use_apm_idle = (idle_percentage > idle_threshold); + if (apm_info.forbid_idle) + use_apm_idle = 0; last_jiffies = jiffies; last_stime = current->times.tms_stime; } diff -urNp linux-760/arch/i386/kernel/dmi_scan.c linux-850/arch/i386/kernel/dmi_scan.c --- linux-760/arch/i386/kernel/dmi_scan.c +++ linux-850/arch/i386/kernel/dmi_scan.c @@ -303,6 +303,32 @@ static __init int apm_is_horked(struct d return 0; } +static __init int apm_is_horked_d850md(struct dmi_blacklist *d) +{ + if (apm_info.disabled == 0) + { + apm_info.disabled = 1; + printk(KERN_ERR "%s machine detected. Disabling APM.\n", d->ident); + printk(KERN_ERR "This bug is fixed in bios P15 which is available for \n"); + printk(KERN_ERR "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_blacklist *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, @@ -423,10 +449,10 @@ static __init int swab_apm_power_in_minu extern int skip_ioapic_setup; static __init int broken_pirq(struct dmi_blacklist *d) { - printk(KERN_INFO " *** Possibly defective BIOS detected (irqtable)\n"); - printk(KERN_INFO " *** Many BIOSes matching this signature have incorrect IRQ routing tables.\n"); - printk(KERN_INFO " *** If you see IRQ problems, in paticular SCSI resets and hangs at boot\n"); - printk(KERN_INFO " *** contact your hardware vendor and ask about updates.\n"); + printk(KERN_ERR " *** Possibly defective BIOS detected (irqtable)\n"); + printk(KERN_ERR " *** Many BIOSes matching this signature have incorrect IRQ routing tables.\n"); + printk(KERN_ERR " *** If you see IRQ problems, in particular SCSI resets and hangs at boot\n"); + printk(KERN_ERR " *** contact your hardware vendor and ask about updates.\n"); printk(KERN_INFO " *** Building an SMP kernel may evade the bug some of the time.\n"); #ifdef CONFIG_X86_IO_APIC skip_ioapic_setup = 0; @@ -528,17 +554,47 @@ static __initdata struct dmi_blacklist d MATCH(DMI_PRODUCT_NAME, "KT7-RAID"), NO_MATCH, NO_MATCH, NO_MATCH } }, + { disable_ide_dma, "Dell Inspiron 8100", { /* Kill DMA on Dell Inspiron 8100 laptops */ + MATCH(DMI_PRODUCT_NAME, "Inspiron 8100"), + MATCH(DMI_SYS_VENDOR,"Dell Computer Corporation"), NO_MATCH, NO_MATCH + } }, + #endif + /* Dell Laptop hall of shame */ { 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 } }, + { 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") + } }, + { 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") + } }, + { 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 + } }, + { 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 + } }, { 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 } }, + + /* other items */ { 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"), @@ -559,16 +615,11 @@ static __initdata struct dmi_blacklist d MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"), NO_MATCH, NO_MATCH } }, - { set_bios_reboot, "Dell PowerEdge 2400", { /* Handle problems with rebooting on Dell 300/800's */ + { 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, "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 - } }, { set_apm_ints, "Compaq 12XL125", { /* Allow interrupts during suspend on Compaq Laptops*/ MATCH(DMI_SYS_VENDOR, "Compaq"), MATCH(DMI_PRODUCT_NAME, "Compaq PC"), @@ -590,7 +641,7 @@ static __initdata struct dmi_blacklist d MATCH(DMI_BIOS_VERSION, "Version1.01"), NO_MATCH, NO_MATCH, } }, - { apm_is_horked, "Intel D850MD", { /* APM crashes */ + { 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, @@ -613,6 +664,12 @@ static __initdata struct dmi_blacklist d MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), 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"), + 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-"), @@ -734,22 +791,32 @@ static __initdata struct dmi_blacklist d } }, { broken_pirq, "l44GX Bios", { /* Bad $PIR */ MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), + MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0066.P07"), + NO_MATCH, NO_MATCH + } }, + { broken_pirq, "IBM xseries 370", { /* Bad $PIR */ + MATCH(DMI_BIOS_VENDOR, "IBM"), + MATCH(DMI_BIOS_VERSION,"MMKT33AUS"), + NO_MATCH, NO_MATCH + } }, + { broken_pirq, "l44GX Bios", { /* Bad $PIR */ + MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0094.P10"), NO_MATCH, NO_MATCH } }, { broken_pirq, "l44GX Bios", { /* Bad $PIR */ MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0120.P12"), + MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0115.P12"), NO_MATCH, NO_MATCH } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ + { broken_pirq, "l44GX Bios", { /* Bad $PIR */ MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0125.P13"), + MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0120.P12"), NO_MATCH, NO_MATCH - } }, + } }, { broken_pirq, "l44GX Bios", { /* Bad $PIR */ MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0066.P07.9906041405"), + MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0125.P13"), NO_MATCH, NO_MATCH } }, diff -urNp linux-760/include/linux/apm_bios.h linux-850/include/linux/apm_bios.h --- linux-760/include/linux/apm_bios.h 2001-08-14 01:39:28.000000000 +0200 +++ linux-850/include/linux/apm_bios.h @@ -54,6 +54,7 @@ struct apm_info { int get_power_status_broken; int get_power_status_swabinminutes; int allow_ints; + int forbid_idle; int realmode_power_off; int disabled; }; --- linux-2.4.20/arch/i386/kernel/dmi_scan.c~ 2003-02-06 14:34:13.000000000 +0100 +++ linux-2.4.20/arch/i386/kernel/dmi_scan.c 2003-02-06 14:34:13.000000000 +0100 @@ -692,6 +692,11 @@ 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"),