Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i8k: Stop reading SMM BIOS version during driver probe

This doesn't work on Studio, XPS, Vostro, and Precision laptops,
and it doesn't provide any value except to cause confusion when
it does not work. Drop it and always use DMI BIOS version instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Guenter Roeck and committed by
Greg Kroah-Hartman
e551b152 26d09382

+2 -40
+2 -40
drivers/char/i8k.c
··· 44 44 #define I8K_SMM_GET_TEMP 0x10a3 45 45 #define I8K_SMM_GET_DELL_SIG1 0xfea3 46 46 #define I8K_SMM_GET_DELL_SIG2 0xffa3 47 - #define I8K_SMM_BIOS_VERSION 0x00a6 48 47 49 48 #define I8K_FAN_MULT 30 50 49 #define I8K_MAX_TEMP 127 ··· 207 208 } 208 209 209 210 /* 210 - * Read the bios version. Return the version as an integer corresponding 211 - * to the ascii value, for example "A17" is returned as 0x00413137. 212 - */ 213 - static int i8k_get_bios_version(void) 214 - { 215 - struct smm_regs regs = { .eax = I8K_SMM_BIOS_VERSION, }; 216 - 217 - return i8k_smm(&regs) ? : regs.eax; 218 - } 219 - 220 - /* 221 211 * Read the Fn key status. 222 212 */ 223 213 static int i8k_get_fn_status(void) ··· 343 355 344 356 switch (cmd) { 345 357 case I8K_BIOS_VERSION: 346 - val = i8k_get_bios_version(); 358 + val = (bios_version[0] << 16) | 359 + (bios_version[1] << 8) | bios_version[2]; 347 360 break; 348 361 349 362 case I8K_MACHINE_ID: ··· 706 717 */ 707 718 static int __init i8k_probe(void) 708 719 { 709 - char buff[4]; 710 - int version; 711 720 const struct dmi_system_id *id; 712 721 713 722 /* ··· 733 746 pr_err("unable to get SMM Dell signature\n"); 734 747 if (!force) 735 748 return -ENODEV; 736 - } 737 - 738 - /* 739 - * Get SMM BIOS version. 740 - */ 741 - version = i8k_get_bios_version(); 742 - if (version <= 0) { 743 - pr_warn("unable to get SMM BIOS version\n"); 744 - } else { 745 - buff[0] = (version >> 16) & 0xff; 746 - buff[1] = (version >> 8) & 0xff; 747 - buff[2] = (version) & 0xff; 748 - buff[3] = '\0'; 749 - /* 750 - * If DMI BIOS version is unknown use SMM BIOS version. 751 - */ 752 - if (!dmi_get_system_info(DMI_BIOS_VERSION)) 753 - strlcpy(bios_version, buff, sizeof(bios_version)); 754 - 755 - /* 756 - * Check if the two versions match. 757 - */ 758 - if (strncmp(buff, bios_version, sizeof(bios_version)) != 0) 759 - pr_warn("BIOS version mismatch: %s != %s\n", 760 - buff, bios_version); 761 749 } 762 750 763 751 i8k_fan_mult = fan_mult;