lkml.org 
[lkml]   [2006]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] i2c-i801: Fix resume when PEC is used
Quoting myself: 
> Anyway, on second thought I believe you're right, the most simple
> approach will be fine for 2.6.17 too. There's little point in trying
> to handle suspend/resume if we don't prevent it from happening in the
> middle of a transaction. Fixing that is beyond the scope of 2.6.17.
>
> I'll send a new patch soon.

Here it is. This must go in 2.6.17.

* * * * *

Fix for bug #6395:
Fail to resume on Tecra M2 with ADM1032 and Intel 82801DBM

The BIOS of the Tecra M2 doesn't like it when it has to reboot or
resume after the i2c-i801 driver has left the SMBus in PEC mode. The
most simple fix is to clear the PEC bit after after every transaction.
That's what this driver was doing up to 2.6.15 (inclusive).

Thanks to Daniele Gaffuri for the very good report.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/i2c/busses/i2c-i801.c | 5 +++++
1 file changed, 5 insertions(+)

--- linux-2.6.16.5.orig/drivers/i2c/busses/i2c-i801.c 2006-03-22 17:07:28.000000000 +0100
+++ linux-2.6.16.5/drivers/i2c/busses/i2c-i801.c 2006-04-17 11:11:06.000000000 +0200
@@ -478,6 +478,11 @@
ret = i801_transaction();
}

+ /* Some BIOSes don't like it when PEC is enabled at reboot or resume
+ time, so we forcibly disable it after every transaction. */
+ if (hwpec)
+ outb_p(0, SMBAUXCTL);
+
if(block)
return ret;
if(ret)


--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-19 13:11    [W:0.055 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site