Re: [PATCH 5/5] i3c: master: adi: Return xfer->ret at send CCC
From: Jorge Marques
Date: Thu Mar 12 2026 - 11:55:37 EST
On Tue, Mar 10, 2026 at 09:15:25PM +0200, Adrian Hunter wrote:
> 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?
>
Hi Adrian, when the xfer is allocated, the default xfer->ret value is
set to -ETIMEDOUT, so un-queuing retains this value and is (with this
patch) returned.
Regards,
Jorge