aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-04-20 05:43:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-20 10:54:04 -0400
commitc79cfbaccac0ef81ab3e796da1582a83dcef0ff9 (patch)
treeb5b5eaf90c1bc1043073fd1ba76feb99f1232131 /drivers/i2c
parent7daa0c4f51897d5d956a62a2bac438e3b58d85dc (diff)
[PATCH] i2c-i801: Fix resume when PEC is used
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> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-i801.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 8e0f3158215f..dfca74933625 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -478,6 +478,11 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
478 ret = i801_transaction(); 478 ret = i801_transaction();
479 } 479 }
480 480
481 /* Some BIOSes don't like it when PEC is enabled at reboot or resume
482 time, so we forcibly disable it after every transaction. */
483 if (hwpec)
484 outb_p(0, SMBAUXCTL);
485
481 if(block) 486 if(block)
482 return ret; 487 return ret;
483 if(ret) 488 if(ret)