@@ -699,12 +699,16 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
if (time_left == 0) {
/*
* If timed out and bus is still busy in a multi master
- * environment, attempt recovery at here.
+ * environment, attempt recovery at here. Even the bus is
+ * idle, we still need reset i2c controller avoid rest of
+ * interrupts.
*/
if (bus->multi_master &&
(readl(bus->base + ASPEED_I2C_CMD_REG) &
ASPEED_I2CD_BUS_BUSY_STS))
aspeed_i2c_recover_bus(bus);
+ else
+ aspeed_i2c_reset(bus);
/*
* If timed out and the state is still pending, drop the pending
1.Call i2c controller reset when the i2c transfer timeout occurred. The rest of interrupts and device should be reset avoid unperdicted controller behavior occurred. Signed-off-by: Tommy Huang <tommy_huang@aspeedtech.com> --- drivers/i2c/busses/i2c-aspeed.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)