<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/hwmon, branch v3.12</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>hwmon: (applesmc) Always read until end of data</title>
<updated>2013-10-09T16:48:55+00:00</updated>
<author>
<name>Henrik Rydberg</name>
<email>rydberg@euromail.se</email>
</author>
<published>2013-10-02T17:15:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=25f2bd7f5add608c1d1405938f39c96927b275ca'/>
<id>25f2bd7f5add608c1d1405938f39c96927b275ca</id>
<content type='text'>
The crash reported and investigated in commit 5f4513 turned out to be
caused by a change to the read interface on newer (2012) SMCs.

Tests by Chris show that simply reading the data valid line is enough
for the problem to go away. Additional tests show that the newer SMCs
no longer wait for the number of requested bytes, but start sending
data right away.  Apparently the number of bytes to read is no longer
specified as before, but instead found out by reading until end of
data. Failure to read until end of data confuses the state machine,
which eventually causes the crash.

As a remedy, assuming bit0 is the read valid line, make sure there is
nothing more to read before leaving the read function.

Tested to resolve the original problem, and runtested on MBA3,1,
MBP4,1, MBP8,2, MBP10,1, MBP10,2. The patch seems to have no effect on
machines before 2012.

Tested-by: Chris Murphy &lt;chris@cmurf.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The crash reported and investigated in commit 5f4513 turned out to be
caused by a change to the read interface on newer (2012) SMCs.

Tests by Chris show that simply reading the data valid line is enough
for the problem to go away. Additional tests show that the newer SMCs
no longer wait for the number of requested bytes, but start sending
data right away.  Apparently the number of bytes to read is no longer
specified as before, but instead found out by reading until end of
data. Failure to read until end of data confuses the state machine,
which eventually causes the crash.

As a remedy, assuming bit0 is the read valid line, make sure there is
nothing more to read before leaving the read function.

Tested to resolve the original problem, and runtested on MBA3,1,
MBP4,1, MBP8,2, MBP10,1, MBP10,2. The patch seems to have no effect on
machines before 2012.

Tested-by: Chris Murphy &lt;chris@cmurf.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Check key count before proceeding</title>
<updated>2013-09-26T10:48:43+00:00</updated>
<author>
<name>Henrik Rydberg</name>
<email>rydberg@euromail.se</email>
</author>
<published>2013-09-26T06:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5f4513864304672e6ea9eac60583eeac32e679f2'/>
<id>5f4513864304672e6ea9eac60583eeac32e679f2</id>
<content type='text'>
After reports from Chris and Josh Boyer of a rare crash in applesmc,
Guenter pointed at the initialization problem fixed below. The patch
has not been verified to fix the crash, but should be applied
regardless.

Reported-by: &lt;jwboyer@fedoraproject.org&gt;
Suggested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After reports from Chris and Josh Boyer of a rare crash in applesmc,
Guenter pointed at the initialization problem fixed below. The patch
has not been verified to fix the crash, but should be applied
regardless.

Reported-by: &lt;jwboyer@fedoraproject.org&gt;
Suggested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (k10temp) remove unnecessary pci_set_drvdata()</title>
<updated>2013-09-12T15:17:40+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-09-12T06:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0b77f766f3ef9875e2bb0035c9b89b4f9469b78d'/>
<id>0b77f766f3ef9875e2bb0035c9b89b4f9469b78d</id>
<content type='text'>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (tmp421) Fix return value</title>
<updated>2013-09-11T20:01:41+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-09-11T04:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=010a166a5202f6297e196624a0671c4815032e38'/>
<id>010a166a5202f6297e196624a0671c4815032e38</id>
<content type='text'>
Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Andre Prendel &lt;andre.prendel@gmx.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Andre Prendel &lt;andre.prendel@gmx.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (amc6821) Remove redundant break</title>
<updated>2013-09-11T20:01:40+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-09-11T04:19:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=17a52100b03864b5e58fb45ec6b42d4fd81c4808'/>
<id>17a52100b03864b5e58fb45ec6b42d4fd81c4808</id>
<content type='text'>
'break' after return or goto has no effect. Remove it.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: T. Mertelj &lt;tomaz.mertelj@guest.arnes.si&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'break' after return or goto has no effect. Remove it.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: T. Mertelj &lt;tomaz.mertelj@guest.arnes.si&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (amc6821) Fix return value</title>
<updated>2013-09-11T20:01:40+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-09-11T04:19:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3499e5b2e14b792fe411302fea3b6fcc4ba40ef2'/>
<id>3499e5b2e14b792fe411302fea3b6fcc4ba40ef2</id>
<content type='text'>
Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: T. Mertelj &lt;tomaz.mertelj@guest.arnes.si&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: T. Mertelj &lt;tomaz.mertelj@guest.arnes.si&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ibmaem) Fix return value</title>
<updated>2013-09-11T20:01:32+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-09-11T04:19:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=12ca0b569eac0bf8389b3eac74ba1d7e9f624ab8'/>
<id>12ca0b569eac0bf8389b3eac74ba1d7e9f624ab8</id>
<content type='text'>
Propagate appropriate error code obtained from ipmi_create_user()
instead of hardcoding.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Acked-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Propagate appropriate error code obtained from ipmi_create_user()
instead of hardcoding.

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Acked-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (emc2103) Fix return value</title>
<updated>2013-09-11T20:01:31+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2013-09-11T04:19:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1a3abbd0b9a16e40fd4718f99896c437a193c0a1'/>
<id>1a3abbd0b9a16e40fd4718f99896c437a193c0a1</id>
<content type='text'>
kstrtol() returns appropriate error values. Use those instead of
hardcoding. Silences several sparse messages of following type:
"why not propagate 'result' from kstrtol() instead of (-22)?"

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kstrtol() returns appropriate error values. Use those instead of
hardcoding. Silences several sparse messages of following type:
"why not propagate 'result' from kstrtol() instead of (-22)?"

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ina2xx) Remove casting the return value which is a void pointer</title>
<updated>2013-09-10T13:28:31+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-09-09T05:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8876dd78d9f0cd317d55dc19e5cd17194af15b52'/>
<id>8876dd78d9f0cd317d55dc19e5cd17194af15b52</id>
<content type='text'>
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (hwmon-vid) Add __maybe_unused attribute to dummy variable</title>
<updated>2013-09-10T13:28:17+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2013-09-09T02:31:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=98128de30f4bb2adc29028fdd5839de83bc4bcff'/>
<id>98128de30f4bb2adc29028fdd5839de83bc4bcff</id>
<content type='text'>
This gets rid of this warning:

drivers/hwmon/hwmon-vid.c: In function 'get_via_model_d_vrm':
drivers/hwmon/hwmon-vid.c:249:27: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gets rid of this warning:

drivers/hwmon/hwmon-vid.c: In function 'get_via_model_d_vrm':
drivers/hwmon/hwmon-vid.c:249:27: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
