Skip to content

Commit 2a5be6d

Browse files
Asmaa Mnebhiwsakernel
authored andcommitted
i2c: mlxbf: incorrect base address passed during io write
Correct the base address used during io write. This bug had no impact over the overall functionality of the read and write transactions. MLXBF_I2C_CAUSE_OR_CLEAR=0x18 so writing to (smbus->io + 0x18) instead of (mst_cause->ioi + 0x18) actually writes to the sc_low_timeout register which just sets the timeout value before a read/write aborts. Fixes: b5b5b32 (i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC) Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com> Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 9d55e7b commit 2a5be6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-mlxbf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ static int mlxbf_i2c_smbus_enable(struct mlxbf_i2c_priv *priv, u8 slave,
669669
/* Clear status bits. */
670670
writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_STATUS);
671671
/* Set the cause data. */
672-
writel(~0x0, priv->smbus->io + MLXBF_I2C_CAUSE_OR_CLEAR);
672+
writel(~0x0, priv->mst_cause->io + MLXBF_I2C_CAUSE_OR_CLEAR);
673673
/* Zero PEC byte. */
674674
writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_PEC);
675675
/* Zero byte count. */

0 commit comments

Comments
 (0)