[PATCH 03/12] net: rswitch: Initialize RX DMA descriptor .die_dt field to DT_FEMPTY
    Marek Vasut 
    marek.vasut+renesas at mailbox.org
       
    Mon Oct 27 17:45:33 CET 2025
    
    
  
Empty RX DMA descriptor must contain .die_dt field set to DT_FEMPTY,
because hardware DMA overwrites this field to non-DT_FEMPTY when data
are received, and the .recv callback tests the content of RX descriptor
.die_dt field to determine whether hardware did receive any data and
updated the .die_dt field, and based on that information, receives a
packet or not. Fix the incorrect RX DMA descriptor initialization to
assure the .recv callback always works correctly.
Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Jerome Forissier <jerome.forissier at linaro.org>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
Cc: Ramon Fried <rfried.dev at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
 drivers/net/rswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/rswitch.c b/drivers/net/rswitch.c
index 3f9052e0a89..f787aa4180d 100644
--- a/drivers/net/rswitch.c
+++ b/drivers/net/rswitch.c
@@ -601,7 +601,7 @@ static void rswitch_rx_desc_init(struct rswitch_port_priv *priv)
 	priv->rx_desc_index = 0;
 
 	for (i = 0; i < RSWITCH_NUM_RX_DESC; i++) {
-		priv->rx_desc[i].data.die_dt = DT_EEMPTY;
+		priv->rx_desc[i].data.die_dt = DT_FEMPTY;
 		priv->rx_desc[i].data.info_ds = PKTSIZE_ALIGN;
 		packet_addr = (uintptr_t)priv->rx_desc[i].packet;
 		priv->rx_desc[i].data.dptrl = lower_32_bits(packet_addr);
-- 
2.51.0
    
    
More information about the U-Boot
mailing list