Thread (4 messages) 4 messages, 3 authors, 2026-03-06

Re: [PATCH net] net: enetc: safely reinitialize TX BD ring when it has unsent frames

From: Frank Li <Frank.Li@nxp.com>
Date: 2026-03-06 16:49:18
Also in: imx, lkml

From: Frank Li (AI-BOT) <frank.li@nxp.com>
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_hw.h b/drivers/net/ethernet/freescale/enetc/enetc4_hw.h
index 3ed0f7a02767..1ce6551e186c 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc4_hw.h
+++ b/drivers/net/ethernet/freescale/enetc/enetc4_hw.h
@@ -134,6 +134,12 @@

 /* Port operational register */
 #define ENETC4_POR			0x4100
+#define  POR_TXDIS			BIT(0)
+#define  POR_RXDIS			BIT(1)
+
+/* Port status register */
+#define ENETC4_PSR			0x4100
+#define  PSR_RX_BUSY			BIT(1)
AI: ENETC4_PSR and ENETC4_POR both defined as 0x4100. Likely a typo; check
the hardware spec for the correct offset of ENETC4_PSR.
+	while (!(enetc_port_rd(&si->hw, ENETC4_PM_IEVENT(mac)) &
+		 PM_IEVENT_RX_EMPTY)) {
+		if (timeout >= 100) {
+			dev_warn(&si->pdev->dev,
+				 "MAC %d RX is not empty\n", mac);
+			break;
+		};
AI: Stray semicolon after closing brace; remove it.

Frank
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help