devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac
@ 2023-08-09 16:49 Jisheng Zhang
  2023-08-09 16:49 ` [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac Jisheng Zhang
                   ` (9 more replies)
  0 siblings, 10 replies; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:49 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

This series add below new features to xgmac:

correct RX COE parsing
add more feature parsing from hw cap
enlarge C22 ADDR and rx/tx channels
support parse safety ce/ue irq from DT
support per channel irq

Since v2:
 - check per channel irq by (res->rx_irq[0] > 0 && res->tx_irq[0] > 0)
   rather than (res->rx_irq[0] && res->tx_irq[0])
 - bypass if (irq <= 0) when request rx/tx irq

Since v1:
 - remove "_irq" suffix from safety irqs dt binding
 - remove "snps,per-channel-interrupt" dt binding, check the channel irq
   instead.
 - more renaming about "msi" to reflect per channel irq isn't MSI
   specific


Jisheng Zhang (10):
  net: stmmac: correct RX COE parsing for xgmac
  net: stmmac: xgmac: add more feature parsing from hw cap
  net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31
  net: stmmac: enlarge max rx/tx queues and channels to 16
  net: stmmac: reflect multi irqs for tx/rx channels and mac and safety
  net: stmmac: xgmac: support per-channel irq
  dt-bindings: net: snps,dwmac: add safety irq support
  net: stmmac: platform: support parsing safety irqs from DT
  dt-bindings: net: snps,dwmac: add per channel irq support
  net: stmmac: platform: support parsing per channel irq from DT

 .../devicetree/bindings/net/snps,dwmac.yaml   | 37 ++++++++++++
 .../net/ethernet/stmicro/stmmac/dwmac-intel.c |  4 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |  2 +-
 .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |  5 ++
 .../ethernet/stmicro/stmmac/dwxgmac2_core.c   |  5 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    | 37 +++++++-----
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 58 ++++++++++---------
 .../net/ethernet/stmicro/stmmac/stmmac_mdio.c |  2 +-
 .../ethernet/stmicro/stmmac/stmmac_platform.c | 35 +++++++++++
 include/linux/stmmac.h                        | 10 ++--
 10 files changed, 142 insertions(+), 53 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
@ 2023-08-09 16:49 ` Jisheng Zhang
  2023-08-10 13:45   ` Alexandre TORGUE
  2023-08-09 16:49 ` [PATCH net-next v3 02/10] net: stmmac: xgmac: add more feature parsing from hw cap Jisheng Zhang
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:49 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

xgmac can support RX COE, but there's no two kinds of COE, I.E type 1
and type 2 COE.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index e1f1c034d325..15ed3947361b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6271,7 +6271,7 @@ static int stmmac_dma_cap_show(struct seq_file *seq, void *v)
 	seq_printf(seq, "\tAV features: %s\n", (priv->dma_cap.av) ? "Y" : "N");
 	seq_printf(seq, "\tChecksum Offload in TX: %s\n",
 		   (priv->dma_cap.tx_coe) ? "Y" : "N");
-	if (priv->synopsys_id >= DWMAC_CORE_4_00) {
+	if (priv->synopsys_id >= DWMAC_CORE_4_00 || priv->plat->has_xgmac) {
 		seq_printf(seq, "\tIP Checksum Offload in RX: %s\n",
 			   (priv->dma_cap.rx_coe) ? "Y" : "N");
 	} else {
@@ -7013,7 +7013,7 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
 	if (priv->plat->rx_coe) {
 		priv->hw->rx_csum = priv->plat->rx_coe;
 		dev_info(priv->device, "RX Checksum Offload Engine supported\n");
-		if (priv->synopsys_id < DWMAC_CORE_4_00)
+		if (priv->synopsys_id < DWMAC_CORE_4_00 && !priv->plat->has_xgmac)
 			dev_info(priv->device, "COE Type %d\n", priv->hw->rx_csum);
 	}
 	if (priv->plat->tx_coe)
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 02/10] net: stmmac: xgmac: add more feature parsing from hw cap
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
  2023-08-09 16:49 ` [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac Jisheng Zhang
@ 2023-08-09 16:49 ` Jisheng Zhang
  2023-08-10 13:46   ` Alexandre TORGUE
  2023-08-09 16:50 ` [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31 Jisheng Zhang
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:49 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The XGMAC_HWFEAT_GMIISEL bit also indicates whether support 10/100Mbps
or not.
The XGMAC_HWFEAT_HDSEL bit indicates whether support half duplex or
not.
The XGMAC_HWFEAT_ADDMACADRSEL bit indicates whether support Multiple
MAC address registers or not.
The XGMAC_HWFEAT_SMASEL bit indicates whether support SMA (MDIO)
Interface or not.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h     | 3 +++
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
index 153321fe42c3..81cbb13a101d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
@@ -111,6 +111,7 @@
 #define XGMAC_LPI_TIMER_CTRL		0x000000d4
 #define XGMAC_HW_FEATURE0		0x0000011c
 #define XGMAC_HWFEAT_SAVLANINS		BIT(27)
+#define XGMAC_HWFEAT_ADDMACADRSEL	GENMASK(22, 18)
 #define XGMAC_HWFEAT_RXCOESEL		BIT(16)
 #define XGMAC_HWFEAT_TXCOESEL		BIT(14)
 #define XGMAC_HWFEAT_EEESEL		BIT(13)
@@ -121,7 +122,9 @@
 #define XGMAC_HWFEAT_MMCSEL		BIT(8)
 #define XGMAC_HWFEAT_MGKSEL		BIT(7)
 #define XGMAC_HWFEAT_RWKSEL		BIT(6)
+#define XGMAC_HWFEAT_SMASEL		BIT(5)
 #define XGMAC_HWFEAT_VLHASH		BIT(4)
+#define XGMAC_HWFEAT_HDSEL		BIT(3)
 #define XGMAC_HWFEAT_GMIISEL		BIT(1)
 #define XGMAC_HW_FEATURE1		0x00000120
 #define XGMAC_HWFEAT_L3L4FNUM		GENMASK(30, 27)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
index b09395f5edcb..b5ba4e0cca55 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
@@ -406,6 +406,10 @@ static int dwxgmac2_get_hw_feature(void __iomem *ioaddr,
 	dma_cap->pmt_remote_wake_up = (hw_cap & XGMAC_HWFEAT_RWKSEL) >> 6;
 	dma_cap->vlhash = (hw_cap & XGMAC_HWFEAT_VLHASH) >> 4;
 	dma_cap->mbps_1000 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
+	dma_cap->mbps_10_100 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
+	dma_cap->half_duplex = (hw_cap & XGMAC_HWFEAT_HDSEL) >> 3;
+	dma_cap->multi_addr = (hw_cap & XGMAC_HWFEAT_ADDMACADRSEL) >> 18;
+	dma_cap->sma_mdio = (hw_cap & XGMAC_HWFEAT_SMASEL) >> 5;
 
 	/* MAC HW feature 1 */
 	hw_cap = readl(ioaddr + XGMAC_HW_FEATURE1);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
  2023-08-09 16:49 ` [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac Jisheng Zhang
  2023-08-09 16:49 ` [PATCH net-next v3 02/10] net: stmmac: xgmac: add more feature parsing from hw cap Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-10 13:46   ` Alexandre TORGUE
  2023-08-09 16:50 ` [PATCH net-next v3 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16 Jisheng Zhang
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The IP can support up to 31 xgmac c22 addresses now.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 3db1cb0fd160..e6d8e34fafef 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -40,7 +40,7 @@
 #define MII_XGMAC_WRITE			(1 << MII_XGMAC_CMD_SHIFT)
 #define MII_XGMAC_READ			(3 << MII_XGMAC_CMD_SHIFT)
 #define MII_XGMAC_BUSY			BIT(22)
-#define MII_XGMAC_MAX_C22ADDR		3
+#define MII_XGMAC_MAX_C22ADDR		31
 #define MII_XGMAC_C22P_MASK		GENMASK(MII_XGMAC_MAX_C22ADDR, 0)
 #define MII_XGMAC_PA_SHIFT		16
 #define MII_XGMAC_DA_SHIFT		21
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (2 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31 Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-10 14:43   ` Alexandre TORGUE
  2023-08-09 16:50 ` [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety Jisheng Zhang
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

xgmac supports up to 16 rx/tx queues and up to 16 channels.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 5 ++---
 include/linux/stmmac.h                              | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
index a0c2ef8bb0ac..aaae82d3d9dc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
@@ -202,9 +202,8 @@ static void dwxgmac2_map_mtl_to_dma(struct mac_device_info *hw, u32 queue,
 	void __iomem *ioaddr = hw->pcsr;
 	u32 value, reg;
 
-	reg = (queue < 4) ? XGMAC_MTL_RXQ_DMA_MAP0 : XGMAC_MTL_RXQ_DMA_MAP1;
-	if (queue >= 4)
-		queue -= 4;
+	reg = XGMAC_MTL_RXQ_DMA_MAP0 + (queue & ~0x3);
+	queue &= 0x3;
 
 	value = readl(ioaddr + reg);
 	value &= ~XGMAC_QxMDMACH(queue);
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index ef67dba775d0..11671fd6adee 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -15,9 +15,9 @@
 #include <linux/platform_device.h>
 #include <linux/phy.h>
 
-#define MTL_MAX_RX_QUEUES	8
-#define MTL_MAX_TX_QUEUES	8
-#define STMMAC_CH_MAX		8
+#define MTL_MAX_RX_QUEUES	16
+#define MTL_MAX_TX_QUEUES	16
+#define STMMAC_CH_MAX		16
 
 #define STMMAC_RX_COE_NONE	0
 #define STMMAC_RX_COE_TYPE1	1
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (3 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16 Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-10 14:50   ` Alexandre TORGUE
  2023-08-09 16:50 ` [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq Jisheng Zhang
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The IP supports per channel interrupt, when intel adds the per channel
interrupt support, the per channel irq is from MSI vector, but this
feature can also be supported on non-MSI platforms. Do some necessary
renaming to reflects this fact.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 .../net/ethernet/stmicro/stmmac/dwmac-intel.c |  4 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |  2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 48 +++++++++----------
 include/linux/stmmac.h                        |  4 +-
 4 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 0ffae785d8bd..99a072907008 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -953,7 +953,7 @@ static int stmmac_config_single_msi(struct pci_dev *pdev,
 
 	res->irq = pci_irq_vector(pdev, 0);
 	res->wol_irq = res->irq;
-	plat->flags &= ~STMMAC_FLAG_MULTI_MSI_EN;
+	plat->flags &= ~STMMAC_FLAG_PERCH_IRQ_EN;
 	dev_info(&pdev->dev, "%s: Single IRQ enablement successful\n",
 		 __func__);
 
@@ -1005,7 +1005,7 @@ static int stmmac_config_multi_msi(struct pci_dev *pdev,
 	if (plat->msi_sfty_ue_vec < STMMAC_MSI_VEC_MAX)
 		res->sfty_ue_irq = pci_irq_vector(pdev, plat->msi_sfty_ue_vec);
 
-	plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
+	plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
 	dev_info(&pdev->dev, "%s: multi MSI enablement successful\n", __func__);
 
 	return 0;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
index 84d3a8551b03..9bf8adf466a2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
@@ -175,7 +175,7 @@ static void dwmac4_dma_init(void __iomem *ioaddr,
 
 	value = readl(ioaddr + DMA_BUS_MODE);
 
-	if (dma_cfg->multi_msi_en) {
+	if (dma_cfg->perch_irq_en) {
 		value &= ~DMA_BUS_MODE_INTM_MASK;
 		value |= (DMA_BUS_MODE_INTM_MODE1 << DMA_BUS_MODE_INTM_SHIFT);
 	}
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 15ed3947361b..4ed5c976c7a3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -125,11 +125,11 @@ module_param(chain_mode, int, 0444);
 MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode");
 
 static irqreturn_t stmmac_interrupt(int irq, void *dev_id);
-/* For MSI interrupts handling */
+/* For multi interrupts handling */
 static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id);
 static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id);
-static irqreturn_t stmmac_msi_intr_tx(int irq, void *data);
-static irqreturn_t stmmac_msi_intr_rx(int irq, void *data);
+static irqreturn_t stmmac_queue_intr_tx(int irq, void *data);
+static irqreturn_t stmmac_queue_intr_rx(int irq, void *data);
 static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue);
 static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue);
 static void stmmac_reset_queues_param(struct stmmac_priv *priv);
@@ -3513,7 +3513,7 @@ static void stmmac_free_irq(struct net_device *dev,
 	}
 }
 
-static int stmmac_request_irq_multi_msi(struct net_device *dev)
+static int stmmac_request_irq_multi(struct net_device *dev)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 	enum request_irq_err irq_err;
@@ -3530,7 +3530,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 			  0, int_name, dev);
 	if (unlikely(ret < 0)) {
 		netdev_err(priv->dev,
-			   "%s: alloc mac MSI %d (error: %d)\n",
+			   "%s: alloc mac irq %d (error: %d)\n",
 			   __func__, dev->irq, ret);
 		irq_err = REQ_IRQ_ERR_MAC;
 		goto irq_error;
@@ -3547,7 +3547,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 				  0, int_name, dev);
 		if (unlikely(ret < 0)) {
 			netdev_err(priv->dev,
-				   "%s: alloc wol MSI %d (error: %d)\n",
+				   "%s: alloc wol irq %d (error: %d)\n",
 				   __func__, priv->wol_irq, ret);
 			irq_err = REQ_IRQ_ERR_WOL;
 			goto irq_error;
@@ -3565,7 +3565,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 				  0, int_name, dev);
 		if (unlikely(ret < 0)) {
 			netdev_err(priv->dev,
-				   "%s: alloc lpi MSI %d (error: %d)\n",
+				   "%s: alloc lpi irq %d (error: %d)\n",
 				   __func__, priv->lpi_irq, ret);
 			irq_err = REQ_IRQ_ERR_LPI;
 			goto irq_error;
@@ -3583,7 +3583,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 				  0, int_name, dev);
 		if (unlikely(ret < 0)) {
 			netdev_err(priv->dev,
-				   "%s: alloc sfty ce MSI %d (error: %d)\n",
+				   "%s: alloc sfty ce irq %d (error: %d)\n",
 				   __func__, priv->sfty_ce_irq, ret);
 			irq_err = REQ_IRQ_ERR_SFTY_CE;
 			goto irq_error;
@@ -3601,14 +3601,14 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 				  0, int_name, dev);
 		if (unlikely(ret < 0)) {
 			netdev_err(priv->dev,
-				   "%s: alloc sfty ue MSI %d (error: %d)\n",
+				   "%s: alloc sfty ue irq %d (error: %d)\n",
 				   __func__, priv->sfty_ue_irq, ret);
 			irq_err = REQ_IRQ_ERR_SFTY_UE;
 			goto irq_error;
 		}
 	}
 
-	/* Request Rx MSI irq */
+	/* Request Rx queue irq */
 	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
 		if (i >= MTL_MAX_RX_QUEUES)
 			break;
@@ -3618,11 +3618,11 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 		int_name = priv->int_name_rx_irq[i];
 		sprintf(int_name, "%s:%s-%d", dev->name, "rx", i);
 		ret = request_irq(priv->rx_irq[i],
-				  stmmac_msi_intr_rx,
+				  stmmac_queue_intr_rx,
 				  0, int_name, &priv->dma_conf.rx_queue[i]);
 		if (unlikely(ret < 0)) {
 			netdev_err(priv->dev,
-				   "%s: alloc rx-%d  MSI %d (error: %d)\n",
+				   "%s: alloc rx-%d irq %d (error: %d)\n",
 				   __func__, i, priv->rx_irq[i], ret);
 			irq_err = REQ_IRQ_ERR_RX;
 			irq_idx = i;
@@ -3633,7 +3633,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 		irq_set_affinity_hint(priv->rx_irq[i], &cpu_mask);
 	}
 
-	/* Request Tx MSI irq */
+	/* Request Tx queue irq */
 	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
 		if (i >= MTL_MAX_TX_QUEUES)
 			break;
@@ -3643,11 +3643,11 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
 		int_name = priv->int_name_tx_irq[i];
 		sprintf(int_name, "%s:%s-%d", dev->name, "tx", i);
 		ret = request_irq(priv->tx_irq[i],
-				  stmmac_msi_intr_tx,
+				  stmmac_queue_intr_tx,
 				  0, int_name, &priv->dma_conf.tx_queue[i]);
 		if (unlikely(ret < 0)) {
 			netdev_err(priv->dev,
-				   "%s: alloc tx-%d  MSI %d (error: %d)\n",
+				   "%s: alloc tx-%d irq %d (error: %d)\n",
 				   __func__, i, priv->tx_irq[i], ret);
 			irq_err = REQ_IRQ_ERR_TX;
 			irq_idx = i;
@@ -3722,8 +3722,8 @@ static int stmmac_request_irq(struct net_device *dev)
 	int ret;
 
 	/* Request the IRQ lines */
-	if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN)
-		ret = stmmac_request_irq_multi_msi(dev);
+	if (priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN)
+		ret = stmmac_request_irq_multi(dev);
 	else
 		ret = stmmac_request_irq_single(dev);
 
@@ -5938,7 +5938,7 @@ static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
+static irqreturn_t stmmac_queue_intr_tx(int irq, void *data)
 {
 	struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
 	struct stmmac_dma_conf *dma_conf;
@@ -5970,7 +5970,7 @@ static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
+static irqreturn_t stmmac_queue_intr_rx(int irq, void *data)
 {
 	struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
 	struct stmmac_dma_conf *dma_conf;
@@ -6007,12 +6007,12 @@ static void stmmac_poll_controller(struct net_device *dev)
 	if (test_bit(STMMAC_DOWN, &priv->state))
 		return;
 
-	if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN) {
+	if (priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN) {
 		for (i = 0; i < priv->plat->rx_queues_to_use; i++)
-			stmmac_msi_intr_rx(0, &priv->dma_conf.rx_queue[i]);
+			stmmac_queue_intr_rx(0, &priv->dma_conf.rx_queue[i]);
 
 		for (i = 0; i < priv->plat->tx_queues_to_use; i++)
-			stmmac_msi_intr_tx(0, &priv->dma_conf.tx_queue[i]);
+			stmmac_queue_intr_tx(0, &priv->dma_conf.tx_queue[i]);
 	} else {
 		disable_irq(dev->irq);
 		stmmac_interrupt(dev->irq, dev);
@@ -7278,8 +7278,8 @@ int stmmac_dvr_probe(struct device *device,
 	priv->plat = plat_dat;
 	priv->ioaddr = res->addr;
 	priv->dev->base_addr = (unsigned long)res->addr;
-	priv->plat->dma_cfg->multi_msi_en =
-		(priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN);
+	priv->plat->dma_cfg->perch_irq_en =
+		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
 
 	priv->dev->irq = res->irq;
 	priv->wol_irq = res->wol_irq;
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 11671fd6adee..76249117c0ff 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -96,7 +96,7 @@ struct stmmac_dma_cfg {
 	int mixed_burst;
 	bool aal;
 	bool eame;
-	bool multi_msi_en;
+	bool perch_irq_en;
 	bool dche;
 };
 
@@ -211,7 +211,7 @@ struct dwmac4_addrs {
 #define STMMAC_FLAG_TSO_EN			BIT(4)
 #define STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP	BIT(5)
 #define STMMAC_FLAG_VLAN_FAIL_Q_EN		BIT(6)
-#define STMMAC_FLAG_MULTI_MSI_EN		BIT(7)
+#define STMMAC_FLAG_PERCH_IRQ_EN		BIT(7)
 #define STMMAC_FLAG_EXT_SNAPSHOT_EN		BIT(8)
 #define STMMAC_FLAG_INT_SNAPSHOT_EN		BIT(9)
 #define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI		BIT(10)
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (4 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-10 14:52   ` Alexandre TORGUE
  2023-08-09 16:50 ` [PATCH net-next v3 07/10] dt-bindings: net: snps,dwmac: add safety irq support Jisheng Zhang
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The IP supports per channel interrupt, add support for this usage case.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |  2 ++
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    | 33 +++++++++++--------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
index 81cbb13a101d..12e1228ccf2a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
@@ -327,6 +327,8 @@
 
 /* DMA Registers */
 #define XGMAC_DMA_MODE			0x00003000
+#define XGMAC_INTM			GENMASK(13, 12)
+#define XGMAC_INTM_MODE1		0x1
 #define XGMAC_SWR			BIT(0)
 #define XGMAC_DMA_SYSBUS_MODE		0x00003004
 #define XGMAC_WR_OSR_LMT		GENMASK(29, 24)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
index b5ba4e0cca55..ef25af92d6cc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
@@ -31,6 +31,13 @@ static void dwxgmac2_dma_init(void __iomem *ioaddr,
 		value |= XGMAC_EAME;
 
 	writel(value, ioaddr + XGMAC_DMA_SYSBUS_MODE);
+
+	if (dma_cfg->perch_irq_en) {
+		value = readl(ioaddr + XGMAC_DMA_MODE);
+		value &= ~XGMAC_INTM;
+		value |= FIELD_PREP(XGMAC_INTM, XGMAC_INTM_MODE1);
+		writel(value, ioaddr + XGMAC_DMA_MODE);
+	}
 }
 
 static void dwxgmac2_dma_init_chan(struct stmmac_priv *priv,
@@ -365,20 +372,20 @@ static int dwxgmac2_dma_interrupt(struct stmmac_priv *priv,
 	}
 
 	/* TX/RX NORMAL interrupts */
-	if (likely(intr_status & XGMAC_NIS)) {
-		if (likely(intr_status & XGMAC_RI)) {
-			u64_stats_update_begin(&rx_q->rxq_stats.syncp);
-			rx_q->rxq_stats.rx_normal_irq_n++;
-			u64_stats_update_end(&rx_q->rxq_stats.syncp);
-			ret |= handle_rx;
-		}
-		if (likely(intr_status & (XGMAC_TI | XGMAC_TBU))) {
-			u64_stats_update_begin(&tx_q->txq_stats.syncp);
-			tx_q->txq_stats.tx_normal_irq_n++;
-			u64_stats_update_end(&tx_q->txq_stats.syncp);
-			ret |= handle_tx;
-		}
+	if (likely(intr_status & XGMAC_RI)) {
+		u64_stats_update_begin(&rx_q->rxq_stats.syncp);
+		rx_q->rxq_stats.rx_normal_irq_n++;
+		u64_stats_update_end(&rx_q->rxq_stats.syncp);
+		ret |= handle_rx;
+	}
+	if (likely(intr_status & XGMAC_TI)) {
+		u64_stats_update_begin(&tx_q->txq_stats.syncp);
+		tx_q->txq_stats.tx_normal_irq_n++;
+		u64_stats_update_end(&tx_q->txq_stats.syncp);
+		ret |= handle_tx;
 	}
+	if (unlikely(intr_status & XGMAC_TBU))
+		ret |= handle_tx;
 
 	/* Clear interrupts */
 	writel(intr_en & intr_status, ioaddr + XGMAC_DMA_CH_STATUS(chan));
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 07/10] dt-bindings: net: snps,dwmac: add safety irq support
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (5 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-15 21:09   ` Krzysztof Kozlowski
  2023-08-09 16:50 ` [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT Jisheng Zhang
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The snps dwmac IP support safety features, and those Safety Feature
Correctible Error and Uncorrectible Error irqs may be separate irqs.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 Documentation/devicetree/bindings/net/snps,dwmac.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index ddf9522a5dc2..5d81042f5634 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -107,6 +107,8 @@ properties:
       - description: Combined signal for various interrupt events
       - description: The interrupt to manage the remote wake-up packet detection
       - description: The interrupt that occurs when Rx exits the LPI state
+      - description: The interrupt that occurs when Safety Feature Correctible Errors happen
+      - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen
 
   interrupt-names:
     minItems: 1
@@ -114,6 +116,8 @@ properties:
       - const: macirq
       - enum: [eth_wake_irq, eth_lpi]
       - const: eth_lpi
+      - const: sfty_ce
+      - const: sfty_ue
 
   clocks:
     minItems: 1
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (6 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 07/10] dt-bindings: net: snps,dwmac: add safety irq support Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-10 14:52   ` Alexandre TORGUE
  2023-08-09 16:50 ` [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support Jisheng Zhang
  2023-08-09 16:50 ` [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT Jisheng Zhang
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The snps dwmac IP may support safety features, and those Safety
Feature Correctible Error and Uncorrectible Error irqs may be
separate irqs. Add support to parse the safety irqs from DT.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c    | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 23d53ea04b24..29145682b57b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -738,6 +738,18 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
 		dev_info(&pdev->dev, "IRQ eth_lpi not found\n");
 	}
 
+	stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce");
+	if (stmmac_res->sfty_ce_irq < 0) {
+		if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER)
+			return -EPROBE_DEFER;
+	}
+
+	stmmac_res->sfty_ue_irq = platform_get_irq_byname_optional(pdev, "sfty_ue");
+	if (stmmac_res->sfty_ue_irq < 0) {
+		if (stmmac_res->sfty_ue_irq == -EPROBE_DEFER)
+			return -EPROBE_DEFER;
+	}
+
 	stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0);
 
 	return PTR_ERR_OR_ZERO(stmmac_res->addr);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (7 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-09 17:38   ` Conor Dooley
  2023-08-09 16:50 ` [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT Jisheng Zhang
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The IP supports per channel interrupt, add support for this usage case.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 .../devicetree/bindings/net/snps,dwmac.yaml   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 5d81042f5634..5a63302ad200 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -109,6 +109,7 @@ properties:
       - description: The interrupt that occurs when Rx exits the LPI state
       - description: The interrupt that occurs when Safety Feature Correctible Errors happen
       - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen
+      - description: All of the rx/tx per-channel interrupts
 
   interrupt-names:
     minItems: 1
@@ -118,6 +119,38 @@ properties:
       - const: eth_lpi
       - const: sfty_ce
       - const: sfty_ue
+      - const: rx0
+      - const: rx1
+      - const: rx2
+      - const: rx3
+      - const: rx4
+      - const: rx5
+      - const: rx6
+      - const: rx7
+      - const: rx8
+      - const: rx9
+      - const: rx10
+      - const: rx11
+      - const: rx12
+      - const: rx13
+      - const: rx14
+      - const: rx15
+      - const: tx0
+      - const: tx1
+      - const: tx2
+      - const: tx3
+      - const: tx4
+      - const: tx5
+      - const: tx6
+      - const: tx7
+      - const: tx8
+      - const: tx9
+      - const: tx10
+      - const: tx11
+      - const: tx12
+      - const: tx13
+      - const: tx14
+      - const: tx15
 
   clocks:
     minItems: 1
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT
  2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
                   ` (8 preceding siblings ...)
  2023-08-09 16:50 ` [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support Jisheng Zhang
@ 2023-08-09 16:50 ` Jisheng Zhang
  2023-08-10 14:57   ` Alexandre TORGUE
  9 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-09 16:50 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

The snps dwmac IP may support per channel interrupt. Add support to
parse the per channel irq from DT.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++----
 .../ethernet/stmicro/stmmac/stmmac_platform.c | 23 +++++++++++++++++++
 2 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4ed5c976c7a3..245eeb7d3e83 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3612,7 +3612,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
 	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
 		if (i >= MTL_MAX_RX_QUEUES)
 			break;
-		if (priv->rx_irq[i] == 0)
+		if (priv->rx_irq[i] <= 0)
 			continue;
 
 		int_name = priv->int_name_rx_irq[i];
@@ -3637,7 +3637,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
 	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
 		if (i >= MTL_MAX_TX_QUEUES)
 			break;
-		if (priv->tx_irq[i] == 0)
+		if (priv->tx_irq[i] <= 0)
 			continue;
 
 		int_name = priv->int_name_tx_irq[i];
@@ -7278,8 +7278,10 @@ int stmmac_dvr_probe(struct device *device,
 	priv->plat = plat_dat;
 	priv->ioaddr = res->addr;
 	priv->dev->base_addr = (unsigned long)res->addr;
-	priv->plat->dma_cfg->perch_irq_en =
-		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
+	if (res->rx_irq[0] > 0 && res->tx_irq[0] > 0) {
+		priv->plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
+		priv->plat->dma_cfg->perch_irq_en = true;
+	}
 
 	priv->dev->irq = res->irq;
 	priv->wol_irq = res->wol_irq;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 29145682b57b..9b46775b41ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -705,6 +705,9 @@ EXPORT_SYMBOL_GPL(stmmac_remove_config_dt);
 int stmmac_get_platform_resources(struct platform_device *pdev,
 				  struct stmmac_resources *stmmac_res)
 {
+	char irq_name[8];
+	int i;
+
 	memset(stmmac_res, 0, sizeof(*stmmac_res));
 
 	/* Get IRQ information early to have an ability to ask for deferred
@@ -738,6 +741,26 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
 		dev_info(&pdev->dev, "IRQ eth_lpi not found\n");
 	}
 
+	for (i = 0; i < MTL_MAX_RX_QUEUES; i++) {
+		snprintf(irq_name, sizeof(irq_name), "rx%i", i);
+		stmmac_res->rx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
+		if (stmmac_res->rx_irq[i] < 0) {
+			if (stmmac_res->rx_irq[i] == -EPROBE_DEFER)
+				return -EPROBE_DEFER;
+			break;
+		}
+	}
+
+	for (i = 0; i < MTL_MAX_TX_QUEUES; i++) {
+		snprintf(irq_name, sizeof(irq_name), "tx%i", i);
+		stmmac_res->tx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
+		if (stmmac_res->tx_irq[i] < 0) {
+			if (stmmac_res->tx_irq[i] == -EPROBE_DEFER)
+				return -EPROBE_DEFER;
+			break;
+		}
+	}
+
 	stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce");
 	if (stmmac_res->sfty_ce_irq < 0) {
 		if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER)
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support
  2023-08-09 16:50 ` [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support Jisheng Zhang
@ 2023-08-09 17:38   ` Conor Dooley
  2023-08-10 15:45     ` Jisheng Zhang
  0 siblings, 1 reply; 28+ messages in thread
From: Conor Dooley @ 2023-08-09 17:38 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev,
	linux-kernel, devicetree, linux-stm32, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 2161 bytes --]

On Thu, Aug 10, 2023 at 12:50:06AM +0800, Jisheng Zhang wrote:
> The IP supports per channel interrupt, add support for this usage case.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

I do not see a response to
<https://lore.kernel.org/all/20230808-clapper-corncob-0af7afa65752@spud/>
in my mailbox or on lore, nor is there any changes in v3 on this front.

Thanks,
Conor.

> ---
>  .../devicetree/bindings/net/snps,dwmac.yaml   | 33 +++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 5d81042f5634..5a63302ad200 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -109,6 +109,7 @@ properties:
>        - description: The interrupt that occurs when Rx exits the LPI state
>        - description: The interrupt that occurs when Safety Feature Correctible Errors happen
>        - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen
> +      - description: All of the rx/tx per-channel interrupts
>  
>    interrupt-names:
>      minItems: 1
> @@ -118,6 +119,38 @@ properties:
>        - const: eth_lpi
>        - const: sfty_ce
>        - const: sfty_ue
> +      - const: rx0
> +      - const: rx1
> +      - const: rx2
> +      - const: rx3
> +      - const: rx4
> +      - const: rx5
> +      - const: rx6
> +      - const: rx7
> +      - const: rx8
> +      - const: rx9
> +      - const: rx10
> +      - const: rx11
> +      - const: rx12
> +      - const: rx13
> +      - const: rx14
> +      - const: rx15
> +      - const: tx0
> +      - const: tx1
> +      - const: tx2
> +      - const: tx3
> +      - const: tx4
> +      - const: tx5
> +      - const: tx6
> +      - const: tx7
> +      - const: tx8
> +      - const: tx9
> +      - const: tx10
> +      - const: tx11
> +      - const: tx12
> +      - const: tx13
> +      - const: tx14
> +      - const: tx15
>  
>    clocks:
>      minItems: 1
> -- 
> 2.40.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac
  2023-08-09 16:49 ` [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac Jisheng Zhang
@ 2023-08-10 13:45   ` Alexandre TORGUE
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 13:45 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:49, Jisheng Zhang wrote:
> xgmac can support RX COE, but there's no two kinds of COE, I.E type 1
> and type 2 COE.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index e1f1c034d325..15ed3947361b 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -6271,7 +6271,7 @@ static int stmmac_dma_cap_show(struct seq_file *seq, void *v)
>   	seq_printf(seq, "\tAV features: %s\n", (priv->dma_cap.av) ? "Y" : "N");
>   	seq_printf(seq, "\tChecksum Offload in TX: %s\n",
>   		   (priv->dma_cap.tx_coe) ? "Y" : "N");
> -	if (priv->synopsys_id >= DWMAC_CORE_4_00) {
> +	if (priv->synopsys_id >= DWMAC_CORE_4_00 || priv->plat->has_xgmac) {
>   		seq_printf(seq, "\tIP Checksum Offload in RX: %s\n",
>   			   (priv->dma_cap.rx_coe) ? "Y" : "N");
>   	} else {
> @@ -7013,7 +7013,7 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
>   	if (priv->plat->rx_coe) {
>   		priv->hw->rx_csum = priv->plat->rx_coe;
>   		dev_info(priv->device, "RX Checksum Offload Engine supported\n");
> -		if (priv->synopsys_id < DWMAC_CORE_4_00)
> +		if (priv->synopsys_id < DWMAC_CORE_4_00 && !priv->plat->has_xgmac)
>   			dev_info(priv->device, "COE Type %d\n", priv->hw->rx_csum);
>   	}
>   	if (priv->plat->tx_coe)

Acked-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>

Regards
Alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 02/10] net: stmmac: xgmac: add more feature parsing from hw cap
  2023-08-09 16:49 ` [PATCH net-next v3 02/10] net: stmmac: xgmac: add more feature parsing from hw cap Jisheng Zhang
@ 2023-08-10 13:46   ` Alexandre TORGUE
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 13:46 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:49, Jisheng Zhang wrote:
> The XGMAC_HWFEAT_GMIISEL bit also indicates whether support 10/100Mbps
> or not.
> The XGMAC_HWFEAT_HDSEL bit indicates whether support half duplex or
> not.
> The XGMAC_HWFEAT_ADDMACADRSEL bit indicates whether support Multiple
> MAC address registers or not.
> The XGMAC_HWFEAT_SMASEL bit indicates whether support SMA (MDIO)
> Interface or not.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h     | 3 +++
>   drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 4 ++++
>   2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> index 153321fe42c3..81cbb13a101d 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> @@ -111,6 +111,7 @@
>   #define XGMAC_LPI_TIMER_CTRL		0x000000d4
>   #define XGMAC_HW_FEATURE0		0x0000011c
>   #define XGMAC_HWFEAT_SAVLANINS		BIT(27)
> +#define XGMAC_HWFEAT_ADDMACADRSEL	GENMASK(22, 18)
>   #define XGMAC_HWFEAT_RXCOESEL		BIT(16)
>   #define XGMAC_HWFEAT_TXCOESEL		BIT(14)
>   #define XGMAC_HWFEAT_EEESEL		BIT(13)
> @@ -121,7 +122,9 @@
>   #define XGMAC_HWFEAT_MMCSEL		BIT(8)
>   #define XGMAC_HWFEAT_MGKSEL		BIT(7)
>   #define XGMAC_HWFEAT_RWKSEL		BIT(6)
> +#define XGMAC_HWFEAT_SMASEL		BIT(5)
>   #define XGMAC_HWFEAT_VLHASH		BIT(4)
> +#define XGMAC_HWFEAT_HDSEL		BIT(3)
>   #define XGMAC_HWFEAT_GMIISEL		BIT(1)
>   #define XGMAC_HW_FEATURE1		0x00000120
>   #define XGMAC_HWFEAT_L3L4FNUM		GENMASK(30, 27)
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> index b09395f5edcb..b5ba4e0cca55 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> @@ -406,6 +406,10 @@ static int dwxgmac2_get_hw_feature(void __iomem *ioaddr,
>   	dma_cap->pmt_remote_wake_up = (hw_cap & XGMAC_HWFEAT_RWKSEL) >> 6;
>   	dma_cap->vlhash = (hw_cap & XGMAC_HWFEAT_VLHASH) >> 4;
>   	dma_cap->mbps_1000 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
> +	dma_cap->mbps_10_100 = (hw_cap & XGMAC_HWFEAT_GMIISEL) >> 1;
> +	dma_cap->half_duplex = (hw_cap & XGMAC_HWFEAT_HDSEL) >> 3;
> +	dma_cap->multi_addr = (hw_cap & XGMAC_HWFEAT_ADDMACADRSEL) >> 18;
> +	dma_cap->sma_mdio = (hw_cap & XGMAC_HWFEAT_SMASEL) >> 5;
>   
>   	/* MAC HW feature 1 */
>   	hw_cap = readl(ioaddr + XGMAC_HW_FEATURE1);

Acked-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>

Regards
Alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31
  2023-08-09 16:50 ` [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31 Jisheng Zhang
@ 2023-08-10 13:46   ` Alexandre TORGUE
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 13:46 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:50, Jisheng Zhang wrote:
> The IP can support up to 31 xgmac c22 addresses now.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> index 3db1cb0fd160..e6d8e34fafef 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> @@ -40,7 +40,7 @@
>   #define MII_XGMAC_WRITE			(1 << MII_XGMAC_CMD_SHIFT)
>   #define MII_XGMAC_READ			(3 << MII_XGMAC_CMD_SHIFT)
>   #define MII_XGMAC_BUSY			BIT(22)
> -#define MII_XGMAC_MAX_C22ADDR		3
> +#define MII_XGMAC_MAX_C22ADDR		31
>   #define MII_XGMAC_C22P_MASK		GENMASK(MII_XGMAC_MAX_C22ADDR, 0)
>   #define MII_XGMAC_PA_SHIFT		16
>   #define MII_XGMAC_DA_SHIFT		21

Acked-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>

Regards
Alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16
  2023-08-09 16:50 ` [PATCH net-next v3 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16 Jisheng Zhang
@ 2023-08-10 14:43   ` Alexandre TORGUE
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 14:43 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:50, Jisheng Zhang wrote:
> xgmac supports up to 16 rx/tx queues and up to 16 channels.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 5 ++---
>   include/linux/stmmac.h                              | 6 +++---
>   2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> index a0c2ef8bb0ac..aaae82d3d9dc 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> @@ -202,9 +202,8 @@ static void dwxgmac2_map_mtl_to_dma(struct mac_device_info *hw, u32 queue,
>   	void __iomem *ioaddr = hw->pcsr;
>   	u32 value, reg;
>   
> -	reg = (queue < 4) ? XGMAC_MTL_RXQ_DMA_MAP0 : XGMAC_MTL_RXQ_DMA_MAP1;
> -	if (queue >= 4)
> -		queue -= 4;
> +	reg = XGMAC_MTL_RXQ_DMA_MAP0 + (queue & ~0x3);
> +	queue &= 0x3;
>   
>   	value = readl(ioaddr + reg);
>   	value &= ~XGMAC_QxMDMACH(queue);
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index ef67dba775d0..11671fd6adee 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -15,9 +15,9 @@
>   #include <linux/platform_device.h>
>   #include <linux/phy.h>
>   
> -#define MTL_MAX_RX_QUEUES	8
> -#define MTL_MAX_TX_QUEUES	8
> -#define STMMAC_CH_MAX		8
> +#define MTL_MAX_RX_QUEUES	16
> +#define MTL_MAX_TX_QUEUES	16
> +#define STMMAC_CH_MAX		16
>   
>   #define STMMAC_RX_COE_NONE	0
>   #define STMMAC_RX_COE_TYPE1	1

Acked-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>

Regards
Alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety
  2023-08-09 16:50 ` [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety Jisheng Zhang
@ 2023-08-10 14:50   ` Alexandre TORGUE
  2023-08-10 16:02     ` Jisheng Zhang
  0 siblings, 1 reply; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 14:50 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:50, Jisheng Zhang wrote:
> The IP supports per channel interrupt, when intel adds the per channel
> interrupt support, the per channel irq is from MSI vector, but this
> feature can also be supported on non-MSI platforms. Do some necessary
> renaming to reflects this fact.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   .../net/ethernet/stmicro/stmmac/dwmac-intel.c |  4 +-
>   .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |  2 +-
>   .../net/ethernet/stmicro/stmmac/stmmac_main.c | 48 +++++++++----------
>   include/linux/stmmac.h                        |  4 +-
>   4 files changed, 29 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> index 0ffae785d8bd..99a072907008 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> @@ -953,7 +953,7 @@ static int stmmac_config_single_msi(struct pci_dev *pdev,
>   
>   	res->irq = pci_irq_vector(pdev, 0);
>   	res->wol_irq = res->irq;
> -	plat->flags &= ~STMMAC_FLAG_MULTI_MSI_EN;
> +	plat->flags &= ~STMMAC_FLAG_PERCH_IRQ_EN;
>   	dev_info(&pdev->dev, "%s: Single IRQ enablement successful\n",
>   		 __func__);
>   
> @@ -1005,7 +1005,7 @@ static int stmmac_config_multi_msi(struct pci_dev *pdev,
>   	if (plat->msi_sfty_ue_vec < STMMAC_MSI_VEC_MAX)
>   		res->sfty_ue_irq = pci_irq_vector(pdev, plat->msi_sfty_ue_vec);
>   
> -	plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
> +	plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
>   	dev_info(&pdev->dev, "%s: multi MSI enablement successful\n", __func__);
>   
>   	return 0;
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> index 84d3a8551b03..9bf8adf466a2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> @@ -175,7 +175,7 @@ static void dwmac4_dma_init(void __iomem *ioaddr,
>   
>   	value = readl(ioaddr + DMA_BUS_MODE);
>   
> -	if (dma_cfg->multi_msi_en) {
> +	if (dma_cfg->perch_irq_en) {
>   		value &= ~DMA_BUS_MODE_INTM_MASK;
>   		value |= (DMA_BUS_MODE_INTM_MODE1 << DMA_BUS_MODE_INTM_SHIFT);
>   	}
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 15ed3947361b..4ed5c976c7a3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -125,11 +125,11 @@ module_param(chain_mode, int, 0444);
>   MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode");
>   
>   static irqreturn_t stmmac_interrupt(int irq, void *dev_id);
> -/* For MSI interrupts handling */
> +/* For multi interrupts handling */
>   static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id);
>   static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id);
> -static irqreturn_t stmmac_msi_intr_tx(int irq, void *data);
> -static irqreturn_t stmmac_msi_intr_rx(int irq, void *data);
> +static irqreturn_t stmmac_queue_intr_tx(int irq, void *data);
> +static irqreturn_t stmmac_queue_intr_rx(int irq, void *data);
>   static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue);
>   static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue);
>   static void stmmac_reset_queues_param(struct stmmac_priv *priv);
> @@ -3513,7 +3513,7 @@ static void stmmac_free_irq(struct net_device *dev,
>   	}
>   }
>   
> -static int stmmac_request_irq_multi_msi(struct net_device *dev)
> +static int stmmac_request_irq_multi(struct net_device *dev)

What mean "irq_multi". You change previously "multi_msi" by "perch_irq", 
maybe you could do something with this "perch" naming ?

>   {
>   	struct stmmac_priv *priv = netdev_priv(dev);
>   	enum request_irq_err irq_err;
> @@ -3530,7 +3530,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   			  0, int_name, dev);
>   	if (unlikely(ret < 0)) {
>   		netdev_err(priv->dev,
> -			   "%s: alloc mac MSI %d (error: %d)\n",
> +			   "%s: alloc mac irq %d (error: %d)\n",
>   			   __func__, dev->irq, ret);
>   		irq_err = REQ_IRQ_ERR_MAC;
>   		goto irq_error;
> @@ -3547,7 +3547,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   				  0, int_name, dev);
>   		if (unlikely(ret < 0)) {
>   			netdev_err(priv->dev,
> -				   "%s: alloc wol MSI %d (error: %d)\n",
> +				   "%s: alloc wol irq %d (error: %d)\n",
>   				   __func__, priv->wol_irq, ret);
>   			irq_err = REQ_IRQ_ERR_WOL;
>   			goto irq_error;
> @@ -3565,7 +3565,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   				  0, int_name, dev);
>   		if (unlikely(ret < 0)) {
>   			netdev_err(priv->dev,
> -				   "%s: alloc lpi MSI %d (error: %d)\n",
> +				   "%s: alloc lpi irq %d (error: %d)\n",
>   				   __func__, priv->lpi_irq, ret);
>   			irq_err = REQ_IRQ_ERR_LPI;
>   			goto irq_error;
> @@ -3583,7 +3583,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   				  0, int_name, dev);
>   		if (unlikely(ret < 0)) {
>   			netdev_err(priv->dev,
> -				   "%s: alloc sfty ce MSI %d (error: %d)\n",
> +				   "%s: alloc sfty ce irq %d (error: %d)\n",
>   				   __func__, priv->sfty_ce_irq, ret);
>   			irq_err = REQ_IRQ_ERR_SFTY_CE;
>   			goto irq_error;
> @@ -3601,14 +3601,14 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   				  0, int_name, dev);
>   		if (unlikely(ret < 0)) {
>   			netdev_err(priv->dev,
> -				   "%s: alloc sfty ue MSI %d (error: %d)\n",
> +				   "%s: alloc sfty ue irq %d (error: %d)\n",
>   				   __func__, priv->sfty_ue_irq, ret);
>   			irq_err = REQ_IRQ_ERR_SFTY_UE;
>   			goto irq_error;
>   		}
>   	}
>   
> -	/* Request Rx MSI irq */
> +	/* Request Rx queue irq */
>   	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
>   		if (i >= MTL_MAX_RX_QUEUES)
>   			break;
> @@ -3618,11 +3618,11 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   		int_name = priv->int_name_rx_irq[i];
>   		sprintf(int_name, "%s:%s-%d", dev->name, "rx", i);
>   		ret = request_irq(priv->rx_irq[i],
> -				  stmmac_msi_intr_rx,
> +				  stmmac_queue_intr_rx,
>   				  0, int_name, &priv->dma_conf.rx_queue[i]);
>   		if (unlikely(ret < 0)) {
>   			netdev_err(priv->dev,
> -				   "%s: alloc rx-%d  MSI %d (error: %d)\n",
> +				   "%s: alloc rx-%d irq %d (error: %d)\n",
>   				   __func__, i, priv->rx_irq[i], ret);
>   			irq_err = REQ_IRQ_ERR_RX;
>   			irq_idx = i;
> @@ -3633,7 +3633,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   		irq_set_affinity_hint(priv->rx_irq[i], &cpu_mask);
>   	}
>   
> -	/* Request Tx MSI irq */
> +	/* Request Tx queue irq */
>   	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
>   		if (i >= MTL_MAX_TX_QUEUES)
>   			break;
> @@ -3643,11 +3643,11 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
>   		int_name = priv->int_name_tx_irq[i];
>   		sprintf(int_name, "%s:%s-%d", dev->name, "tx", i);
>   		ret = request_irq(priv->tx_irq[i],
> -				  stmmac_msi_intr_tx,
> +				  stmmac_queue_intr_tx,
>   				  0, int_name, &priv->dma_conf.tx_queue[i]);
>   		if (unlikely(ret < 0)) {
>   			netdev_err(priv->dev,
> -				   "%s: alloc tx-%d  MSI %d (error: %d)\n",
> +				   "%s: alloc tx-%d irq %d (error: %d)\n",
>   				   __func__, i, priv->tx_irq[i], ret);
>   			irq_err = REQ_IRQ_ERR_TX;
>   			irq_idx = i;
> @@ -3722,8 +3722,8 @@ static int stmmac_request_irq(struct net_device *dev)
>   	int ret;
>   
>   	/* Request the IRQ lines */
> -	if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN)
> -		ret = stmmac_request_irq_multi_msi(dev);
> +	if (priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN)
> +		ret = stmmac_request_irq_multi(dev);
>   	else
>   		ret = stmmac_request_irq_single(dev);
>   
> @@ -5938,7 +5938,7 @@ static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id)
>   	return IRQ_HANDLED;
>   }
>   
> -static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
> +static irqreturn_t stmmac_queue_intr_tx(int irq, void *data)
>   {
>   	struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
>   	struct stmmac_dma_conf *dma_conf;
> @@ -5970,7 +5970,7 @@ static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
>   	return IRQ_HANDLED;
>   }
>   
> -static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
> +static irqreturn_t stmmac_queue_intr_rx(int irq, void *data)
>   {
>   	struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
>   	struct stmmac_dma_conf *dma_conf;
> @@ -6007,12 +6007,12 @@ static void stmmac_poll_controller(struct net_device *dev)
>   	if (test_bit(STMMAC_DOWN, &priv->state))
>   		return;
>   
> -	if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN) {
> +	if (priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN) {
>   		for (i = 0; i < priv->plat->rx_queues_to_use; i++)
> -			stmmac_msi_intr_rx(0, &priv->dma_conf.rx_queue[i]);
> +			stmmac_queue_intr_rx(0, &priv->dma_conf.rx_queue[i]);
>   
>   		for (i = 0; i < priv->plat->tx_queues_to_use; i++)
> -			stmmac_msi_intr_tx(0, &priv->dma_conf.tx_queue[i]);
> +			stmmac_queue_intr_tx(0, &priv->dma_conf.tx_queue[i]);
>   	} else {
>   		disable_irq(dev->irq);
>   		stmmac_interrupt(dev->irq, dev);
> @@ -7278,8 +7278,8 @@ int stmmac_dvr_probe(struct device *device,
>   	priv->plat = plat_dat;
>   	priv->ioaddr = res->addr;
>   	priv->dev->base_addr = (unsigned long)res->addr;
> -	priv->plat->dma_cfg->multi_msi_en =
> -		(priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN);
> +	priv->plat->dma_cfg->perch_irq_en =
> +		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
>   
>   	priv->dev->irq = res->irq;
>   	priv->wol_irq = res->wol_irq;
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 11671fd6adee..76249117c0ff 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -96,7 +96,7 @@ struct stmmac_dma_cfg {
>   	int mixed_burst;
>   	bool aal;
>   	bool eame;
> -	bool multi_msi_en;
> +	bool perch_irq_en;
>   	bool dche;
>   };
>   
> @@ -211,7 +211,7 @@ struct dwmac4_addrs {
>   #define STMMAC_FLAG_TSO_EN			BIT(4)
>   #define STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP	BIT(5)
>   #define STMMAC_FLAG_VLAN_FAIL_Q_EN		BIT(6)
> -#define STMMAC_FLAG_MULTI_MSI_EN		BIT(7)
> +#define STMMAC_FLAG_PERCH_IRQ_EN		BIT(7)
>   #define STMMAC_FLAG_EXT_SNAPSHOT_EN		BIT(8)
>   #define STMMAC_FLAG_INT_SNAPSHOT_EN		BIT(9)
>   #define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI		BIT(10)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq
  2023-08-09 16:50 ` [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq Jisheng Zhang
@ 2023-08-10 14:52   ` Alexandre TORGUE
  2023-08-16 15:52     ` Jisheng Zhang
  0 siblings, 1 reply; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 14:52 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:50, Jisheng Zhang wrote:
> The IP supports per channel interrupt, add support for this usage case.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |  2 ++
>   .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    | 33 +++++++++++--------
>   2 files changed, 22 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> index 81cbb13a101d..12e1228ccf2a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> @@ -327,6 +327,8 @@
>   
>   /* DMA Registers */
>   #define XGMAC_DMA_MODE			0x00003000
> +#define XGMAC_INTM			GENMASK(13, 12)
> +#define XGMAC_INTM_MODE1		0x1
>   #define XGMAC_SWR			BIT(0)
>   #define XGMAC_DMA_SYSBUS_MODE		0x00003004
>   #define XGMAC_WR_OSR_LMT		GENMASK(29, 24)
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> index b5ba4e0cca55..ef25af92d6cc 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> @@ -31,6 +31,13 @@ static void dwxgmac2_dma_init(void __iomem *ioaddr,
>   		value |= XGMAC_EAME;
>   
>   	writel(value, ioaddr + XGMAC_DMA_SYSBUS_MODE);
> +
> +	if (dma_cfg->perch_irq_en) {
> +		value = readl(ioaddr + XGMAC_DMA_MODE);
> +		value &= ~XGMAC_INTM;
> +		value |= FIELD_PREP(XGMAC_INTM, XGMAC_INTM_MODE1);
> +		writel(value, ioaddr + XGMAC_DMA_MODE);
> +	}
>   }
>   
>   static void dwxgmac2_dma_init_chan(struct stmmac_priv *priv,
> @@ -365,20 +372,20 @@ static int dwxgmac2_dma_interrupt(struct stmmac_priv *priv,
>   	}
>   
>   	/* TX/RX NORMAL interrupts */
> -	if (likely(intr_status & XGMAC_NIS)) {

No longer need to check NIS bit ?

> -		if (likely(intr_status & XGMAC_RI)) {
> -			u64_stats_update_begin(&rx_q->rxq_stats.syncp);
> -			rx_q->rxq_stats.rx_normal_irq_n++;
> -			u64_stats_update_end(&rx_q->rxq_stats.syncp);
> -			ret |= handle_rx;
> -		}
> -		if (likely(intr_status & (XGMAC_TI | XGMAC_TBU))) {
> -			u64_stats_update_begin(&tx_q->txq_stats.syncp);
> -			tx_q->txq_stats.tx_normal_irq_n++;
> -			u64_stats_update_end(&tx_q->txq_stats.syncp);
> -			ret |= handle_tx;
> -		}
> +	if (likely(intr_status & XGMAC_RI)) {
> +		u64_stats_update_begin(&rx_q->rxq_stats.syncp);
> +		rx_q->rxq_stats.rx_normal_irq_n++;
> +		u64_stats_update_end(&rx_q->rxq_stats.syncp);
> +		ret |= handle_rx;
> +	}
> +	if (likely(intr_status & XGMAC_TI)) {
> +		u64_stats_update_begin(&tx_q->txq_stats.syncp);
> +		tx_q->txq_stats.tx_normal_irq_n++;
> +		u64_stats_update_end(&tx_q->txq_stats.syncp);
> +		ret |= handle_tx;
>   	}
> +	if (unlikely(intr_status & XGMAC_TBU))
> +		ret |= handle_tx;
>   
>   	/* Clear interrupts */
>   	writel(intr_en & intr_status, ioaddr + XGMAC_DMA_CH_STATUS(chan));


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT
  2023-08-09 16:50 ` [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT Jisheng Zhang
@ 2023-08-10 14:52   ` Alexandre TORGUE
  0 siblings, 0 replies; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 14:52 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:50, Jisheng Zhang wrote:
> The snps dwmac IP may support safety features, and those Safety
> Feature Correctible Error and Uncorrectible Error irqs may be
> separate irqs. Add support to parse the safety irqs from DT.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   .../net/ethernet/stmicro/stmmac/stmmac_platform.c    | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index 23d53ea04b24..29145682b57b 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -738,6 +738,18 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
>   		dev_info(&pdev->dev, "IRQ eth_lpi not found\n");
>   	}
>   
> +	stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce");
> +	if (stmmac_res->sfty_ce_irq < 0) {
> +		if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER)
> +			return -EPROBE_DEFER;
> +	}
> +
> +	stmmac_res->sfty_ue_irq = platform_get_irq_byname_optional(pdev, "sfty_ue");
> +	if (stmmac_res->sfty_ue_irq < 0) {
> +		if (stmmac_res->sfty_ue_irq == -EPROBE_DEFER)
> +			return -EPROBE_DEFER;
> +	}
> +
>   	stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0);
>   
>   	return PTR_ERR_OR_ZERO(stmmac_res->addr);
Acked-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>

Regards
Alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT
  2023-08-09 16:50 ` [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT Jisheng Zhang
@ 2023-08-10 14:57   ` Alexandre TORGUE
  2023-08-10 16:09     ` Jisheng Zhang
  0 siblings, 1 reply; 28+ messages in thread
From: Alexandre TORGUE @ 2023-08-10 14:57 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 8/9/23 18:50, Jisheng Zhang wrote:
> The snps dwmac IP may support per channel interrupt. Add support to
> parse the per channel irq from DT.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   .../net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++----
>   .../ethernet/stmicro/stmmac/stmmac_platform.c | 23 +++++++++++++++++++
>   2 files changed, 29 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 4ed5c976c7a3..245eeb7d3e83 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -3612,7 +3612,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
>   	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
>   		if (i >= MTL_MAX_RX_QUEUES)
>   			break;
> -		if (priv->rx_irq[i] == 0)
> +		if (priv->rx_irq[i] <= 0)

What do you fix here ?

>   			continue;
>   
>   		int_name = priv->int_name_rx_irq[i];
> @@ -3637,7 +3637,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
>   	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
>   		if (i >= MTL_MAX_TX_QUEUES)
>   			break;
> -		if (priv->tx_irq[i] == 0)
> +		if (priv->tx_irq[i] <= 0)

same here
>   			continue;
>   
>   		int_name = priv->int_name_tx_irq[i];
> @@ -7278,8 +7278,10 @@ int stmmac_dvr_probe(struct device *device,
>   	priv->plat = plat_dat;
>   	priv->ioaddr = res->addr;
>   	priv->dev->base_addr = (unsigned long)res->addr;
> -	priv->plat->dma_cfg->perch_irq_en =
> -		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
> +	if (res->rx_irq[0] > 0 && res->tx_irq[0] > 0) {
> +		priv->plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
> +		priv->plat->dma_cfg->perch_irq_en = true;
> +	}
>   
>   	priv->dev->irq = res->irq;
>   	priv->wol_irq = res->wol_irq;
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index 29145682b57b..9b46775b41ab 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -705,6 +705,9 @@ EXPORT_SYMBOL_GPL(stmmac_remove_config_dt);
>   int stmmac_get_platform_resources(struct platform_device *pdev,
>   				  struct stmmac_resources *stmmac_res)
>   {
> +	char irq_name[8];
> +	int i;
> +
>   	memset(stmmac_res, 0, sizeof(*stmmac_res));
>   
>   	/* Get IRQ information early to have an ability to ask for deferred
> @@ -738,6 +741,26 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
>   		dev_info(&pdev->dev, "IRQ eth_lpi not found\n");
>   	}
>   
> +	for (i = 0; i < MTL_MAX_RX_QUEUES; i++) {
> +		snprintf(irq_name, sizeof(irq_name), "rx%i", i);
> +		stmmac_res->rx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
> +		if (stmmac_res->rx_irq[i] < 0) {
> +			if (stmmac_res->rx_irq[i] == -EPROBE_DEFER)
> +				return -EPROBE_DEFER;
> +			break;
> +		}
> +	}
> +
> +	for (i = 0; i < MTL_MAX_TX_QUEUES; i++) {
> +		snprintf(irq_name, sizeof(irq_name), "tx%i", i);
> +		stmmac_res->tx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
> +		if (stmmac_res->tx_irq[i] < 0) {
> +			if (stmmac_res->tx_irq[i] == -EPROBE_DEFER)
> +				return -EPROBE_DEFER;
> +			break;
> +		}
> +	}
> +
>   	stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce");
>   	if (stmmac_res->sfty_ce_irq < 0) {
>   		if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support
  2023-08-09 17:38   ` Conor Dooley
@ 2023-08-10 15:45     ` Jisheng Zhang
  0 siblings, 0 replies; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-10 15:45 UTC (permalink / raw)
  To: Conor Dooley
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev,
	linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On Wed, Aug 09, 2023 at 06:38:36PM +0100, Conor Dooley wrote:
> On Thu, Aug 10, 2023 at 12:50:06AM +0800, Jisheng Zhang wrote:
> > The IP supports per channel interrupt, add support for this usage case.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> 
> I do not see a response to
> <https://lore.kernel.org/all/20230808-clapper-corncob-0af7afa65752@spud/>
> in my mailbox or on lore, nor is there any changes in v3 on this front.

oops, sorry, I didn't mbsync to fetch my inbox before sending out v3, so
I missed your review comments ;)

I will reply in the thread
> 
> Thanks,
> Conor.
> 
> > ---
> >  .../devicetree/bindings/net/snps,dwmac.yaml   | 33 +++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > index 5d81042f5634..5a63302ad200 100644
> > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > @@ -109,6 +109,7 @@ properties:
> >        - description: The interrupt that occurs when Rx exits the LPI state
> >        - description: The interrupt that occurs when Safety Feature Correctible Errors happen
> >        - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen
> > +      - description: All of the rx/tx per-channel interrupts
> >  
> >    interrupt-names:
> >      minItems: 1
> > @@ -118,6 +119,38 @@ properties:
> >        - const: eth_lpi
> >        - const: sfty_ce
> >        - const: sfty_ue
> > +      - const: rx0
> > +      - const: rx1
> > +      - const: rx2
> > +      - const: rx3
> > +      - const: rx4
> > +      - const: rx5
> > +      - const: rx6
> > +      - const: rx7
> > +      - const: rx8
> > +      - const: rx9
> > +      - const: rx10
> > +      - const: rx11
> > +      - const: rx12
> > +      - const: rx13
> > +      - const: rx14
> > +      - const: rx15
> > +      - const: tx0
> > +      - const: tx1
> > +      - const: tx2
> > +      - const: tx3
> > +      - const: tx4
> > +      - const: tx5
> > +      - const: tx6
> > +      - const: tx7
> > +      - const: tx8
> > +      - const: tx9
> > +      - const: tx10
> > +      - const: tx11
> > +      - const: tx12
> > +      - const: tx13
> > +      - const: tx14
> > +      - const: tx15
> >  
> >    clocks:
> >      minItems: 1
> > -- 
> > 2.40.1
> > 



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety
  2023-08-10 14:50   ` Alexandre TORGUE
@ 2023-08-10 16:02     ` Jisheng Zhang
  0 siblings, 0 replies; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-10 16:02 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu, netdev, linux-kernel, devicetree,
	linux-stm32, linux-arm-kernel

On Thu, Aug 10, 2023 at 04:50:18PM +0200, Alexandre TORGUE wrote:
> On 8/9/23 18:50, Jisheng Zhang wrote:
> > The IP supports per channel interrupt, when intel adds the per channel
> > interrupt support, the per channel irq is from MSI vector, but this
> > feature can also be supported on non-MSI platforms. Do some necessary
> > renaming to reflects this fact.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> >   .../net/ethernet/stmicro/stmmac/dwmac-intel.c |  4 +-
> >   .../net/ethernet/stmicro/stmmac/dwmac4_dma.c  |  2 +-
> >   .../net/ethernet/stmicro/stmmac/stmmac_main.c | 48 +++++++++----------
> >   include/linux/stmmac.h                        |  4 +-
> >   4 files changed, 29 insertions(+), 29 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> > index 0ffae785d8bd..99a072907008 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> > @@ -953,7 +953,7 @@ static int stmmac_config_single_msi(struct pci_dev *pdev,
> >   	res->irq = pci_irq_vector(pdev, 0);
> >   	res->wol_irq = res->irq;
> > -	plat->flags &= ~STMMAC_FLAG_MULTI_MSI_EN;
> > +	plat->flags &= ~STMMAC_FLAG_PERCH_IRQ_EN;
> >   	dev_info(&pdev->dev, "%s: Single IRQ enablement successful\n",
> >   		 __func__);
> > @@ -1005,7 +1005,7 @@ static int stmmac_config_multi_msi(struct pci_dev *pdev,
> >   	if (plat->msi_sfty_ue_vec < STMMAC_MSI_VEC_MAX)
> >   		res->sfty_ue_irq = pci_irq_vector(pdev, plat->msi_sfty_ue_vec);
> > -	plat->flags |= STMMAC_FLAG_MULTI_MSI_EN;
> > +	plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
> >   	dev_info(&pdev->dev, "%s: multi MSI enablement successful\n", __func__);
> >   	return 0;
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> > index 84d3a8551b03..9bf8adf466a2 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> > @@ -175,7 +175,7 @@ static void dwmac4_dma_init(void __iomem *ioaddr,
> >   	value = readl(ioaddr + DMA_BUS_MODE);
> > -	if (dma_cfg->multi_msi_en) {
> > +	if (dma_cfg->perch_irq_en) {
> >   		value &= ~DMA_BUS_MODE_INTM_MASK;
> >   		value |= (DMA_BUS_MODE_INTM_MODE1 << DMA_BUS_MODE_INTM_SHIFT);
> >   	}
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index 15ed3947361b..4ed5c976c7a3 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -125,11 +125,11 @@ module_param(chain_mode, int, 0444);
> >   MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode");
> >   static irqreturn_t stmmac_interrupt(int irq, void *dev_id);
> > -/* For MSI interrupts handling */
> > +/* For multi interrupts handling */
> >   static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id);
> >   static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id);
> > -static irqreturn_t stmmac_msi_intr_tx(int irq, void *data);
> > -static irqreturn_t stmmac_msi_intr_rx(int irq, void *data);
> > +static irqreturn_t stmmac_queue_intr_tx(int irq, void *data);
> > +static irqreturn_t stmmac_queue_intr_rx(int irq, void *data);
> >   static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue);
> >   static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue);
> >   static void stmmac_reset_queues_param(struct stmmac_priv *priv);
> > @@ -3513,7 +3513,7 @@ static void stmmac_free_irq(struct net_device *dev,
> >   	}
> >   }
> > -static int stmmac_request_irq_multi_msi(struct net_device *dev)
> > +static int stmmac_request_irq_multi(struct net_device *dev)
> 
> What mean "irq_multi". You change previously "multi_msi" by "perch_irq",
> maybe you could do something with this "perch" naming ?

The function request irq for all channels for STMMAC_FLAG_PERCH_IRQ_EN
case, so what about stmmac_request_irq_multi_channel?

> 
> >   {
> >   	struct stmmac_priv *priv = netdev_priv(dev);
> >   	enum request_irq_err irq_err;
> > @@ -3530,7 +3530,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   			  0, int_name, dev);
> >   	if (unlikely(ret < 0)) {
> >   		netdev_err(priv->dev,
> > -			   "%s: alloc mac MSI %d (error: %d)\n",
> > +			   "%s: alloc mac irq %d (error: %d)\n",
> >   			   __func__, dev->irq, ret);
> >   		irq_err = REQ_IRQ_ERR_MAC;
> >   		goto irq_error;
> > @@ -3547,7 +3547,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   				  0, int_name, dev);
> >   		if (unlikely(ret < 0)) {
> >   			netdev_err(priv->dev,
> > -				   "%s: alloc wol MSI %d (error: %d)\n",
> > +				   "%s: alloc wol irq %d (error: %d)\n",
> >   				   __func__, priv->wol_irq, ret);
> >   			irq_err = REQ_IRQ_ERR_WOL;
> >   			goto irq_error;
> > @@ -3565,7 +3565,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   				  0, int_name, dev);
> >   		if (unlikely(ret < 0)) {
> >   			netdev_err(priv->dev,
> > -				   "%s: alloc lpi MSI %d (error: %d)\n",
> > +				   "%s: alloc lpi irq %d (error: %d)\n",
> >   				   __func__, priv->lpi_irq, ret);
> >   			irq_err = REQ_IRQ_ERR_LPI;
> >   			goto irq_error;
> > @@ -3583,7 +3583,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   				  0, int_name, dev);
> >   		if (unlikely(ret < 0)) {
> >   			netdev_err(priv->dev,
> > -				   "%s: alloc sfty ce MSI %d (error: %d)\n",
> > +				   "%s: alloc sfty ce irq %d (error: %d)\n",
> >   				   __func__, priv->sfty_ce_irq, ret);
> >   			irq_err = REQ_IRQ_ERR_SFTY_CE;
> >   			goto irq_error;
> > @@ -3601,14 +3601,14 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   				  0, int_name, dev);
> >   		if (unlikely(ret < 0)) {
> >   			netdev_err(priv->dev,
> > -				   "%s: alloc sfty ue MSI %d (error: %d)\n",
> > +				   "%s: alloc sfty ue irq %d (error: %d)\n",
> >   				   __func__, priv->sfty_ue_irq, ret);
> >   			irq_err = REQ_IRQ_ERR_SFTY_UE;
> >   			goto irq_error;
> >   		}
> >   	}
> > -	/* Request Rx MSI irq */
> > +	/* Request Rx queue irq */
> >   	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
> >   		if (i >= MTL_MAX_RX_QUEUES)
> >   			break;
> > @@ -3618,11 +3618,11 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   		int_name = priv->int_name_rx_irq[i];
> >   		sprintf(int_name, "%s:%s-%d", dev->name, "rx", i);
> >   		ret = request_irq(priv->rx_irq[i],
> > -				  stmmac_msi_intr_rx,
> > +				  stmmac_queue_intr_rx,
> >   				  0, int_name, &priv->dma_conf.rx_queue[i]);
> >   		if (unlikely(ret < 0)) {
> >   			netdev_err(priv->dev,
> > -				   "%s: alloc rx-%d  MSI %d (error: %d)\n",
> > +				   "%s: alloc rx-%d irq %d (error: %d)\n",
> >   				   __func__, i, priv->rx_irq[i], ret);
> >   			irq_err = REQ_IRQ_ERR_RX;
> >   			irq_idx = i;
> > @@ -3633,7 +3633,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   		irq_set_affinity_hint(priv->rx_irq[i], &cpu_mask);
> >   	}
> > -	/* Request Tx MSI irq */
> > +	/* Request Tx queue irq */
> >   	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
> >   		if (i >= MTL_MAX_TX_QUEUES)
> >   			break;
> > @@ -3643,11 +3643,11 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
> >   		int_name = priv->int_name_tx_irq[i];
> >   		sprintf(int_name, "%s:%s-%d", dev->name, "tx", i);
> >   		ret = request_irq(priv->tx_irq[i],
> > -				  stmmac_msi_intr_tx,
> > +				  stmmac_queue_intr_tx,
> >   				  0, int_name, &priv->dma_conf.tx_queue[i]);
> >   		if (unlikely(ret < 0)) {
> >   			netdev_err(priv->dev,
> > -				   "%s: alloc tx-%d  MSI %d (error: %d)\n",
> > +				   "%s: alloc tx-%d irq %d (error: %d)\n",
> >   				   __func__, i, priv->tx_irq[i], ret);
> >   			irq_err = REQ_IRQ_ERR_TX;
> >   			irq_idx = i;
> > @@ -3722,8 +3722,8 @@ static int stmmac_request_irq(struct net_device *dev)
> >   	int ret;
> >   	/* Request the IRQ lines */
> > -	if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN)
> > -		ret = stmmac_request_irq_multi_msi(dev);
> > +	if (priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN)
> > +		ret = stmmac_request_irq_multi(dev);
> >   	else
> >   		ret = stmmac_request_irq_single(dev);
> > @@ -5938,7 +5938,7 @@ static irqreturn_t stmmac_safety_interrupt(int irq, void *dev_id)
> >   	return IRQ_HANDLED;
> >   }
> > -static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
> > +static irqreturn_t stmmac_queue_intr_tx(int irq, void *data)
> >   {
> >   	struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
> >   	struct stmmac_dma_conf *dma_conf;
> > @@ -5970,7 +5970,7 @@ static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
> >   	return IRQ_HANDLED;
> >   }
> > -static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
> > +static irqreturn_t stmmac_queue_intr_rx(int irq, void *data)
> >   {
> >   	struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
> >   	struct stmmac_dma_conf *dma_conf;
> > @@ -6007,12 +6007,12 @@ static void stmmac_poll_controller(struct net_device *dev)
> >   	if (test_bit(STMMAC_DOWN, &priv->state))
> >   		return;
> > -	if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN) {
> > +	if (priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN) {
> >   		for (i = 0; i < priv->plat->rx_queues_to_use; i++)
> > -			stmmac_msi_intr_rx(0, &priv->dma_conf.rx_queue[i]);
> > +			stmmac_queue_intr_rx(0, &priv->dma_conf.rx_queue[i]);
> >   		for (i = 0; i < priv->plat->tx_queues_to_use; i++)
> > -			stmmac_msi_intr_tx(0, &priv->dma_conf.tx_queue[i]);
> > +			stmmac_queue_intr_tx(0, &priv->dma_conf.tx_queue[i]);
> >   	} else {
> >   		disable_irq(dev->irq);
> >   		stmmac_interrupt(dev->irq, dev);
> > @@ -7278,8 +7278,8 @@ int stmmac_dvr_probe(struct device *device,
> >   	priv->plat = plat_dat;
> >   	priv->ioaddr = res->addr;
> >   	priv->dev->base_addr = (unsigned long)res->addr;
> > -	priv->plat->dma_cfg->multi_msi_en =
> > -		(priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN);
> > +	priv->plat->dma_cfg->perch_irq_en =
> > +		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
> >   	priv->dev->irq = res->irq;
> >   	priv->wol_irq = res->wol_irq;
> > diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> > index 11671fd6adee..76249117c0ff 100644
> > --- a/include/linux/stmmac.h
> > +++ b/include/linux/stmmac.h
> > @@ -96,7 +96,7 @@ struct stmmac_dma_cfg {
> >   	int mixed_burst;
> >   	bool aal;
> >   	bool eame;
> > -	bool multi_msi_en;
> > +	bool perch_irq_en;
> >   	bool dche;
> >   };
> > @@ -211,7 +211,7 @@ struct dwmac4_addrs {
> >   #define STMMAC_FLAG_TSO_EN			BIT(4)
> >   #define STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP	BIT(5)
> >   #define STMMAC_FLAG_VLAN_FAIL_Q_EN		BIT(6)
> > -#define STMMAC_FLAG_MULTI_MSI_EN		BIT(7)
> > +#define STMMAC_FLAG_PERCH_IRQ_EN		BIT(7)
> >   #define STMMAC_FLAG_EXT_SNAPSHOT_EN		BIT(8)
> >   #define STMMAC_FLAG_INT_SNAPSHOT_EN		BIT(9)
> >   #define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI		BIT(10)
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT
  2023-08-10 14:57   ` Alexandre TORGUE
@ 2023-08-10 16:09     ` Jisheng Zhang
  2023-08-10 16:21       ` Jisheng Zhang
  0 siblings, 1 reply; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-10 16:09 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu, netdev, linux-kernel, devicetree,
	linux-stm32, linux-arm-kernel

On Thu, Aug 10, 2023 at 04:57:00PM +0200, Alexandre TORGUE wrote:
> On 8/9/23 18:50, Jisheng Zhang wrote:
> > The snps dwmac IP may support per channel interrupt. Add support to
> > parse the per channel irq from DT.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> >   .../net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++----
> >   .../ethernet/stmicro/stmmac/stmmac_platform.c | 23 +++++++++++++++++++
> >   2 files changed, 29 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index 4ed5c976c7a3..245eeb7d3e83 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -3612,7 +3612,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
> >   	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
> >   		if (i >= MTL_MAX_RX_QUEUES)
> >   			break;
> > -		if (priv->rx_irq[i] == 0)
> > +		if (priv->rx_irq[i] <= 0)
> 
> What do you fix here ?

No bug to fix, but adjust for parsing optional channel irqs from DT:
rx_irq[i] and tx_irq[i] may come from platform_get_irq_byname_optional()
so for !STMMAC_FLAG_PERCH_IRQ_EN platforms, they can be < 0. Before

Thanks
> 
> >   			continue;
> >   		int_name = priv->int_name_rx_irq[i];
> > @@ -3637,7 +3637,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
> >   	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
> >   		if (i >= MTL_MAX_TX_QUEUES)
> >   			break;
> > -		if (priv->tx_irq[i] == 0)
> > +		if (priv->tx_irq[i] <= 0)
> 
> same here
> >   			continue;
> >   		int_name = priv->int_name_tx_irq[i];
> > @@ -7278,8 +7278,10 @@ int stmmac_dvr_probe(struct device *device,
> >   	priv->plat = plat_dat;
> >   	priv->ioaddr = res->addr;
> >   	priv->dev->base_addr = (unsigned long)res->addr;
> > -	priv->plat->dma_cfg->perch_irq_en =
> > -		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
> > +	if (res->rx_irq[0] > 0 && res->tx_irq[0] > 0) {
> > +		priv->plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
> > +		priv->plat->dma_cfg->perch_irq_en = true;
> > +	}
> >   	priv->dev->irq = res->irq;
> >   	priv->wol_irq = res->wol_irq;
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > index 29145682b57b..9b46775b41ab 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > @@ -705,6 +705,9 @@ EXPORT_SYMBOL_GPL(stmmac_remove_config_dt);
> >   int stmmac_get_platform_resources(struct platform_device *pdev,
> >   				  struct stmmac_resources *stmmac_res)
> >   {
> > +	char irq_name[8];
> > +	int i;
> > +
> >   	memset(stmmac_res, 0, sizeof(*stmmac_res));
> >   	/* Get IRQ information early to have an ability to ask for deferred
> > @@ -738,6 +741,26 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
> >   		dev_info(&pdev->dev, "IRQ eth_lpi not found\n");
> >   	}
> > +	for (i = 0; i < MTL_MAX_RX_QUEUES; i++) {
> > +		snprintf(irq_name, sizeof(irq_name), "rx%i", i);
> > +		stmmac_res->rx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
> > +		if (stmmac_res->rx_irq[i] < 0) {
> > +			if (stmmac_res->rx_irq[i] == -EPROBE_DEFER)
> > +				return -EPROBE_DEFER;
> > +			break;
> > +		}
> > +	}
> > +
> > +	for (i = 0; i < MTL_MAX_TX_QUEUES; i++) {
> > +		snprintf(irq_name, sizeof(irq_name), "tx%i", i);
> > +		stmmac_res->tx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
> > +		if (stmmac_res->tx_irq[i] < 0) {
> > +			if (stmmac_res->tx_irq[i] == -EPROBE_DEFER)
> > +				return -EPROBE_DEFER;
> > +			break;
> > +		}
> > +	}
> > +
> >   	stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce");
> >   	if (stmmac_res->sfty_ce_irq < 0) {
> >   		if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER)
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT
  2023-08-10 16:09     ` Jisheng Zhang
@ 2023-08-10 16:21       ` Jisheng Zhang
  0 siblings, 0 replies; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-10 16:21 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu, netdev, linux-kernel, devicetree,
	linux-stm32, linux-arm-kernel

On Fri, Aug 11, 2023 at 12:09:38AM +0800, Jisheng Zhang wrote:
> On Thu, Aug 10, 2023 at 04:57:00PM +0200, Alexandre TORGUE wrote:
> > On 8/9/23 18:50, Jisheng Zhang wrote:
> > > The snps dwmac IP may support per channel interrupt. Add support to
> > > parse the per channel irq from DT.
> > > 
> > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > > ---
> > >   .../net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++----
> > >   .../ethernet/stmicro/stmmac/stmmac_platform.c | 23 +++++++++++++++++++
> > >   2 files changed, 29 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > index 4ed5c976c7a3..245eeb7d3e83 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > > @@ -3612,7 +3612,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
> > >   	for (i = 0; i < priv->plat->rx_queues_to_use; i++) {
> > >   		if (i >= MTL_MAX_RX_QUEUES)
> > >   			break;
> > > -		if (priv->rx_irq[i] == 0)
> > > +		if (priv->rx_irq[i] <= 0)
> > 
> > What do you fix here ?
> 
> No bug to fix, but adjust for parsing optional channel irqs from DT:
> rx_irq[i] and tx_irq[i] may come from platform_get_irq_byname_optional()
> so for !STMMAC_FLAG_PERCH_IRQ_EN platforms, they can be < 0. Before
> 

oops, I sent this email too quick before I complete it.

After this patch(parse optional channel irqs from DT), rx_irq[i] and
tx_irq[i] may come from platform_get_irq_byname_optional(),
so for STMMAC_FLAG_PERCH_IRQ_EN platforms which support less than
MTL_MAX_TX_QUEUES channels, for example 8 tx and 8 rx, the last
tx_irq[i] or rx_irq[i] can be < 0.

Thanks

> > >   			continue;
> > >   		int_name = priv->int_name_rx_irq[i];
> > > @@ -3637,7 +3637,7 @@ static int stmmac_request_irq_multi(struct net_device *dev)
> > >   	for (i = 0; i < priv->plat->tx_queues_to_use; i++) {
> > >   		if (i >= MTL_MAX_TX_QUEUES)
> > >   			break;
> > > -		if (priv->tx_irq[i] == 0)
> > > +		if (priv->tx_irq[i] <= 0)
> > 
> > same here
> > >   			continue;
> > >   		int_name = priv->int_name_tx_irq[i];
> > > @@ -7278,8 +7278,10 @@ int stmmac_dvr_probe(struct device *device,
> > >   	priv->plat = plat_dat;
> > >   	priv->ioaddr = res->addr;
> > >   	priv->dev->base_addr = (unsigned long)res->addr;
> > > -	priv->plat->dma_cfg->perch_irq_en =
> > > -		(priv->plat->flags & STMMAC_FLAG_PERCH_IRQ_EN);
> > > +	if (res->rx_irq[0] > 0 && res->tx_irq[0] > 0) {
> > > +		priv->plat->flags |= STMMAC_FLAG_PERCH_IRQ_EN;
> > > +		priv->plat->dma_cfg->perch_irq_en = true;
> > > +	}
> > >   	priv->dev->irq = res->irq;
> > >   	priv->wol_irq = res->wol_irq;
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > > index 29145682b57b..9b46775b41ab 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> > > @@ -705,6 +705,9 @@ EXPORT_SYMBOL_GPL(stmmac_remove_config_dt);
> > >   int stmmac_get_platform_resources(struct platform_device *pdev,
> > >   				  struct stmmac_resources *stmmac_res)
> > >   {
> > > +	char irq_name[8];
> > > +	int i;
> > > +
> > >   	memset(stmmac_res, 0, sizeof(*stmmac_res));
> > >   	/* Get IRQ information early to have an ability to ask for deferred
> > > @@ -738,6 +741,26 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
> > >   		dev_info(&pdev->dev, "IRQ eth_lpi not found\n");
> > >   	}
> > > +	for (i = 0; i < MTL_MAX_RX_QUEUES; i++) {
> > > +		snprintf(irq_name, sizeof(irq_name), "rx%i", i);
> > > +		stmmac_res->rx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
> > > +		if (stmmac_res->rx_irq[i] < 0) {
> > > +			if (stmmac_res->rx_irq[i] == -EPROBE_DEFER)
> > > +				return -EPROBE_DEFER;
> > > +			break;
> > > +		}
> > > +	}
> > > +
> > > +	for (i = 0; i < MTL_MAX_TX_QUEUES; i++) {
> > > +		snprintf(irq_name, sizeof(irq_name), "tx%i", i);
> > > +		stmmac_res->tx_irq[i] = platform_get_irq_byname_optional(pdev, irq_name);
> > > +		if (stmmac_res->tx_irq[i] < 0) {
> > > +			if (stmmac_res->tx_irq[i] == -EPROBE_DEFER)
> > > +				return -EPROBE_DEFER;
> > > +			break;
> > > +		}
> > > +	}
> > > +
> > >   	stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce");
> > >   	if (stmmac_res->sfty_ce_irq < 0) {
> > >   		if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER)
> > 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31
@ 2023-08-13 14:18 G Thomas, Rohan
  2023-08-16 15:40 ` Jisheng Zhang
  0 siblings, 1 reply; 28+ messages in thread
From: G Thomas, Rohan @ 2023-08-13 14:18 UTC (permalink / raw)
  To: jszhang@kernel.org
  Cc: alexandre.torgue@foss.st.com, conor+dt@kernel.org,
	davem@davemloft.net, devicetree@vger.kernel.org,
	edumazet@google.com, joabreu@synopsys.com,
	krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org,
	pabeni@redhat.com, peppe.cavallaro@st.com, robh+dt@kernel.org


On 8/9/23 18:50, Jisheng Zhang wrote:
> The IP can support up to 31 xgmac c22 addresses now.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> index 3db1cb0fd160..e6d8e34fafef 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> @@ -40,7 +40,7 @@
>   #define MII_XGMAC_WRITE			(1 << MII_XGMAC_CMD_SHIFT)
>   #define MII_XGMAC_READ			(3 << MII_XGMAC_CMD_SHIFT)
>   #define MII_XGMAC_BUSY			BIT(22)
> -#define MII_XGMAC_MAX_C22ADDR		3
> +#define MII_XGMAC_MAX_C22ADDR		31
>   #define MII_XGMAC_C22P_MASK		GENMASK(MII_XGMAC_MAX_C22ADDR, 0)
>   #define MII_XGMAC_PA_SHIFT		16
>   #define MII_XGMAC_DA_SHIFT		21

Recent commit 10857e677905 ("net: stmmac: XGMAC support for mdio C22
addr > 3") already addressed this in a different way. As per Synopsis
IP team until version 2.2, XGMAC supports only MDIO devices 0 - 3. An
XGMAC IP version check is newly added for the same reason. I think this
covers your commit also. Please have a look and if so you can drop this
commit.

BR,
Rohan


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 07/10] dt-bindings: net: snps,dwmac: add safety irq support
  2023-08-09 16:50 ` [PATCH net-next v3 07/10] dt-bindings: net: snps,dwmac: add safety irq support Jisheng Zhang
@ 2023-08-15 21:09   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-15 21:09 UTC (permalink / raw)
  To: Jisheng Zhang, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-kernel, devicetree, linux-stm32, linux-arm-kernel

On 09/08/2023 18:50, Jisheng Zhang wrote:
> The snps dwmac IP support safety features, and those Safety Feature
> Correctible Error and Uncorrectible Error irqs may be separate irqs.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---

Please share, how did you address comment from Conor on v2?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31
  2023-08-13 14:18 [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31 G Thomas, Rohan
@ 2023-08-16 15:40 ` Jisheng Zhang
  0 siblings, 0 replies; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-16 15:40 UTC (permalink / raw)
  To: G Thomas, Rohan
  Cc: alexandre.torgue@foss.st.com, conor+dt@kernel.org,
	davem@davemloft.net, devicetree@vger.kernel.org,
	edumazet@google.com, joabreu@synopsys.com,
	krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org,
	pabeni@redhat.com, peppe.cavallaro@st.com, robh+dt@kernel.org

On Sun, Aug 13, 2023 at 02:18:27PM +0000, G Thomas, Rohan wrote:
> 
> On 8/9/23 18:50, Jisheng Zhang wrote:
> > The IP can support up to 31 xgmac c22 addresses now.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> >   drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> > index 3db1cb0fd160..e6d8e34fafef 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> > @@ -40,7 +40,7 @@
> >   #define MII_XGMAC_WRITE			(1 << MII_XGMAC_CMD_SHIFT)
> >   #define MII_XGMAC_READ			(3 << MII_XGMAC_CMD_SHIFT)
> >   #define MII_XGMAC_BUSY			BIT(22)
> > -#define MII_XGMAC_MAX_C22ADDR		3
> > +#define MII_XGMAC_MAX_C22ADDR		31
> >   #define MII_XGMAC_C22P_MASK		GENMASK(MII_XGMAC_MAX_C22ADDR, 0)
> >   #define MII_XGMAC_PA_SHIFT		16
> >   #define MII_XGMAC_DA_SHIFT		21
> 
> Recent commit 10857e677905 ("net: stmmac: XGMAC support for mdio C22
> addr > 3") already addressed this in a different way. As per Synopsis
> IP team until version 2.2, XGMAC supports only MDIO devices 0 - 3. An

I didn't find your patch in mailist when I submit the v1 on 23 July, in
fact my series was earlier than yours.

> XGMAC IP version check is newly added for the same reason. I think this
> covers your commit also. Please have a look and if so you can drop this
> commit.

Dropped in new version.

> 
> BR,
> Rohan
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq
  2023-08-10 14:52   ` Alexandre TORGUE
@ 2023-08-16 15:52     ` Jisheng Zhang
  0 siblings, 0 replies; 28+ messages in thread
From: Jisheng Zhang @ 2023-08-16 15:52 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Giuseppe Cavallaro, Jose Abreu, netdev, linux-kernel, devicetree,
	linux-stm32, linux-arm-kernel

On Thu, Aug 10, 2023 at 04:52:01PM +0200, Alexandre TORGUE wrote:
> On 8/9/23 18:50, Jisheng Zhang wrote:
> > The IP supports per channel interrupt, add support for this usage case.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> >   .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |  2 ++
> >   .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    | 33 +++++++++++--------
> >   2 files changed, 22 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> > index 81cbb13a101d..12e1228ccf2a 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> > @@ -327,6 +327,8 @@
> >   /* DMA Registers */
> >   #define XGMAC_DMA_MODE			0x00003000
> > +#define XGMAC_INTM			GENMASK(13, 12)
> > +#define XGMAC_INTM_MODE1		0x1
> >   #define XGMAC_SWR			BIT(0)
> >   #define XGMAC_DMA_SYSBUS_MODE		0x00003004
> >   #define XGMAC_WR_OSR_LMT		GENMASK(29, 24)
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> > index b5ba4e0cca55..ef25af92d6cc 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> > @@ -31,6 +31,13 @@ static void dwxgmac2_dma_init(void __iomem *ioaddr,
> >   		value |= XGMAC_EAME;
> >   	writel(value, ioaddr + XGMAC_DMA_SYSBUS_MODE);
> > +
> > +	if (dma_cfg->perch_irq_en) {
> > +		value = readl(ioaddr + XGMAC_DMA_MODE);
> > +		value &= ~XGMAC_INTM;
> > +		value |= FIELD_PREP(XGMAC_INTM, XGMAC_INTM_MODE1);
> > +		writel(value, ioaddr + XGMAC_DMA_MODE);
> > +	}
> >   }
> >   static void dwxgmac2_dma_init_chan(struct stmmac_priv *priv,
> > @@ -365,20 +372,20 @@ static int dwxgmac2_dma_interrupt(struct stmmac_priv *priv,
> >   	}
> >   	/* TX/RX NORMAL interrupts */
> > -	if (likely(intr_status & XGMAC_NIS)) {
> 
> No longer need to check NIS bit ?

Hi Alexandre,

NIS is RI | TI | TBU, since we have checked these three
bits we can ignore NIS. And dwmac4 behaves similarly.

Thanks

> 
> > -		if (likely(intr_status & XGMAC_RI)) {
> > -			u64_stats_update_begin(&rx_q->rxq_stats.syncp);
> > -			rx_q->rxq_stats.rx_normal_irq_n++;
> > -			u64_stats_update_end(&rx_q->rxq_stats.syncp);
> > -			ret |= handle_rx;
> > -		}
> > -		if (likely(intr_status & (XGMAC_TI | XGMAC_TBU))) {
> > -			u64_stats_update_begin(&tx_q->txq_stats.syncp);
> > -			tx_q->txq_stats.tx_normal_irq_n++;
> > -			u64_stats_update_end(&tx_q->txq_stats.syncp);
> > -			ret |= handle_tx;
> > -		}
> > +	if (likely(intr_status & XGMAC_RI)) {
> > +		u64_stats_update_begin(&rx_q->rxq_stats.syncp);
> > +		rx_q->rxq_stats.rx_normal_irq_n++;
> > +		u64_stats_update_end(&rx_q->rxq_stats.syncp);
> > +		ret |= handle_rx;
> > +	}
> > +	if (likely(intr_status & XGMAC_TI)) {
> > +		u64_stats_update_begin(&tx_q->txq_stats.syncp);
> > +		tx_q->txq_stats.tx_normal_irq_n++;
> > +		u64_stats_update_end(&tx_q->txq_stats.syncp);
> > +		ret |= handle_tx;
> >   	}
> > +	if (unlikely(intr_status & XGMAC_TBU))
> > +		ret |= handle_tx;
> >   	/* Clear interrupts */
> >   	writel(intr_en & intr_status, ioaddr + XGMAC_DMA_CH_STATUS(chan));
> 

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-08-16 16:05 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 16:49 [PATCH net-next v3 00/10] net: stmmac: add new features to xgmac Jisheng Zhang
2023-08-09 16:49 ` [PATCH net-next v3 01/10] net: stmmac: correct RX COE parsing for xgmac Jisheng Zhang
2023-08-10 13:45   ` Alexandre TORGUE
2023-08-09 16:49 ` [PATCH net-next v3 02/10] net: stmmac: xgmac: add more feature parsing from hw cap Jisheng Zhang
2023-08-10 13:46   ` Alexandre TORGUE
2023-08-09 16:50 ` [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31 Jisheng Zhang
2023-08-10 13:46   ` Alexandre TORGUE
2023-08-09 16:50 ` [PATCH net-next v3 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16 Jisheng Zhang
2023-08-10 14:43   ` Alexandre TORGUE
2023-08-09 16:50 ` [PATCH net-next v3 05/10] net: stmmac: reflect multi irqs for tx/rx channels and mac and safety Jisheng Zhang
2023-08-10 14:50   ` Alexandre TORGUE
2023-08-10 16:02     ` Jisheng Zhang
2023-08-09 16:50 ` [PATCH net-next v3 06/10] net: stmmac: xgmac: support per-channel irq Jisheng Zhang
2023-08-10 14:52   ` Alexandre TORGUE
2023-08-16 15:52     ` Jisheng Zhang
2023-08-09 16:50 ` [PATCH net-next v3 07/10] dt-bindings: net: snps,dwmac: add safety irq support Jisheng Zhang
2023-08-15 21:09   ` Krzysztof Kozlowski
2023-08-09 16:50 ` [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT Jisheng Zhang
2023-08-10 14:52   ` Alexandre TORGUE
2023-08-09 16:50 ` [PATCH net-next v3 09/10] dt-bindings: net: snps,dwmac: add per channel irq support Jisheng Zhang
2023-08-09 17:38   ` Conor Dooley
2023-08-10 15:45     ` Jisheng Zhang
2023-08-09 16:50 ` [PATCH net-next v3 10/10] net: stmmac: platform: support parsing per channel irq from DT Jisheng Zhang
2023-08-10 14:57   ` Alexandre TORGUE
2023-08-10 16:09     ` Jisheng Zhang
2023-08-10 16:21       ` Jisheng Zhang
  -- strict thread matches above, loose matches on Subject: below --
2023-08-13 14:18 [PATCH net-next v3 03/10] net: stmmac: mdio: enlarge the max XGMAC C22 ADDR to 31 G Thomas, Rohan
2023-08-16 15:40 ` Jisheng Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).