]> git.sur5r.net Git - groeck-nct6775/commitdiff
Enable fan 3-5 on ASRock Z77 Pro4-M
authorGuenter Roeck <linux@roeck-us.net>
Sat, 7 Feb 2015 02:59:34 +0000 (18:59 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 7 Feb 2015 02:59:34 +0000 (18:59 -0800)
ASRock Z77 Pro4-M BIOS version 2.00 is known to not enable fan 3 to 5
if booted in UEFI Ultra-FastBoot mode.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
nct6775.c

index 0e8105087f537d9a76864cad5547125e663e9ef0..198fc46762e8b6e2996c1133f9066a7ab6d47271 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -57,6 +57,7 @@
 #include <linux/err.h>
 #include <linux/mutex.h>
 #include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/io.h>
 #include "lm75.h"
 #include "compat.h"
@@ -3215,10 +3216,27 @@ nct6775_check_fan_inputs(struct nct6775_data *data)
                pwm6pin = false;
        } else if (data->kind == nct6776) {
                bool gpok = superio_inb(sioreg, 0x27) & 0x80;
+               const char *board_vendor, *board_name;
+
+               board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+               board_name = dmi_get_system_info(DMI_BOARD_NAME);
 
                superio_select(sioreg, NCT6775_LD_HWM);
                regval = superio_inb(sioreg, SIO_REG_ENABLE);
 
+               /*
+                * ASRock Z77 Pro4-M is known to not enable fan 3..5
+                * if booted in UEFI Ultra-FastBoot mode.
+                */
+               if (!strcmp(board_vendor, "ASRock") &&
+                   !strcmp(board_name, "Z77 Pro4-M")) {
+                       if ((regval & 0xe0) != 0xe0) {
+                               pr_warn("Enabling Fans 3-5\n");
+                               regval |= 0xe0;
+                               superio_outb(sioreg, SIO_REG_ENABLE, regval);
+                       }
+               }
+
                data->sio_enable = regval;
 
                if (regval & 0x80)