We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04d76ce commit c580ea8Copy full SHA for c580ea8
drivers/i2c/busses/i2c-aspeed.c
@@ -693,13 +693,16 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
693
694
if (time_left == 0) {
695
/*
696
- * If timed out and bus is still busy in a multi master
697
- * environment, attempt recovery at here.
+ * In a multi-master setup, if a timeout occurs, attempt
+ * recovery. But if the bus is idle, we still need to reset the
698
+ * i2c controller to clear the remaining interrupts.
699
*/
700
if (bus->multi_master &&
701
(readl(bus->base + ASPEED_I2C_CMD_REG) &
702
ASPEED_I2CD_BUS_BUSY_STS))
703
aspeed_i2c_recover_bus(bus);
704
+ else
705
+ aspeed_i2c_reset(bus);
706
707
708
* If timed out and the state is still pending, drop the pending
0 commit comments