Re: [PATCH v4 1/3] i3c: master: dw: Report actual GET CCC payload length on success
"NG, TZE YEE" <[email protected]> Fri, 3 Jul 2026 09:09:24 +0000
| Newsgroups | org.infradead.lists.linux-i3c,dev.linux.lists.imx,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 1/7/2026 6:37 pm, Alexandre Mergnat wrote: > [You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > 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]> Hi Alexandre, You are right — that was an unintentional regression in v4, not a deliberate move. actual_len belongs only in dw_i3c_ccc_get(); putting it in dw_i3c_ccc_set() left GET CCCs with actual_len == 0. v5 moves it back to dw_i3c_ccc_get() so patch 2 matches its title and works on its own. Thanks for pointing it out. Tze Yee -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c