x86: fix reboot problem with Dell Optiplex 745, 0KW626 board
[sfrench/cifs-2.6.git] / arch / x86 / kernel / reboot.c
index 7fd6ac43e4a114a6de9826fe71c7a0cede037c69..484c4a80d38a53217eee32a0c8470d86527c40f6 100644 (file)
@@ -152,6 +152,24 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "0WF810"),
                },
        },
+       {       /* Handle problems with rebooting on Dell Optiplex 745's DFF*/
+               .callback = set_bios_reboot,
+               .ident = "Dell OptiPlex 745",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+                       DMI_MATCH(DMI_BOARD_NAME, "0MM599"),
+               },
+       },
+       {       /* Handle problems with rebooting on Dell Optiplex 745 with 0KW626 */
+               .callback = set_bios_reboot,
+               .ident = "Dell OptiPlex 745",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+                       DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
+               },
+       },
        {       /* Handle problems with rebooting on Dell 2400's */
                .callback = set_bios_reboot,
                .ident = "Dell PowerEdge 2400",
@@ -326,6 +344,10 @@ static inline void kb_wait(void)
        }
 }
 
+void __attribute__((weak)) mach_reboot_fixups(void)
+{
+}
+
 static void native_machine_emergency_restart(void)
 {
        int i;
@@ -337,6 +359,8 @@ static void native_machine_emergency_restart(void)
                /* Could also try the reset bit in the Hammer NB */
                switch (reboot_type) {
                case BOOT_KBD:
+                       mach_reboot_fixups(); /* for board specific fixups */
+
                        for (i = 0; i < 10; i++) {
                                kb_wait();
                                udelay(50);