From: Adrian Hunter <adrian.hunter@intel.com>
To: "Jorge Marques" <jorge.marques@analog.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Frank Li" <Frank.Li@nxp.com>,
"Przemysław Gaj" <pgaj@cadence.com>
Cc: <linux-i3c@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH 5/5] i3c: master: adi: Return xfer->ret at send CCC
Date: Tue, 10 Mar 2026 21:15:25 +0200 [thread overview]
Message-ID: <4c9037bc-52ee-466a-83e4-113496cad016@intel.com> (raw)
In-Reply-To: <20260308-ad4062-positive-error-fix-v1-5-72d3c5290b4a@analog.com>
On 08/03/2026 18:47, Jorge Marques wrote:
> Return the xfer-> ret error code at adi_i3c_master_send_ccc_cmd to
> propagate the adi_i3c_master_end_xfer_locked value. In particular, if
> any of the Mx values are present in the sent commands, returns -EIO.
Isn't this also a bug fix. I suggest a fixes tag and
better commit message e.g.
i3c: master: adi: Fix missing error propagation for CCC commands
adi_i3c_master_send_ccc_cmd() always returned 0, ignoring the transfer
result populated in the completion path. As a consequence, CCC command
errors - such as those reported by adi_i3c_master_end_xfer_locked() - were
silently dropped.
Fix this by returning xfer->ret so that callers correctly receive any
transfer error codes.
By the way, I don't see an error code being set in the timeout case?
>
> Signed-off-by: Jorge Marques <jorge.marques@analog.com>
> ---
> drivers/i3c/master/adi-i3c-master.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c
> index fb9a48830446..047081c9f064 100644
> --- a/drivers/i3c/master/adi-i3c-master.c
> +++ b/drivers/i3c/master/adi-i3c-master.c
> @@ -361,7 +361,7 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
>
> cmd->err = adi_i3c_cmd_get_err(&xfer->cmds[0]);
>
> - return 0;
> + return xfer->ret;
> }
>
> static int adi_i3c_master_i3c_xfers(struct i3c_dev_desc *dev,
>
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2026-03-10 19:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 16:47 [PATCH 0/5] Fix paths unexpectedly returning Mx error codes Jorge Marques
2026-03-08 16:47 ` [PATCH 1/5] i3c: master: Move rstdaa error suppression Jorge Marques
2026-03-09 11:39 ` Adrian Hunter
2026-03-09 12:17 ` Jorge Marques
2026-03-09 12:34 ` Adrian Hunter
2026-03-10 8:05 ` Jorge Marques
2026-03-10 19:13 ` Adrian Hunter
2026-03-10 19:13 ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 2/5] i3c: master: Move entdaa " Jorge Marques
2026-03-10 19:13 ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 3/5] i3c: master: Move bus_init " Jorge Marques
2026-03-10 19:14 ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 4/5] i3c: master: Negative error codes at send_ccc_cmd Jorge Marques
2026-03-10 19:14 ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 5/5] i3c: master: adi: Return xfer->ret at send CCC Jorge Marques
2026-03-10 19:15 ` Adrian Hunter [this message]
2026-03-12 15:50 ` Jorge Marques
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=4c9037bc-52ee-466a-83e4-113496cad016@intel.com \
--to=adrian.hunter@intel.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=dan.carpenter@linaro.org \
--cc=jic23@kernel.org \
--cc=jorge.marques@analog.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgaj@cadence.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