提交 c79cfbac 编写于 作者: J Jean Delvare 提交者: Linus Torvalds

[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: NJean Delvare <khali@linux-fr.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 7daa0c4f
...@@ -478,6 +478,11 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr, ...@@ -478,6 +478,11 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
ret = i801_transaction(); 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) if(block)
return ret; return ret;
if(ret) if(ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册