diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-11-17 17:04:11 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-11-20 20:35:24 -0600 |
commit | c2e404aedd52da91fdf605e24b9d1ae7894974c5 (patch) | |
tree | 5245c107365536846da4d8aa4dea6b6db4255324 /include | |
parent | e947593a38a15d4e80a108ae90a8fa9066d20837 (diff) | |
download | skiboot-c2e404aedd52da91fdf605e24b9d1ae7894974c5.zip skiboot-c2e404aedd52da91fdf605e24b9d1ae7894974c5.tar.gz skiboot-c2e404aedd52da91fdf605e24b9d1ae7894974c5.tar.bz2 |
p8-i2c: Limit number of retry attempts
Current we will attempt to start an I2C transaction until it succeeds.
In the event that the OCC does not release the lock on an I2C bus this
results in an async token being held forever and the kernel thread that
started the transaction will block forever while waiting for an async
completion message. Fix this by limiting the number of attempts to
start the transaction.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/i2c.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h index 669c30a..28c7628 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -64,6 +64,7 @@ struct i2c_request { void (*completion)( /* Completion callback */ int rc, struct i2c_request *req); void *user_data; /* Client data */ + int retries; }; /* Generic i2c */ |