From: Guenter Roeck Date: Sat, 7 Feb 2015 02:59:34 +0000 (-0800) Subject: Enable fan 3-5 on ASRock Z77 Pro4-M X-Git-Url: https://git.sur5r.net/?p=groeck-nct6775;a=commitdiff_plain;h=ad00077d680fba0530befe9e9ebb94ea090ce9ed;hp=8ec9699a1bc4e90f4642efcb68127800ced79591 Enable fan 3-5 on ASRock Z77 Pro4-M 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 --- diff --git a/nct6775.c b/nct6775.c index 0e81050..198fc46 100644 --- a/nct6775.c +++ b/nct6775.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #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)