aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichiic/ig4_iic.c
diff options
context:
space:
mode:
authorAllan Jude <allanjude@FreeBSD.org>2021-02-18 15:47:17 +0000
committerAllan Jude <allanjude@FreeBSD.org>2021-02-18 15:47:17 +0000
commit37ef8d4cd6b570c0882e97826df961a5d6003d07 (patch)
tree7db5b20596a0ccb81216ee3f7a0798dba81c252d /sys/dev/ichiic/ig4_iic.c
parent0577e39bec76b23aa099b68d5d1c832cc3823c38 (diff)
downloadsrc-37ef8d4cd6b570c0882e97826df961a5d6003d07.tar.gz
src-37ef8d4cd6b570c0882e97826df961a5d6003d07.zip
ig4(4): Increase timeout to about 1 second
Per the i2c spec, a slave device can stretch SCL idefinitely, so 25ms is a bit arbitrary in general. smbus does specify an optional timeout recovery mechanism to be done at about 25~35ms, but the IPMI SSIF spec says that BMCs don't have any obligation to implement that. The BMC on Altra seems to mostly respond within 25ms, but occasionally will stretch SCL for ~300 msec. Also, the count_us mechanism seems to actually timeout around 25% earlier than it would claim (timeout really happening around 19ms instead of 25ms). Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D28747
Diffstat (limited to 'sys/dev/ichiic/ig4_iic.c')
-rw-r--r--sys/dev/ichiic/ig4_iic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c
index b684dc7d87cd..4781154f03c8 100644
--- a/sys/dev/ichiic/ig4_iic.c
+++ b/sys/dev/ichiic/ig4_iic.c
@@ -267,7 +267,7 @@ wait_intr(ig4iic_softc_t *sc, uint32_t intr)
int error;
int txlvl = -1;
u_int count_us = 0;
- u_int limit_us = 25000; /* 25ms */
+ u_int limit_us = 1000000; /* 1sec */
for (;;) {
/*