From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: Billy Tsai <billy_tsai@aspeedtech.com>,
<alexandre.belloni@bootlin.com>, <pgaj@cadence.com>,
<miquel.raynal@bootlin.com>, <conor.culhane@silvaco.com>,
<aniketmaurya@google.com>, <Shyam-sundar.S-k@amd.com>,
<jarkko.nikula@linux.intel.com>,
<wsa+renesas@sang-engineering.com>, <xiaopei01@kylinos.cn>,
<Guruvendra.Punugupati@amd.com>, <linux-i3c@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <BMC-SW@aspeedtech.com>
Subject: Re: [PATCH v2 2/2] i3c: mipi-i3c-hci: Use I2C DMA-safe api
Date: Tue, 4 Feb 2025 20:46:26 +0530 [thread overview]
Message-ID: <3ff01e2c-fd48-40cd-b130-a515925418fb@quicinc.com> (raw)
In-Reply-To: <20250204091702.4014466-2-billy_tsai@aspeedtech.com>
Looks good to me !
On 2/4/2025 2:47 PM, Billy Tsai wrote:
> Use the i2c_get/put_dma_safe_msg_buf for I2C transfers instead of using
> the I3C-specific API.
>
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
> ---
> drivers/i3c/master/mipi-i3c-hci/core.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
> index a408feac3e9e..4f3738beb0f2 100644
> --- a/drivers/i3c/master/mipi-i3c-hci/core.c
> +++ b/drivers/i3c/master/mipi-i3c-hci/core.c
> @@ -382,14 +382,11 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
> return -ENOMEM;
>
> for (i = 0; i < nxfers; i++) {
> - xfer[i].data = i2c_xfers[i].buf;
> + xfer[i].data = i2c_get_dma_safe_msg_buf(&i2c_xfers[i], 1);
> xfer[i].data_len = i2c_xfers[i].len;
> xfer[i].rnw = i2c_xfers[i].flags & I2C_M_RD;
> hci->cmd->prep_i2c_xfer(hci, dev, &xfer[i]);
> xfer[i].cmd_desc[0] |= CMD_0_ROC;
> - ret = i3c_hci_alloc_safe_xfer_buf(hci, &xfer[i]);
> - if (ret)
> - goto out;
> }
> last = i - 1;
> xfer[last].cmd_desc[0] |= CMD_0_TOC;
> @@ -412,7 +409,8 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
>
> out:
> for (i = 0; i < nxfers; i++)
> - i3c_hci_free_safe_xfer_buf(hci, &xfer[i]);
> + i2c_put_dma_safe_msg_buf(xfer[i].data, &i2c_xfers[i],
> + ret ? false : true);
>
> hci_free_xfer(xfer, nxfers);
> return ret;
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-02-04 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 9:17 [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API Billy Tsai
2025-02-04 9:17 ` [PATCH v2 2/2] i3c: mipi-i3c-hci: Use I2C DMA-safe api Billy Tsai
2025-02-04 15:16 ` Mukesh Kumar Savaliya [this message]
2025-02-05 11:28 ` Jarkko Nikula
2025-02-05 16:51 ` Frank Li
2025-02-04 9:50 ` [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API Thomas Weißschuh
2025-02-04 10:09 ` Billy Tsai
2025-02-04 16:50 ` Thomas Weißschuh
2025-02-04 16:56 ` Alexandre Belloni
2025-02-17 9:57 ` wsa+renesas
2025-02-05 16:50 ` Frank Li
2025-02-20 22:09 ` Alexandre Belloni
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=3ff01e2c-fd48-40cd-b130-a515925418fb@quicinc.com \
--to=quic_msavaliy@quicinc.com \
--cc=BMC-SW@aspeedtech.com \
--cc=Guruvendra.Punugupati@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=alexandre.belloni@bootlin.com \
--cc=aniketmaurya@google.com \
--cc=billy_tsai@aspeedtech.com \
--cc=conor.culhane@silvaco.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=pgaj@cadence.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=xiaopei01@kylinos.cn \
/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