]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 15:29:37 +0000 (08:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 15:29:37 +0000 (08:29 -0700)
added patches:
thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch

queue-3.14/series
queue-3.14/thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch [new file with mode: 0644]

index f873d9afccc370f91086137b4399cf9a1f9b74ab..e7ee22794716b802c52fec0509f73a6fe51f1b95 100644 (file)
@@ -20,3 +20,4 @@ genirq-devres-fix-testing-return-value-of-request_any_context_irq.patch
 leds-pm-fix-hibernation-on-arm-when-gpio-led-used-with-cpu-led-trigger.patch
 mtd-fix-avoid-race-condition-when-accessing-mtd-usecount.patch
 mtd-dc21285-use-raw-spinlock-functions-for-nw_gpio_lock.patch
+thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch
diff --git a/queue-3.14/thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch b/queue-3.14/thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch
new file mode 100644 (file)
index 0000000..de2482f
--- /dev/null
@@ -0,0 +1,37 @@
+From 26bb0e9a1a938ec98ee07aa76533f1a711fba706 Mon Sep 17 00:00:00 2001
+From: Lukasz Majewski <l.majewski@samsung.com>
+Date: Wed, 24 Sep 2014 10:27:10 +0200
+Subject: thermal: step_wise: fix: Prevent from binary overflow when trend is dropping
+
+From: Lukasz Majewski <l.majewski@samsung.com>
+
+commit 26bb0e9a1a938ec98ee07aa76533f1a711fba706 upstream.
+
+It turns out that some boards can have instance->lower greater than 0 and
+when thermal trend is dropping it results with next_target equal to -1.
+
+Since the next_target is defined as unsigned long it is interpreted as
+0xFFFFFFFF and larger than instance->upper.
+As a result the next_target is set to instance->upper which ramps up to
+maximal cooling device target when the temperature is steadily decreasing.
+
+Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Cc: Mason <slash.tmp@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/thermal/step_wise.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/thermal/step_wise.c
++++ b/drivers/thermal/step_wise.c
+@@ -76,7 +76,7 @@ static unsigned long get_target_state(st
+                       next_target = instance->upper;
+               break;
+       case THERMAL_TREND_DROPPING:
+-              if (cur_state == instance->lower) {
++              if (cur_state <= instance->lower) {
+                       if (!throttle)
+                               next_target = THERMAL_NO_TARGET;
+               } else {