From: Asmaa Mnebhi <asmaa@nvidia.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Asmaa Mnebhi <asmaa@nvidia.com>
Subject: [PATCH v2 3/9] i2c-mlxbf.c: incorrect base address passed during io write
Date: Mon, 22 Aug 2022 15:57:19 -0400 [thread overview]
Message-ID: <20220822195725.12656-4-asmaa@nvidia.com> (raw)
In-Reply-To: <20220822195725.12656-1-asmaa@nvidia.com>
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: b5b5b32081cd206b (i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC)
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
---
drivers/i2c/busses/i2c-mlxbf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 087a70981283..da0bdbd66e2e 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -662,7 +662,7 @@ static int mlxbf_i2c_smbus_enable(struct mlxbf_i2c_priv *priv, u8 slave,
/* Clear status bits. */
writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_STATUS);
/* Set the cause data. */
- writel(~0x0, priv->smbus->io + MLXBF_I2C_CAUSE_OR_CLEAR);
+ writel(~0x0, priv->mst_cause->io + MLXBF_I2C_CAUSE_OR_CLEAR);
/* Zero PEC byte. */
writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_PEC);
/* Zero byte count. */
--
2.30.1
next prev parent reply other threads:[~2022-08-22 19:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 19:57 [PATCH v2 0/9] i2c-mlxbf.c: bug fixes and new feature support Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 1/9] i2c-mlxbf.c: Fix frequency calculation Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 2/9] i2c-mlxbf.c: remove IRQF_ONESHOT Asmaa Mnebhi
2022-08-22 19:57 ` Asmaa Mnebhi [this message]
2022-08-22 19:57 ` [PATCH v2 4/9] i2c-mlxbf: prevent stack overflow in mlxbf_i2c_smbus_start_transaction() Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 5/9] i2c-mlxbf.c: support lock mechanism Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 6/9] i2c-mlxbf.c: Update SPDX license Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 7/9] i2c-mlxbf: add multi slave functionality Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 8/9] i2c-mlxbf.c: support BlueField-3 SoC Asmaa Mnebhi
2022-08-22 19:57 ` [PATCH v2 9/9] i2c-mlxbf.c: Update binding devicetree Asmaa Mnebhi
2022-08-29 20:19 ` [PATCH v2 0/9] i2c-mlxbf.c: bug fixes and new feature support Wolfram Sang
2022-08-29 20:46 ` Asmaa Mnebhi
2022-09-07 21:37 ` Wolfram Sang
2022-09-07 21:42 ` Asmaa Mnebhi
2022-09-07 21:56 ` Wolfram Sang
2022-09-08 17:38 ` Asmaa Mnebhi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220822195725.12656-4-asmaa@nvidia.com \
--to=asmaa@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).