[PATCH v5 3/5] i3c: use actual_len for read transfers

Adrian Hunter adrian.hunter at intel.com
Mon Sep 28 03:42:56 PDT 2026


On 25/09/2026 18:25, Frank Li wrote:
> On Mon, Sep 21, 2026 at 11:06:01PM +0000, Sam Agazaryan wrote:
>> Currently only the amd and svc I3C controller drivers populate
>> i3c_xfer.actual_len on reads, while dw-i3c-master and mipi-i3c-hci
>> overwrite i3c_xfer.len with the received byte count and leave actual_len
>> as 0. Because of this inconsistency, mctp-i3c reads xfer.len instead of
>> xfer.actual_len, making it fail on controllers that do not mutate len.
>>
>> Unify read length reporting across the subsystem:
>> - Clarify in <linux/i3c/device.h> that actual_len reflects the actual
>>   number of bytes transferred on reads.
>> - Update adi, cdns, dw, mipi-i3c-hci, and renesas controller drivers to
>>   populate actual_len on read transfers without mutating len.
>> - Update mctp-i3c to read xfer.actual_len instead of xfer.len.
>>
>> Co-developed-by: Meagan Lloyd <meaganlloyd at linux.microsoft.com>
>> Signed-off-by: Meagan Lloyd <meaganlloyd at linux.microsoft.com>
>> Signed-off-by: Sam Agazaryan <samagazaryan at google.com>
>> ---
>>  drivers/i3c/master/adi-i3c-master.c    |  5 ++++-
>>  drivers/i3c/master/dw-i3c-master.c     |  2 +-
>>  drivers/i3c/master/i3c-master-cdns.c   |  5 ++++-
>>  drivers/i3c/master/mipi-i3c-hci/core.c |  2 +-
>>  drivers/i3c/master/renesas-i3c.c       |  3 +++
>>  drivers/net/mctp/mctp-i3c.c            | 10 +++++-----
> 
> There are not dependence, suppose mctp-i3c.c change go through other tree
> It'd better use sperate patch to fix it.

Isn't mctp-i3c.c dependent on the len -> actual_len change in
any of the master drivers?




More information about the linux-i3c mailing list