From 81d52fb22cc95cc1a8fc1001dbac361843da2662 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Mon, 21 May 2018 11:29:25 +1000 Subject: libstb/i2c-driver: Bump max timeout We have observed some TPMs clock streching the I2C bus for signifigant amounts of time when processing commands. The same TPMs also have errata that can result in permernantly locking up a bus in response to an I2C transaction they don't understand. Using an excessively long timeout to prevent this in the field. Signed-off-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- libstb/drivers/tpm_i2c_interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libstb/drivers') diff --git a/libstb/drivers/tpm_i2c_interface.c b/libstb/drivers/tpm_i2c_interface.c index a6342e0..8e5ba32 100644 --- a/libstb/drivers/tpm_i2c_interface.c +++ b/libstb/drivers/tpm_i2c_interface.c @@ -21,7 +21,8 @@ #include "tpm_i2c_interface.h" #include "../status_codes.h" -#define I2C_BYTE_TIMEOUT_MS 30 /* 30ms/byte timeout */ +/* TPMs can clock strech I2C operations for a LOOOOOOONG */ +#define I2C_BYTE_TIMEOUT_MS 2000 /* 2000ms/byte timeout */ /** * tpm_i2c_request_send - send request to i2c bus -- cgit v1.1