Skip to content

Commit

Permalink
i2c: rcar: clear NO_RXDMA flag after resetting
Browse files Browse the repository at this point in the history
[ Upstream commit fea6b5e ]

We should allow RXDMA only if the reset was really successful, so clear
the flag after the reset call.

Fixes: 0e864b5 ("i2c: rcar: reset controller is mandatory for Gen3+")
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Wolfram Sang authored and gregkh committed Jul 18, 2024
1 parent 41f62c9 commit 2907dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,

/* Gen3+ needs a reset. That also allows RXDMA once */
if (priv->devtype >= I2C_RCAR_GEN3) {
priv->flags &= ~ID_P_NO_RXDMA;
ret = rcar_i2c_do_reset(priv);
if (ret)
goto out;
priv->flags &= ~ID_P_NO_RXDMA;
}

rcar_i2c_init(priv);
Expand Down

0 comments on commit 2907dd5

Please sign in to comment.