From 11329122351ff6f0b276b7288051bc2264ad0ea3 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 12 Feb 2015 21:46:22 -0800 Subject: [PATCH] Enable auxiliary fan monitoring on ASRock Z77 Pro4-M Auxiliary fan monitoring is not enabled on ASRock Z77 Pro4-M with BIOS version 2.00 if booted in UEFI Ultra-FastBoot mode. Signed-off-by: Guenter Roeck --- nct6775.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nct6775.c b/nct6775.c index 49cbfad..cbf086e 100644 --- a/nct6775.c +++ b/nct6775.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include "lm75.h" #include "compat.h" @@ -3218,6 +3219,26 @@ 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); + + if (board_name && board_vendor && + !strcmp(board_vendor, "ASRock")) { + /* + * Auxiliary fan monitoring is not enabled on ASRock + * Z77 Pro4-M if booted in UEFI Ultra-FastBoot mode. + * Observed with BIOS version 2.00. + */ + if (!strcmp(board_name, "Z77 Pro4-M")) { + if ((data->sio_reg_enable & 0xe0) != 0xe0) { + data->sio_reg_enable |= 0xe0; + superio_outb(sioreg, SIO_REG_ENABLE, + data->sio_reg_enable); + } + } + } if (data->sio_reg_enable & 0x80) fan3pin = gpok; -- 2.39.2