X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fpnp%2Fpnpbios%2Fcore.c;h=6c9866346ac369ff3e31955965e9f363faef5a1a;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=dd1bbb89c8419043df2f2c64353356aa32876680;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index dd1bbb89c..6c9866346 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -129,7 +130,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info) /* 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=/"; @@ -152,7 +153,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info) 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); @@ -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; }