summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2024-07-10 13:03:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-18 13:07:44 +0200
commit9877f867929d49c53a9c913d1f6c43f0f02c4cdf (patch)
tree419b99cc722e42e31575ba94fcaed4018730e50d
parent7e44655c1fc5fc22cc714721943bd82407eeda1c (diff)
downloadlinux-9877f867929d49c53a9c913d1f6c43f0f02c4cdf.tar.gz
linux-9877f867929d49c53a9c913d1f6c43f0f02c4cdf.tar.bz2
linux-9877f867929d49c53a9c913d1f6c43f0f02c4cdf.zip
i2c: rcar: clear NO_RXDMA flag after resetting
[ Upstream commit fea6b5ebb71a2830b042e42de7ae255017ac3ce8 ] We should allow RXDMA only if the reset was really successful, so clear the flag after the reset call. Fixes: 0e864b552b23 ("i2c: rcar: reset controller is mandatory for Gen3+") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/i2c/busses/i2c-rcar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index e24ced623c9a..1b5ea222f4c6 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -835,10 +835,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);