All of lore.kernel.org
 help / color / mirror / Atom feed
From: "NG, TZE YEE" <tze.yee.ng@altera.com>
To: Alexandre Mergnat <amergnat@baylibre.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"NG, ADRIAN HO YIN" <adrian.ho.yin.ng@altera.com>,
	"Felix Gu" <ustc.gu@gmail.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Manikanta Guntupalli" <manikanta.guntupalli@amd.com>,
	"Jorge Marques" <jorge.marques@analog.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Przemysław Gaj" <pgaj@cadence.com>,
	"Tommaso Merciai" <tommaso.merciai.xr@bp.renesas.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>
Subject: Re: [PATCH v4 1/3] i3c: master: dw: Report actual GET CCC payload length on success
Date: Fri, 3 Jul 2026 09:09:24 +0000	[thread overview]
Message-ID: <ca7545d9-9738-42af-aa53-397e8909196e@altera.com> (raw)
In-Reply-To: <178290222674.176638.15906284505119583670.b4-review@b4>

On 1/7/2026 6:37 pm, Alexandre Mergnat wrote:
> [You don't often get email from amergnat@baylibre.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> On Tue, 30 Jun 2026 06:20:25 -0700, tze.yee.ng@altera.com <tze.yee.ng@altera.com> 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 <amergnat@baylibre.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: "NG, TZE YEE" <tze.yee.ng@altera.com>
To: Alexandre Mergnat <amergnat@baylibre.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"NG, ADRIAN HO YIN" <adrian.ho.yin.ng@altera.com>,
	"Felix Gu" <ustc.gu@gmail.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Manikanta Guntupalli" <manikanta.guntupalli@amd.com>,
	"Jorge Marques" <jorge.marques@analog.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Przemysław Gaj" <pgaj@cadence.com>,
	"Tommaso Merciai" <tommaso.merciai.xr@bp.renesas.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>
Subject: Re: [PATCH v4 1/3] i3c: master: dw: Report actual GET CCC payload length on success
Date: Fri, 3 Jul 2026 09:09:24 +0000	[thread overview]
Message-ID: <ca7545d9-9738-42af-aa53-397e8909196e@altera.com> (raw)
In-Reply-To: <178290222674.176638.15906284505119583670.b4-review@b4>

On 1/7/2026 6:37 pm, Alexandre Mergnat wrote:
> [You don't often get email from amergnat@baylibre.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> On Tue, 30 Jun 2026 06:20:25 -0700, tze.yee.ng@altera.com <tze.yee.ng@altera.com> 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 <amergnat@baylibre.com>

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
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2026-07-03  9:09 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 13:20 [PATCH v4 0/3] i3c: Improve CCC reliability for DesignWare master tze.yee.ng
2026-06-30 13:20 ` tze.yee.ng
2026-06-30 13:20 ` [PATCH v4 1/3] i3c: master: dw: Report actual GET CCC payload length on success tze.yee.ng
2026-06-30 13:20   ` tze.yee.ng
2026-06-30 13:31   ` sashiko-bot
2026-06-30 13:31     ` sashiko-bot
2026-06-30 17:03   ` Frank Li
2026-06-30 17:03     ` Frank Li
2026-07-01  2:46     ` NG, TZE YEE
2026-07-01  2:46       ` NG, TZE YEE
2026-07-01 10:37   ` Alexandre Mergnat
2026-07-01 10:37     ` Alexandre Mergnat
2026-07-03  9:09     ` NG, TZE YEE [this message]
2026-07-03  9:09       ` NG, TZE YEE
2026-06-30 13:20 ` [PATCH v4 2/3] i3c: master: dw: Map CCC hardware errors to I3C M0/M2 tze.yee.ng
2026-06-30 13:20   ` tze.yee.ng
2026-06-30 13:32   ` sashiko-bot
2026-06-30 13:32     ` sashiko-bot
2026-06-30 17:06     ` Frank Li
2026-06-30 17:06       ` Frank Li
2026-07-01  2:45       ` NG, TZE YEE
2026-07-01  2:45         ` NG, TZE YEE
2026-07-01 10:37   ` Alexandre Mergnat
2026-07-01 10:37     ` Alexandre Mergnat
2026-06-30 13:20 ` [PATCH v4 3/3] i3c: master: Validate GET CCC payload length and retry Direct GET once tze.yee.ng
2026-06-30 13:20   ` tze.yee.ng
2026-06-30 13:41   ` sashiko-bot
2026-06-30 13:41     ` sashiko-bot
2026-06-30 18:48   ` Frank Li
2026-06-30 18:48     ` Frank Li
2026-07-03  8:58     ` NG, TZE YEE
2026-07-03  8:58       ` NG, TZE YEE
2026-07-01 10:37   ` Alexandre Mergnat
2026-07-01 10:37     ` Alexandre Mergnat
2026-07-03  9:16     ` NG, TZE YEE
2026-07-03  9:16       ` NG, TZE YEE

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=ca7545d9-9738-42af-aa53-397e8909196e@altera.com \
    --to=tze.yee.ng@altera.com \
    --cc=Frank.Li@nxp.com \
    --cc=adrian.ho.yin.ng@altera.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=amergnat@baylibre.com \
    --cc=imx@lists.linux.dev \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jorge.marques@analog.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manikanta.guntupalli@amd.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=pgaj@cadence.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tommaso.merciai.xr@bp.renesas.com \
    --cc=ustc.gu@gmail.com \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.