All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "hwmon: (it87) Ensure that pwm control cache is current before updating values" has been added to the 4.10-stable tree
@ 2017-03-08 10:26 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-08 10:26 UTC (permalink / raw)
  To: linux, gregkh, kfolz; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    hwmon: (it87) Ensure that pwm control cache is current before updating values

to the 4.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwmon-it87-ensure-that-pwm-control-cache-is-current-before-updating-values.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 82dbe987b70042b340f851bdc969a971081e5f02 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 8 Feb 2017 14:02:59 -0800
Subject: hwmon: (it87) Ensure that pwm control cache is current before updating values

From: Guenter Roeck <linux@roeck-us.net>

commit 82dbe987b70042b340f851bdc969a971081e5f02 upstream.

If sensor attributes were never read, the pwm control data has not been
initiialized, which can cause wrong driver behavior. Ensure that cached
data is current before acting on it.

Reported-by: Kevin Folz <kfolz@evertz.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hwmon/it87.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -1354,6 +1354,7 @@ static ssize_t set_pwm(struct device *de
 		return -EINVAL;
 
 	mutex_lock(&data->update_lock);
+	it87_update_pwm_ctrl(data, nr);
 	if (has_newer_autopwm(data)) {
 		/*
 		 * If we are in automatic mode, the PWM duty cycle register
@@ -1466,6 +1467,7 @@ static ssize_t set_pwm_temp_map(struct d
 	}
 
 	mutex_lock(&data->update_lock);
+	it87_update_pwm_ctrl(data, nr);
 	data->pwm_temp_map[nr] = reg;
 	/*
 	 * If we are in automatic mode, write the temp mapping immediately;


Patches currently in stable-queue which might be from linux@roeck-us.net are

queue-4.10/hwmon-it87-ensure-that-pwm-control-cache-is-current-before-updating-values.patch
queue-4.10/hwmon-it87-do-not-overwrite-bit-2..6-of-pwm-control-registers.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-08 10:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 10:26 Patch "hwmon: (it87) Ensure that pwm control cache is current before updating values" has been added to the 4.10-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.