summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2006-06-23 18:39:51 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2006-06-23 18:39:51 +0000
commita5185b4d55cb01d4bd85a6df8c8da5f938b5a740 (patch)
treecfa2e9692cda64bdb28805b24414ea4d66e8497e
parentb448fbeb428759228b4c69425e77de380717a97d (diff)
downloadlm-sensors-a5185b4d55cb01d4bd85a6df8c8da5f938b5a740.tar.gz
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
-rw-r--r--CHANGES1
-rw-r--r--kernel/busses/i2c-i801.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 8d8d915f..4b050819 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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)
diff --git a/kernel/busses/i2c-i801.c b/kernel/busses/i2c-i801.c
index ed72d27a..a53c9ec0 100644
--- a/kernel/busses/i2c-i801.c
+++ b/kernel/busses/i2c-i801.c
@@ -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));