summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-02-06 18:55:36 -0800
committerGuenter Roeck <linux@roeck-us.net>2015-03-15 08:54:18 -0700
commit25cdd99deb927c2753759ead21710303c499a4e0 (patch)
treecec61ccd6659b31070a26053ffe4a9dbf2e591d0 /drivers
parentd2a14ea51a4d7e506b2ebac2c57a32ad577ed693 (diff)
downloadlinux-25cdd99deb927c2753759ead21710303c499a4e0.tar.bz2
hwmon: (nct6775) 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 <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/nct6775.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 0445a52379e7..4fcb48103299 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/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"
@@ -3199,6 +3200,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;