]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (k10temp) Only apply temperature offset if result is positive
authorGuenter Roeck <linux@roeck-us.net>
Thu, 8 Feb 2018 01:49:39 +0000 (17:49 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 12 Feb 2018 22:23:29 +0000 (14:23 -0800)
commitba4260b8805a1b7d1ad10565d542173c9682c9f9
treee1cebfb6a7d6c71f0e0539864129dcdbb2569468
parentbcac507057f6668c45308343ba41f4c91a086136
hwmon: (k10temp) Only apply temperature offset if result is positive

A user reports a really bad temperature on Ryzen 1950X.

k10temp-pci-00cb
Adapter: PCI adapter
temp1: +4294948.3°C (high = +70.0°C)

This will happen if the temperature reported by the chip is lower than
the offset temperature. This has been seen in the field if "Sense MI Skew"
and/or "Sense MI Offset" BIOS parameters were set to unexpected values.
Let's report a temperature of 0 degrees C in that case.

Fixes: 1f1a44a518f3 ("hwmon: (k10temp) Add support for temperature offsets")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/k10temp.c