Skip to content
Commit 4d64bb4b authored by Brad Campbell's avatar Brad Campbell Committed by Guenter Roeck
Browse files

hwmon: (applesmc) Re-work SMC comms



Commit fff2d0f7 ("hwmon: (applesmc) avoid overlong udelay()")
introduced an issue whereby communication with the SMC became
unreliable with write errors like :

[  120.378614] applesmc: send_byte(0x00, 0x0300) fail: 0x40
[  120.378621] applesmc: LKSB: write data fail
[  120.512782] applesmc: send_byte(0x00, 0x0300) fail: 0x40
[  120.512787] applesmc: LKSB: write data fail

The original code appeared to be timing sensitive and was not reliable
with the timing changes in the aforementioned commit.

This patch re-factors the SMC communication to remove the timing
dependencies and restore function with the changes previously
committed.

Tested on : MacbookAir6,2 MacBookPro11,1 iMac12,2, MacBookAir1,1,
MacBookAir3,1

Fixes: fff2d0f7 ("hwmon: (applesmc) avoid overlong udelay()")
Reported-by: default avatarAndreas Kemnade <andreas@kemnade.info>
Tested-by: Andreas Kemnade <andreas@kemnade.info> # MacBookAir6,2
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarBrad Campbell <brad@fnarfbargle.com>
Signed-off-by: default avatarHenrik Rydberg <rydberg@bitmath.org>
Link: https://lore.kernel.org/r/194a7d71-a781-765a-d177-c962ef296b90@fnarfbargle.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent fd8feec6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment