Skip to contentSkip to conversation

net: stmmac: xgmac: Disable FPE MMC interrupts

PATCH Superseded Furong Xu 3 participants 5 messages Nov 23, 2023

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Furong Xu

author
#0 lore raw

PATCH 1/1 net: stmmac: xgmac: Disable FPE MMC interrupts

Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. Now we disable FPE TX and RX interrupts too.

Fixes aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default")
---
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/stmicro/stmmac/mmc_core.c +4 -0
index ea4910ae0921..cdd7fbde2bfa 100644
@@ -177,8 +177,10 @@
 #define MMC_XGMAC_RX_DISCARD_OCT_GB	0x1b4
 #define MMC_XGMAC_RX_ALIGN_ERR_PKT	0x1bc
 
+#define MMC_XGMAC_FPE_TX_INTR_MASK	0x204
 #define MMC_XGMAC_TX_FPE_FRAG		0x208
 #define MMC_XGMAC_TX_HOLD_REQ		0x20c
+#define MMC_XGMAC_FPE_RX_INTR_MASK	0x224
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR	0x228
 #define MMC_XGMAC_RX_PKT_SMD_ERR	0x22c
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK	0x230
@@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr)
 {
 	writel(0x0, mmcaddr + MMC_RX_INTR_MASK);
 	writel(0x0, mmcaddr + MMC_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK);
 	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK);
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Furong Xu

Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. Now we disable FPE TX and RX interrupts too.

Hi,
Thanks for the patch, one question:
Why do we have to disable them?

Quoted 31 lines
Fixes aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default")
---
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/stmicro/stmmac/mmc_core.c +4 -0
index ea4910ae0921..cdd7fbde2bfa 100644
@@ -177,8 +177,10 @@
 #define MMC_XGMAC_RX_DISCARD_OCT_GB	0x1b4
 #define MMC_XGMAC_RX_ALIGN_ERR_PKT	0x1bc
 
+#define MMC_XGMAC_FPE_TX_INTR_MASK	0x204
 #define MMC_XGMAC_TX_FPE_FRAG		0x208
 #define MMC_XGMAC_TX_HOLD_REQ		0x20c
+#define MMC_XGMAC_FPE_RX_INTR_MASK	0x224
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR	0x228
 #define MMC_XGMAC_RX_PKT_SMD_ERR	0x22c
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK	0x230
@@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr)
 {
 	writel(0x0, mmcaddr + MMC_RX_INTR_MASK);
 	writel(0x0, mmcaddr + MMC_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK);
 	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK);
 }
 
author
#2 lore raw
Quoted 9 lines · On Thu, 23 Nov 2023 11:17:17 +0100 Wojciech Drewek <[email protected]>…
Quoted 3 lines · Furong Xu

Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. Now we disable FPE TX and RX interrupts too.

Hi,
Thanks for the patch, one question:
Why do we have to disable them?

The original commit aeb18dd07692 by Jose Abreu says:

MMC interrupts were being enabled, which is not what we want because it will lead to a storm of interrupts that are not handled at all. Fix it by disabling all MMC interrupts for XGMAC.

Quoted 31 lines
Quoted 31 lines
Fixes aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default")
---
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/stmicro/stmmac/mmc_core.c +4 -0
index ea4910ae0921..cdd7fbde2bfa 100644
@@ -177,8 +177,10 @@
 #define MMC_XGMAC_RX_DISCARD_OCT_GB	0x1b4
 #define MMC_XGMAC_RX_ALIGN_ERR_PKT	0x1bc
 
+#define MMC_XGMAC_FPE_TX_INTR_MASK	0x204
 #define MMC_XGMAC_TX_FPE_FRAG		0x208
 #define MMC_XGMAC_TX_HOLD_REQ		0x20c
+#define MMC_XGMAC_FPE_RX_INTR_MASK	0x224
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR	0x228
 #define MMC_XGMAC_RX_PKT_SMD_ERR	0x22c
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK	0x230
@@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr)
 {
 	writel(0x0, mmcaddr + MMC_RX_INTR_MASK);
 	writel(0x0, mmcaddr + MMC_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK);
 	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK);
 }
 
#3 lore raw
Quoted 13 lines · Furong Xu
Quoted 9 lines · On Thu, 23 Nov 2023 11:17:17 +0100 Wojciech Drewek <[email protected]>…
Quoted 3 lines · Furong Xu

Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. Now we disable FPE TX and RX interrupts too.

Hi,
Thanks for the patch, one question:
Why do we have to disable them?

Quoted 5 lines

The original commit aeb18dd07692 by Jose Abreu says:

MMC interrupts were being enabled, which is not what we want because it will lead to a storm of interrupts that are not handled at all. Fix it by disabling all MMC interrupts for XGMAC.

I would add this information the commit message.

Quoted 33 lines
Quoted 32 lines
Quoted 32 lines
Fixes aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default")
---
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/stmicro/stmmac/mmc_core.c +4 -0
index ea4910ae0921..cdd7fbde2bfa 100644
@@ -177,8 +177,10 @@
 #define MMC_XGMAC_RX_DISCARD_OCT_GB	0x1b4
 #define MMC_XGMAC_RX_ALIGN_ERR_PKT	0x1bc
 
+#define MMC_XGMAC_FPE_TX_INTR_MASK	0x204
 #define MMC_XGMAC_TX_FPE_FRAG		0x208
 #define MMC_XGMAC_TX_HOLD_REQ		0x20c
+#define MMC_XGMAC_FPE_RX_INTR_MASK	0x224
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_ERR	0x228
 #define MMC_XGMAC_RX_PKT_SMD_ERR	0x22c
 #define MMC_XGMAC_RX_PKT_ASSEMBLY_OK	0x230
@@ -352,6 +354,8 @@ static void dwxgmac_mmc_intr_all_mask(void __iomem *mmcaddr)
 {
 	writel(0x0, mmcaddr + MMC_RX_INTR_MASK);
 	writel(0x0, mmcaddr + MMC_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_TX_INTR_MASK);
+	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_FPE_RX_INTR_MASK);
 	writel(MMC_DEFAULT_MASK, mmcaddr + MMC_XGMAC_RX_IPC_INTR_MASK);
 }
 
#4 lore raw
In reply to Furong Xu
Quoted 3 lines · Furong Xu

Commit aeb18dd07692 ("net: stmmac: xgmac: Disable MMC interrupts by default") leaves the FPE(Frame Preemption) MMC interrupts enabled. Now we disable FPE TX and RX interrupts too.

Just adding to Wojciech reply. We should be able to see 'What' a patch does by reading the actual change. What is not always obvious is 'Why?' The commit message should be about the 'Why?", and less about the 'What'.

Andrew