hwmon: (dell-smm) Enable broken functionality via "force" module param
authorPali Rohár <pali.rohar@gmail.com>
Sat, 27 Jan 2018 16:22:01 +0000 (17:22 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 27 Jan 2018 17:33:38 +0000 (09:33 -0800)
Some Dell machines are broken and some functionality is disabled. Show
warning into dmesg about this fact and allow user via "force" module param
to override brokenness and enable broken functionality.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/dell-smm-hwmon.c

index c7c9e95e58a83298e57b38c80cccb639ab9e17b3..aef4f8317ae28a0e6abaf66b5816026704906b4e 100644 (file)
@@ -1060,8 +1060,11 @@ static int __init i8k_probe(void)
                        i8k_get_dmi_data(DMI_BIOS_VERSION));
        }
 
-       if (dmi_check_system(i8k_blacklist_fan_type_dmi_table))
-               disallow_fan_type_call = true;
+       if (dmi_check_system(i8k_blacklist_fan_type_dmi_table)) {
+               pr_warn("broken Dell BIOS detected, disallow fan type call\n");
+               if (!force)
+                       disallow_fan_type_call = true;
+       }
 
        strlcpy(bios_version, i8k_get_dmi_data(DMI_BIOS_VERSION),
                sizeof(bios_version));