#include <linux/pnpbios.h>
#include <linux/device.h>
#include <linux/pnp.h>
-#include <asm/page.h>
-#include <asm/system.h>
#include <linux/mm.h>
#include <linux/smp.h>
-#include <asm/desc.h>
#include <linux/slab.h>
#include <linux/kmod.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
+#include <linux/dmi.h>
+
+#include <asm/page.h>
+#include <asm/desc.h>
#include <asm/system.h>
#include <asm/byteorder.h>
/* only one standardized param to hotplug command: type */
argv [0] = hotplug_path;
argv [1] = "dock";
- argv [2] = 0;
+ argv [2] = NULL;
/* minimal command environment */
envp [i++] = "HOME=/";
envp [i++] = scratch;
scratch += sprintf (scratch, "DOCK=%x/%x/%x",
info->location_id, info->serial, info->capabilities);
- envp[i] = 0;
+ envp[i] = NULL;
value = call_usermodehelper (argv [0], argv, envp, 0);
kfree (buf);
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;
}