i2c-i801: Fix block transaction poll loops

Two of the three poll loops have the poll and sleep swapped,
causing an extra sleep to occur after the polled condition is
fulfilled. In practice, this doubles the amount of sleep time for
every block transaction.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4059 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-06-23 18:39:51 +00:00
1 parent 4538a94a5f
commit d98d0c0185
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ lm_sensors CHANGES file
(2.6 backport)
Module i2c-i801: Disable PEC mode after every transaction (2.6 backport)
Add ICH8 support (2.6 backport)
Fix block transaction poll loops (2.6 backport)
Module i2c-nforce2: Add nForce4 MCP51, MCP55 support (2.6 backport)
Module i2c-piix4: Add ServerWorks HT-1000 support (2.6 backport)
Add ATI IXP200, IXP300, IXP400 support (2.6 backport)
+2 -2
View File
@@ -393,8 +393,8 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
/* We will always wait for a fraction of a second! */
timeout = 0;
do {
temp = inb_p(SMBHSTSTS);
i2c_delay(1);
temp = inb_p(SMBHSTSTS);
}
while ((!(temp & 0x80))
&& (timeout++ < MAX_TIMEOUT));
@@ -457,8 +457,8 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
/* wait for INTR bit as advised by Intel */
timeout = 0;
do {
temp = inb_p(SMBHSTSTS);
i2c_delay(1);
temp = inb_p(SMBHSTSTS);
} while ((!(temp & 0x02))
&& (timeout++ < MAX_TIMEOUT));