Skip to content

Commit c06acf7

Browse files
stanleychuysalexandrebelloni
authored andcommitted
i3c: master: svc: Use readsb helper for reading MDB
The target can send the MDB byte followed by additional data bytes. The readl on MRDATAB reads one actual byte, but the readsl advances the destination pointer by 4 bytes. This causes the subsequent payload to be copied to wrong position in the destination buffer. Cc: stable@kernel.org Fixes: dd3c528 ("i3c: master: svc: Add Silvaco I3C master driver") Signed-off-by: Stanley Chu <yschu@nuvoton.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250318053606.3087121-3-yschu@nuvoton.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 9cecad1 commit c06acf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i3c/master/svc-i3c-master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static int svc_i3c_master_handle_ibi(struct svc_i3c_master *master,
425425
slot->len < SVC_I3C_FIFO_SIZE) {
426426
mdatactrl = readl(master->regs + SVC_I3C_MDATACTRL);
427427
count = SVC_I3C_MDATACTRL_RXCOUNT(mdatactrl);
428-
readsl(master->regs + SVC_I3C_MRDATAB, buf, count);
428+
readsb(master->regs + SVC_I3C_MRDATAB, buf, count);
429429
slot->len += count;
430430
buf += count;
431431
}

0 commit comments

Comments
 (0)