Skip to contentSkip to conversation

i3c: master: adi: fix number of bytes written to fifo

PATCH In review [email protected] 3 participants 3 messages Sep 24, 2025 – Sep 25, 2025

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 i3c: master: adi: fix number of bytes written to fifo

From: Alexandre Belloni <[email protected]>

adi_i3c_master_wr_to_tx_fifo computes the maximum number of bytes that can be sent to the fifo but never makes use of it, actually limit the number of bytes sent.

---
 drivers/i3c/master/adi-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/adi-i3c-master.c +1 -1
index 18597ba1f1c3..82ac0b3d057a 100644
@@ -135,7 +135,7 @@ static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
 
 	n = readl(master->regs + REG_SDO_FIFO_ROOM);
 	m = min(n, nbytes);
-	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, nbytes);
+	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, m);
 }
 
 static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Wed, Sep 24, 2025 at 09:56:00PM +0200, [email protected] wrote:

From: Alexandre Belloni <[email protected]>

adi_i3c_master_wr_to_tx_fifo computes the maximum number of bytes that can be sent to the fifo but never makes use of it, actually limit the number of bytes sent.

---

Quoted 19 lines
 drivers/i3c/master/adi-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/adi-i3c-master.c +1 -2
index 18597ba1f1c3..82ac0b3d057a 100644
@@ -135,7 +135,7 @@ static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
 
 	n = readl(master->regs + REG_SDO_FIFO_ROOM);
 	m = min(n, nbytes);
-	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, nbytes);
+	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, m);
 }
 
 static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,
--

2.51.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 18 lines · On Wed, Sep 24, 2025 at 09:56:00PM +0200, [email protected] wrote:

From: Alexandre Belloni <[email protected]>

adi_i3c_master_wr_to_tx_fifo computes the maximum number of bytes that can be sent to the fifo but never makes use of it, actually limit the number of bytes sent.

---
 drivers/i3c/master/adi-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/adi-i3c-master.c +0 -0
index 18597ba1f1c3..82ac0b3d057a 100644

drivers/i3c/master/adi-i3c-master.c static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master, · line 139

Quoted 6 lines
drivers/i3c/master/adi-i3c-master.c +1 -1
@@ -135,7 +135,7 @@ static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
 
 	n = readl(master->regs + REG_SDO_FIFO_ROOM);
 	m = min(n, nbytes);
-	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, nbytes);
+	i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, m);
 }
Quoted 5 lines
drivers/i3c/master/adi-i3c-master.c +0 -0
 static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,
Signature · 1 line
2.51.0