mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
i3c: master: amd: Report direct CCC read length in payload.actual_len
The I3C core expects master drivers to leave payload.len unchanged and
report the number of bytes received on GET CCCs via payload.actual_len.
The AMD driver was overwriting payload.len after direct read CCCs.
Set payload.actual_len from the directed command's rx_actual in
xi3c_master_send_direct_ccc_cmd() instead of modifying payload.len.
Fixes:629a6ddd1d9a ("i3c: master: Add driver for AMD AXI
I3C master controller")
Signed-off-by: Shubham Patil <shubhamsanjay.patil@amd.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260908111207.3274407-1-shubhamsanjay.patil@amd.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
9b347cbde8
commit
bf9ec06c90
|
|
@ -806,8 +806,8 @@ static int xi3c_master_send_direct_ccc_cmd(struct xi3c_master *master,
|
|||
|
||||
/* Report actual byte count so the core sees the right length on short reads */
|
||||
if (!ret && ccc->rnw)
|
||||
ccc->dests[0].payload.len = min(xfer->cmds[1].rx_actual,
|
||||
ccc->dests[0].payload.len);
|
||||
ccc->dests[0].payload.actual_len = min(xfer->cmds[1].rx_actual,
|
||||
ccc->dests[0].payload.len);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user