Skip to content
Commit 1bf68c17 authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Greg Kroah-Hartman
Browse files

i2c: sprd: use a specific timeout to avoid system hang up issue



commit 0b884fe7 upstream.

If the i2c device SCL bus being pulled up due to some exception before
message transfer done, the system cannot receive the completing interrupt
signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOUT
jiffies eclipse, that would make the system seemed hang up. To avoid that
happen, this patch adds a specific timeout for message transfer.

Fixes: 8b9ec071 ("i2c: Add Spreadtrum I2C controller driver")
Signed-off-by: default avatarLinhua Xu <linhua.xu@unisoc.com>
Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@unisoc.com>
[wsa: changed errno to ETIMEDOUT]
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15d97f9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment