Skip to content

Commit 621c6ab

Browse files
Asmaa Mnebhigregkh
authored andcommitted
i2c: mlxbf: incorrect base address passed during io write
[ Upstream commit 2a5be6d ] 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 <[email protected]> Signed-off-by: Asmaa Mnebhi <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent c242dbf commit 621c6ab

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)