Re: [PATCH v4 1/3] i3c: master: dw: Report actual GET CCC payload length on success
Alexandre Mergnat <[email protected]>
| Newsgroups | org.infradead.lists.linux-i3c,dev.linux.lists.imx,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <178290222674.176638.15906284505119583670.b4-review@b4> |
On Tue, 30 Jun 2026 06:20:25 -0700, [email protected] <[email protected]> wrote: > diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c > index a7593d6efac5..4a984a5be264 100644 > --- a/drivers/i3c/master/dw-i3c-master.c > +++ b/drivers/i3c/master/dw-i3c-master.c > @@ -742,7 +742,10 @@ static int dw_i3c_ccc_set(struct dw_i3c_master *master, > dw_i3c_master_dequeue_xfer(master, xfer); > > ret = xfer->ret; > - if (xfer->cmds[0].error == RESPONSE_ERROR_IBA_NACK) > + cmd = &xfer->cmds[0]; > + if (!ret) > + ccc->dests[0].payload.actual_len = cmd->rx_len; In v3 this assignment lived in dw_i3c_ccc_get(); in v4 it has moved into dw_i3c_ccc_set(), the write (SET) path. GET CCCs are dispatched to dw_i3c_ccc_get() (dw_i3c_master_send_ccc_cmd() calls dw_i3c_ccc_get() when ccc->rnw is set), so as it stands actual_len is only written for writes - where cmd->rx_len is the count of un-sent bytes, normally 0 - and stays 0 for the GET CCCs this commit targets (patch 2 later moves it back into dw_i3c_ccc_get()). Was there a reason for moving it in v4? As-is it reads like a regression; keeping it in dw_i3c_ccc_get() would make the patch match its title and work on its own. -- Alexandre Mergnat <[email protected]> -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c