aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanley Chu <[email protected]>2025-03-18 05:36:05 +0000
committerAlexandre Belloni <[email protected]>2025-03-18 16:14:35 +0000
commitc06acf7143bddaa3c0f7bedd8b99e48f6acb85c3 (patch)
tree78c9f2f8859eb39170aa0e3bd19ac264889769ec
parenti3c: master: svc: Fix missing the IBI rules (diff)
downloadkernel-c06acf7143bddaa3c0f7bedd8b99e48f6acb85c3.tar.gz
kernel-c06acf7143bddaa3c0f7bedd8b99e48f6acb85c3.zip
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: [email protected] Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") Signed-off-by: Stanley Chu <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
-rw-r--r--drivers/i3c/master/svc-i3c-master.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index a72ba5a7edd4..57b9dec6b5a8 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -425,7 +425,7 @@ static int svc_i3c_master_handle_ibi(struct svc_i3c_master *master,
slot->len < SVC_I3C_FIFO_SIZE) {
mdatactrl = readl(master->regs + SVC_I3C_MDATACTRL);
count = SVC_I3C_MDATACTRL_RXCOUNT(mdatactrl);
- readsl(master->regs + SVC_I3C_MRDATAB, buf, count);
+ readsb(master->regs + SVC_I3C_MRDATAB, buf, count);
slot->len += count;
buf += count;
}