Skip to content

Commit

Permalink
libstb/i2c-driver: Bump max timeout
Browse files Browse the repository at this point in the history
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 <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
(cherry picked from commit 81d52fb)
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
oohal authored and stewartsmith committed May 23, 2018
1 parent ed21a75 commit 652c0dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libstb/drivers/tpm_i2c_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 652c0dd

Please sign in to comment.