Hi Jean,
On Wed, Sep 12, 2012 at 11:07 PM, Jean Delvare
Hi Al,
Le mardi 11 septembre 2012 à 16:19 +0800, Cho, Yu-Chen a écrit :
From: Henrik Rydberg
Subject: [PATCH] hwmon: (applesmc) Shorten minimum wait time Git-commit: a332bf9a65ab34b01226ed177f6937af843c8465 Patch-mainline: v3.6-rc1~120^2~4 Reference: bnc#779487 Date: Mon, 9 Jul 2012 12:10:26 +0200 The 2012 series of MacBooks have a faster SMC, and the current driver timings do not work at all. Tests show that decreasing the minimum wait time, from 64 us to 16 us, works well. Since this is still larger than the original minimum of 10 us used before 2008, there is nothing inherently problematic with changing it. The fail frequency on older machines seems to increase slightly, but not enough to be noticeable.
Tested on MBA11, MBA31, MBA5,2, MBP9,2.
The patch was originally written by adamski99 (ubuntuforums.org) and later tested by janhouse (bbs.archlinux.org).
Signed-off-by: Henrik Rydberg
Signed-off-by: Guenter Roeck Acked-by: Cho, Yu-Chen --- drivers/hwmon/applesmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 0162f55..f41585e 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -54,7 +54,7 @@ #define APPLESMC_MAX_DATA_LENGTH 32
/* wait up to 32 ms for a status change. */ -#define APPLESMC_MIN_WAIT 0x0040 +#define APPLESMC_MIN_WAIT 0x0010 #define APPLESMC_MAX_WAIT 0x8000
#define APPLESMC_STATUS_MASK 0x0f
No objection, but I think, if we pick this patch, we also have to pick:
commit 829917cd7246204d6c5f066c40b66d2b62d0930d Author: Henrik Rydberg
Date: Fri Jul 27 20:12:46 2012 +0200 hwmon: (applesmc) Decode and act on read/write status codes
Otherwise I'm afraid we'll get regressions on older models.
yes, exactly. btw, I pick this patch because that patch : hwmon: (applesmc) Shorten minimum wait time is easy to be found in /var/log/message. I will pick it to test on my machine, then push to opensuse-kernel, and I guess we may need more patches for hwmon(applesmc) or others. Thanks for your reminder. Cheers, AL -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org