Prevent repeated resets on new variants of the VIA Pro (KT800).

This is done by not taking care of additional status bits. This is a
backport from Linux 2.6.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2953 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2005-03-27 12:38:59 +00:00
1 parent 5204524572
commit 09804db12d
1 file changed
+9 -8
+9 -8
View File
@@ -119,12 +119,12 @@ static int vt596_transaction(void)
inb_p(SMBHSTDAT1));
/* Make sure the SMBus host is ready to start transmitting */
if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
dev_dbg(&vt596_adapter, "SMBus busy (0x%02x). "
"Resetting...\n", temp);
outb_p(temp, SMBHSTSTS);
if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
dev_dbg(&vt596_adapter, "Failed! (0x%02x)\n", temp);
return -1;
@@ -166,13 +166,14 @@ static int vt596_transaction(void)
dev_dbg(&vt596_adapter, "Error: no response!\n");
}
if (inb_p(SMBHSTSTS) != 0x00)
outb_p(inb(SMBHSTSTS), SMBHSTSTS);
if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
dev_dbg(&vt596_adapter, "Failed reset at end of "
"transaction (%02x)\n", temp);
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
outb_p(temp, SMBHSTSTS);
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
dev_warn(&vt596_adapter, "Failed reset at end "
"of transaction (%02x)\n", temp);
}
}
dev_dbg(&vt596_adapter, "Transaction (post): CNT=%02x, CMD=%02x, "
"ADD=%02x, DAT0=%02x, DAT1=%02x\n", inb_p(SMBHSTCNT),
inb_p(SMBHSTCMD), inb_p(SMBHSTADD), inb_p(SMBHSTDAT0),