lkml.org 
[lkml]   [2012]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH] applesmc: Bump max wait and rearrange udelay
On Mon, Sep 17, 2012 at 02:06:05PM -0400, Parag Warudkar wrote:
>
>
> On Mon, 17 Sep 2012, Henrik Rydberg wrote:
>
> > The current patch does exactly the same sleeps, the only difference is
> > that the test is also done before the first sleep. Thus, the increased
> > delay, if any, comes from the sleep range.
> My understanding is that the original patch resulted in trying a
> max udelay(16). The new one does usleep_range(16, 32). That's a minimum 16
> max 32 - so the fact that it stops read failures means the added delay is
> present and does help.

So the question is, does this patch work equally well for you?

Henrik

diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 2827088..8bf9011 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -56,7 +56,7 @@
/* wait up to 32 ms for a status change. */
#define APPLESMC_MIN_WAIT 0x0010
#define APPLESMC_RETRY_WAIT 0x0100
-#define APPLESMC_MAX_WAIT 0x8000
+#define APPLESMC_MAX_WAIT 0x10000

#define APPLESMC_READ_CMD 0x10
#define APPLESMC_WRITE_CMD 0x11

\
 
 \ /
  Last update: 2012-09-17 21:21    [W:0.086 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site