<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hwmon/applesmc.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-11-28T14:02:02Z</updated>
<entry>
<title>hwmon: (applesmc) Always read until end of data</title>
<updated>2013-11-28T14:02:02Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2013-10-02T17:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83e92c513be4e0c48cd4f6bc458b01a4bba86ce0'/>
<id>urn:sha1:83e92c513be4e0c48cd4f6bc458b01a4bba86ce0</id>
<content type='text'>
commit 25f2bd7f5add608c1d1405938f39c96927b275ca upstream.

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;
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Silence uninitialized warnings</title>
<updated>2013-10-26T20:06:13Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2012-01-26T11:08:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c60ce91cc52e53619bb919ad5ff8891b75c2a4dd'/>
<id>urn:sha1:c60ce91cc52e53619bb919ad5ff8891b75c2a4dd</id>
<content type='text'>
commit 0fc86eca1b338d06ec500b34ef7def79c32b602b upstream.

Some error paths do not set a result, leading to the (false)
assumption that the value may be used uninitialized. Set results for
those paths as well.

Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Check key count before proceeding</title>
<updated>2013-10-26T20:06:06Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2013-09-26T06:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=571d473b0b99c8035fa8df8d1fbbac5b00814bb6'/>
<id>urn:sha1:571d473b0b99c8035fa8df8d1fbbac5b00814bb6</id>
<content type='text'>
commit 5f4513864304672e6ea9eac60583eeac32e679f2 upstream.

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;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Limit key length in warning messages</title>
<updated>2012-07-04T04:44:08Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2012-06-07T08:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51b9f4cbf489c79d02e835f8b0819bb5f86f3660'/>
<id>urn:sha1:51b9f4cbf489c79d02e835f8b0819bb5f86f3660</id>
<content type='text'>
commit ac852edb47b15900886ba2564eeeb13b3b526e3e upstream.

Key lookups may call read_smc() with a fixed-length key string,
and if the lookup fails, trailing stack content may appear in the
kernel log. Fixed with this patch.

Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Properly initialize lockdep attributes</title>
<updated>2011-01-23T17:28:50Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2011-01-22T19:55:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d1f8a40ddab65a5cedb69b369ee4c0c6e4acf6b'/>
<id>urn:sha1:9d1f8a40ddab65a5cedb69b369ee4c0c6e4acf6b</id>
<content type='text'>
The switch to dynamically allocated sysfs attributes left the
internal lockdep members uninitialized, causing a formal bug.
This patch adds sysfs_attr_init() to the node creation function,
remedying the problem.

Reported-and-tested-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Fix checkpatch errors and fix value range checks</title>
<updated>2011-01-08T18:55:46Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2010-11-10T18:42:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bfe814826b7266a489895f731a777f8cbe37963'/>
<id>urn:sha1:2bfe814826b7266a489895f731a777f8cbe37963</id>
<content type='text'>
This patch fixes all checkpatch errors and most of the checkpatch warnings.
It also fixes the range check in applesmc_store_fan_speed().

Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Acked-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Update copyright information</title>
<updated>2011-01-08T18:55:45Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2010-11-09T15:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41e71f97174ba08fcca7f31bf448de92abc8862e'/>
<id>urn:sha1:41e71f97174ba08fcca7f31bf448de92abc8862e</id>
<content type='text'>
With the preceding patches, git blame assigns about half of
the file to the present author. Add a line to the copyright
to reflect this.

Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Silence driver</title>
<updated>2011-01-08T18:55:44Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2010-11-09T15:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b8ad5a57b75322e4b671ef420b5fe90e5154912'/>
<id>urn:sha1:0b8ad5a57b75322e4b671ef420b5fe90e5154912</id>
<content type='text'>
Make the driver report a single line on success.

Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Simplify feature sysfs handling</title>
<updated>2011-01-08T18:55:43Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2010-11-09T15:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b0b5dff8967a4468f05174d0d74e1ed6e369776'/>
<id>urn:sha1:0b0b5dff8967a4468f05174d0d74e1ed6e369776</id>
<content type='text'>
Given the dynamic node construction method, the setup of the
accelerometer, light sensor and keyboard backlight sysfs nodes
can be simplified. This patch does not contain any logic changes.

Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (applesmc) Dynamic creation of fan files</title>
<updated>2011-01-08T18:55:42Z</updated>
<author>
<name>Henrik Rydberg</name>
</author>
<published>2010-11-09T15:15:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3eba2bf7c5fb7863412554cd73646cb80ac293ff'/>
<id>urn:sha1:3eba2bf7c5fb7863412554cd73646cb80ac293ff</id>
<content type='text'>
With the dynamic temperature group in place, the setup of fans
can be simplified. This patch sets up the fans dynamically, removing
a hundred lines of code.

Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
</entry>
</feed>
