Devicetree
 help / color / mirror / Atom feed
* [net-next v1 0/6] Add synopsys designware GMAC NCSI support
@ 2026-06-10  7:24 Minda Chen
  2026-06-10  7:24 ` [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property Minda Chen
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

This patch set is for adding jhb100 GMAC NCSI function.
jhb100 is a Starfive new RISC-V SoC for datacenter BMC (BaseBoard
Managent Controller). Similar with Aspeed 27x0.

jhb100 contains 2 synopsys RMII(RGMII can be use as RMII) interfaces
GMAC, can be use as NCSI GMAC (network controller sideband interface),
do not connect with mdio PHY but connect with host server OCP network
device and share with network port.

The code which calling NCSI netdevice API is similar with
driver/net/ethernet/faraday/ftgmac100.c

The NCSI example:
_________________                 _______________
|               |                 |             |           ___________
|       CLK_50M |---------------->|             |<--------->|         |
|        TX_EN  |---------------->|             |<--------->|         |
|        TXD0   |---------------->|  OCP network|<--------->|  RJ45   |
|BMC     TXD1   |---------------->|    device   |<--------->|  port   |
|RMII    CRS_DV |<----------------|             |<--------->|         |
|port    RX_D0  |<----------------|             |<--------->|         |
|        RX_D1  |<----------------|             |<--------->|_________|
|_______________|                 |_____________|
				    | | | | |
                                    | | | | |
				    host server
				    PCIe interface

The jhb100 minimal system upstream is in progress:
https://patchwork.kernel.org/project/linux-riscv/cover/20260508053632.818548-1-changhuang.liang@starfivetech.com/

The patch base net-next (base commit list below)

Minda Chen (6):
  dt-bindings: net: dwmac: Add snps,use-ncsi property
  net: stmmac: Checking whether priv->phylink if NULL in NCSI case
  net: stmmac: Add register NCSI device support
  net: stmmac: Add NCSI VLAN setting
  net: dwmac4: Add NCSI mac speed and duplex setting in NCSI case
  net: stmmac: ethtool: Do NOT call phylink function in NCSI mode.

 .../devicetree/bindings/net/snps,dwmac.yaml   |   7 ++
 .../net/ethernet/stmicro/stmmac/dwmac4_core.c |  15 ++-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |   1 +
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  32 +++++-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 108 +++++++++++++-----
 .../ethernet/stmicro/stmmac/stmmac_phylink.h  | 106 +++++++++++++++++
 .../ethernet/stmicro/stmmac/stmmac_platform.c |  10 +-
 include/linux/stmmac.h                        |   1 +
 8 files changed, 246 insertions(+), 34 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_phylink.h


base-commit: 903db046d5579bef0ea699eae4b279dd6455fc9f
-- 
2.17.1


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

* [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property
  2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
@ 2026-06-10  7:24 ` Minda Chen
  2026-06-10  7:50   ` Krzysztof Kozlowski
  2026-06-10  8:17   ` Andrew Lunn
  2026-06-10  7:24 ` [net-next v1 2/6] net: stmmac: Checking whether priv->phylink if NULL in NCSI case Minda Chen
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

Add snps,use-ncsi dts bindings property for Synopsys designware
ethernet MAC with RMII interface and used as sideband interface
network controller(NCSI).

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 Documentation/devicetree/bindings/net/snps,dwmac.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 2449311c6d28..05b1d8428f65 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -545,6 +545,13 @@ properties:
       Enables the TSO feature otherwise it will be managed by MAC HW capability
       register.
 
+  snps,use-ncsi:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Use the NC-SI stack instead of an MDIO PHY. Currently assumes
+      rmii (100bT) but kept as a separate property in case NC-SI grows support
+      for a gigabit link.
+
   mdio:
     $ref: mdio.yaml#
     unevaluatedProperties: false
-- 
2.17.1


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

* [net-next v1 2/6] net: stmmac: Checking whether priv->phylink if NULL in NCSI case
  2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
  2026-06-10  7:24 ` [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property Minda Chen
@ 2026-06-10  7:24 ` Minda Chen
  2026-06-10  8:26   ` Andrew Lunn
  2026-06-10  7:24 ` [net-next v1 3/6] net: stmmac: Add register NCSI device support Minda Chen
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

In NCSI case, RMII do not connect mdio PHY, so the phylink is NULL,
and need to checking if phylink is NULL, So add stmmac phylink
wrapper function to checking whether phylink is NULL.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  55 ++++-----
 .../ethernet/stmicro/stmmac/stmmac_phylink.h  | 106 ++++++++++++++++++
 2 files changed, 134 insertions(+), 27 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_phylink.h

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 35da51c26248..010802389772 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -38,7 +38,6 @@
 #include <linux/seq_file.h>
 #endif /* CONFIG_DEBUG_FS */
 #include <linux/net_tstamp.h>
-#include <linux/phylink.h>
 #include <linux/udp.h>
 #include <linux/bpf_trace.h>
 #include <net/devlink.h>
@@ -49,6 +48,7 @@
 #include "stmmac_fpe.h"
 #include "stmmac.h"
 #include "stmmac_pcs.h"
+#include "stmmac_phylink.h"
 #include "stmmac_xdp.h"
 #include <linux/reset.h>
 #include <linux/of_mdio.h>
@@ -1323,7 +1323,7 @@ static int stmmac_init_phy(struct net_device *dev)
 	u32 dev_flags = 0;
 	int ret;
 
-	if (!phylink_expects_phy(priv->phylink))
+	if (!stmmac_phylink_expects_phy(priv->phylink))
 		return 0;
 
 	if (priv->hw->xpcs &&
@@ -3655,7 +3655,7 @@ static int stmmac_hw_setup(struct net_device *dev)
 
 	/* Make sure RX clock is enabled */
 	if (priv->hw->phylink_pcs)
-		phylink_pcs_pre_init(priv->phylink, priv->hw->phylink_pcs);
+		stmmac_phylink_pcs_pre_init(priv->phylink, priv->hw->phylink_pcs);
 
 	/* Note that clk_rx_i must be running for reset to complete. This
 	 * clock may also be required when setting the MAC address.
@@ -3663,12 +3663,12 @@ static int stmmac_hw_setup(struct net_device *dev)
 	 * Block the receive clock stop for LPI mode at the PHY in case
 	 * the link is established with EEE mode active.
 	 */
-	phylink_rx_clk_stop_block(priv->phylink);
+	stmmac_phylink_rx_clk_stop_block(priv->phylink);
 
 	/* DMA initialization and SW reset */
 	ret = stmmac_init_dma_engine(priv);
 	if (ret < 0) {
-		phylink_rx_clk_stop_unblock(priv->phylink);
+		stmmac_phylink_rx_clk_stop_unblock(priv->phylink);
 		netdev_err(priv->dev, "%s: DMA engine initialization failed\n",
 			   __func__);
 		return ret;
@@ -3676,7 +3676,7 @@ static int stmmac_hw_setup(struct net_device *dev)
 
 	/* Copy the MAC addr into the HW  */
 	stmmac_set_umac_addr(priv, priv->hw, dev->dev_addr, 0);
-	phylink_rx_clk_stop_unblock(priv->phylink);
+	stmmac_phylink_rx_clk_stop_unblock(priv->phylink);
 
 	/* Initialize the MAC Core */
 	stmmac_core_init(priv, priv->hw, dev);
@@ -3752,9 +3752,9 @@ static int stmmac_hw_setup(struct net_device *dev)
 	/* Start the ball rolling... */
 	stmmac_start_all_dma(priv);
 
-	phylink_rx_clk_stop_block(priv->phylink);
+	stmmac_phylink_rx_clk_stop_block(priv->phylink);
 	stmmac_set_hw_vlan_mode(priv, priv->hw);
-	phylink_rx_clk_stop_unblock(priv->phylink);
+	stmmac_phylink_rx_clk_stop_unblock(priv->phylink);
 
 	return 0;
 }
@@ -4159,7 +4159,7 @@ static int __stmmac_open(struct net_device *dev,
 
 	stmmac_init_coalesce(priv);
 
-	phylink_start(priv->phylink);
+	stmmac_phylink_start(priv->phylink);
 
 	stmmac_vlan_restore(priv);
 
@@ -4174,7 +4174,7 @@ static int __stmmac_open(struct net_device *dev,
 	return 0;
 
 irq_error:
-	phylink_stop(priv->phylink);
+	stmmac_phylink_stop(priv->phylink);
 
 	for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
 		hrtimer_cancel(&priv->dma_conf.tx_queue[chan].txtimer);
@@ -4219,14 +4219,14 @@ static int stmmac_open(struct net_device *dev)
 	kfree(dma_conf);
 
 	/* We may have called phylink_speed_down before */
-	phylink_speed_up(priv->phylink);
+	stmmac_phylink_speed_up(priv->phylink);
 
 	return ret;
 
 err_serdes:
 	stmmac_legacy_serdes_power_down(priv);
 err_disconnect_phy:
-	phylink_disconnect_phy(priv->phylink);
+	stmmac_phylink_disconnect_phy(priv->phylink);
 err_runtime_pm:
 	pm_runtime_put(priv->device);
 err_dma_resources:
@@ -4241,7 +4241,7 @@ static void __stmmac_release(struct net_device *dev)
 	u8 chan;
 
 	/* Stop and disconnect the PHY */
-	phylink_stop(priv->phylink);
+	stmmac_phylink_stop(priv->phylink);
 
 	stmmac_disable_all_queues(priv);
 
@@ -4280,12 +4280,12 @@ static int stmmac_release(struct net_device *dev)
 	 * to its slowest speed to save power.
 	 */
 	if (device_may_wakeup(priv->device))
-		phylink_speed_down(priv->phylink, false);
+		stmmac_phylink_speed_down(priv->phylink, false);
 
 	__stmmac_release(dev);
 
 	stmmac_legacy_serdes_power_down(priv);
-	phylink_disconnect_phy(priv->phylink);
+	stmmac_phylink_disconnect_phy(priv->phylink);
 	pm_runtime_put(priv->device);
 
 	return 0;
@@ -6209,9 +6209,9 @@ static int stmmac_set_features(struct net_device *netdev,
 	else
 		priv->hw->hw_vlan_en = false;
 
-	phylink_rx_clk_stop_block(priv->phylink);
+	stmmac_phylink_rx_clk_stop_block(priv->phylink);
 	stmmac_set_hw_vlan_mode(priv, priv->hw);
-	phylink_rx_clk_stop_unblock(priv->phylink);
+	stmmac_phylink_rx_clk_stop_unblock(priv->phylink);
 
 	return 0;
 }
@@ -6386,7 +6386,8 @@ static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 	case SIOCGMIIPHY:
 	case SIOCGMIIREG:
 	case SIOCSMIIREG:
-		ret = phylink_mii_ioctl(priv->phylink, rq, cmd);
+		if (priv->phylink)
+			ret = phylink_mii_ioctl(priv->phylink, rq, cmd);
 		break;
 	default:
 		break;
@@ -6480,9 +6481,9 @@ static int stmmac_set_mac_address(struct net_device *ndev, void *addr)
 	if (ret)
 		goto set_mac_error;
 
-	phylink_rx_clk_stop_block(priv->phylink);
+	stmmac_phylink_rx_clk_stop_block(priv->phylink);
 	stmmac_set_umac_addr(priv, priv->hw, ndev->dev_addr, 0);
-	phylink_rx_clk_stop_unblock(priv->phylink);
+	stmmac_phylink_rx_clk_stop_unblock(priv->phylink);
 
 set_mac_error:
 	pm_runtime_put(priv->device);
@@ -8081,7 +8082,7 @@ static int __stmmac_dvr_probe(struct device *device,
 error_netdev_register:
 	stmmac_unregister_devlink(priv);
 error_devlink_setup:
-	phylink_destroy(priv->phylink);
+	stmmac_phylink_destroy(priv->phylink);
 error_phy_setup:
 	stmmac_pcs_clean(ndev);
 error_pcs_setup:
@@ -8147,7 +8148,7 @@ void stmmac_dvr_remove(struct device *dev)
 #endif
 	stmmac_unregister_devlink(priv);
 
-	phylink_destroy(priv->phylink);
+	stmmac_phylink_destroy(priv->phylink);
 	if (priv->plat->stmmac_rst)
 		reset_control_assert(priv->plat->stmmac_rst);
 	reset_control_assert(priv->plat->stmmac_ahb_rst);
@@ -8214,7 +8215,7 @@ int stmmac_suspend(struct device *dev)
 	mutex_unlock(&priv->lock);
 
 	rtnl_lock();
-	phylink_suspend(priv->phylink, !!priv->wolopts);
+	stmmac_phylink_suspend(priv->phylink, !!priv->wolopts);
 	rtnl_unlock();
 
 	if (stmmac_fpe_supported(priv))
@@ -8314,7 +8315,7 @@ int stmmac_resume(struct device *dev)
 	/* Prepare the PHY to resume, ensuring that its clocks which are
 	 * necessary for the MAC DMA reset to complete are running
 	 */
-	phylink_prepare_resume(priv->phylink);
+	stmmac_phylink_prepare_resume(priv->phylink);
 
 	mutex_lock(&priv->lock);
 
@@ -8335,9 +8336,9 @@ int stmmac_resume(struct device *dev)
 	stmmac_init_timestamping(priv);
 
 	stmmac_init_coalesce(priv);
-	phylink_rx_clk_stop_block(priv->phylink);
+	stmmac_phylink_rx_clk_stop_block(priv->phylink);
 	stmmac_set_rx_mode(ndev);
-	phylink_rx_clk_stop_unblock(priv->phylink);
+	stmmac_phylink_rx_clk_stop_unblock(priv->phylink);
 
 	stmmac_vlan_restore(priv);
 
@@ -8350,7 +8351,7 @@ int stmmac_resume(struct device *dev)
 	 * initialised because it may bring the link up immediately in a
 	 * workqueue thread, which will race with initialisation.
 	 */
-	phylink_resume(priv->phylink);
+	stmmac_phylink_resume(priv->phylink);
 	rtnl_unlock();
 
 	netif_device_attach(ndev);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_phylink.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_phylink.h
new file mode 100644
index 000000000000..046a3e91fb2a
--- /dev/null
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_phylink.h
@@ -0,0 +1,106 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (c) 2026, StarFive Corporation. */
+
+#ifndef _STMMAC_PHYLINK_H_
+#define _STMMAC_PHYLINK_H_
+
+#include <linux/phylink.h>
+
+#ifdef CONFIG_NET_NCSI
+static inline bool stmmac_phylink_expects_phy(struct phylink *link)
+{
+	if (link)
+		return phylink_expects_phy(link);
+
+	return false;
+}
+
+static inline int stmmac_phylink_pcs_pre_init(struct phylink *link, struct phylink_pcs *pcs)
+{
+	if (link)
+		return phylink_pcs_pre_init(link, pcs);
+
+	return 0;
+}
+
+static inline void stmmac_phylink_start(struct phylink *link)
+{
+	if (link)
+		phylink_start(link);
+}
+
+static inline void stmmac_phylink_stop(struct phylink *link)
+{
+	if (link)
+		phylink_stop(link);
+}
+
+static inline void stmmac_phylink_speed_up(struct phylink *link)
+{
+	if (link)
+		phylink_speed_up(link);
+}
+
+static inline void stmmac_phylink_speed_down(struct phylink *link, bool sync)
+{
+	if (link)
+		phylink_speed_down(link, sync);
+}
+
+static inline void stmmac_phylink_disconnect_phy(struct phylink *link)
+{
+	if (link)
+		phylink_disconnect_phy(link);
+}
+
+static inline void stmmac_phylink_destroy(struct phylink *link)
+{
+	if (link)
+		phylink_destroy(link);
+}
+
+static inline void stmmac_phylink_suspend(struct phylink *link, bool mac_wol)
+{
+	if (link)
+		phylink_suspend(link, mac_wol);
+}
+
+static inline void stmmac_phylink_prepare_resume(struct phylink *link)
+{
+	if (link)
+		phylink_prepare_resume(link);
+}
+
+static inline void stmmac_phylink_resume(struct phylink *link)
+{
+	if (link)
+		phylink_resume(link);
+}
+
+static inline void stmmac_phylink_rx_clk_stop_block(struct phylink *link)
+{
+	if (link)
+		phylink_rx_clk_stop_block(link);
+}
+
+static inline void stmmac_phylink_rx_clk_stop_unblock(struct phylink *link)
+{
+	if (link)
+		phylink_rx_clk_stop_unblock(link);
+}
+#else
+#define stmmac_phylink_expects_phy		phylink_expects_phy
+#define stmmac_phylink_pcs_pre_init		phylink_pcs_pre_init
+#define stmmac_phylink_start			phylink_start
+#define stmmac_phylink_stop			phylink_stop
+#define stmmac_phylink_speed_up			phylink_speed_up
+#define stmmac_phylink_speed_down		phylink_speed_down
+#define stmmac_phylink_disconnect_phy		phylink_disconnect_phy
+#define stmmac_phylink_destroy			phylink_destroy
+#define stmmac_phylink_suspend			phylink_suspend
+#define stmmac_phylink_prepare_resume		phylink_prepare_resume
+#define stmmac_phylink_resume			phylink_resume
+#define stmmac_phylink_rx_clk_stop_block	phylink_rx_clk_stop_block
+#define stmmac_phylink_rx_clk_stop_unblock	phylink_rx_clk_stop_unblock
+#endif /* NET_NCSI */
+#endif /* _STMMAC_PHYLINK_H_ */
-- 
2.17.1


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

* [net-next v1 3/6] net: stmmac: Add register NCSI device support
  2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
  2026-06-10  7:24 ` [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property Minda Chen
  2026-06-10  7:24 ` [net-next v1 2/6] net: stmmac: Checking whether priv->phylink if NULL in NCSI case Minda Chen
@ 2026-06-10  7:24 ` Minda Chen
  2026-06-10  7:24 ` [net-next v1 4/6] net: stmmac: Add NCSI VLAN setting Minda Chen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

Add stmmac register support. The register NCSI code is
almost from faraday ftgmac100.c

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  1 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 44 +++++++++++++++++--
 .../ethernet/stmicro/stmmac/stmmac_platform.c | 10 ++++-
 include/linux/stmmac.h                        |  1 +
 4 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 8ba8f03e1ce0..1df0689e22a5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -383,6 +383,7 @@ struct stmmac_priv {
 	struct bpf_prog *xdp_prog;
 
 	struct devlink *devlink;
+	struct ncsi_dev *nsdev;
 };
 
 enum stmmac_state {
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 010802389772..b6af53783883 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -41,6 +41,7 @@
 #include <linux/udp.h>
 #include <linux/bpf_trace.h>
 #include <net/devlink.h>
+#include <net/ncsi.h>
 #include <net/page_pool/helpers.h>
 #include <net/pkt_cls.h>
 #include <net/xdp_sock_drv.h>
@@ -4167,6 +4168,16 @@ static int __stmmac_open(struct net_device *dev,
 	if (ret)
 		goto irq_error;
 
+	if (priv->plat->use_ncsi) {
+		/* If using NC-SI, set our carrier on and start the stack */
+		netif_carrier_on(priv->dev);
+
+		/* Start the NCSI device */
+		ret = ncsi_start_dev(priv->nsdev);
+		if (ret)
+			goto irq_error;
+	}
+
 	stmmac_enable_all_queues(priv);
 	netif_tx_start_all_queues(priv->dev);
 	stmmac_enable_all_dma_irq(priv);
@@ -4250,6 +4261,9 @@ static void __stmmac_release(struct net_device *dev)
 
 	netif_tx_disable(dev);
 
+	if (priv->plat->use_ncsi)
+		ncsi_stop_dev(priv->nsdev);
+
 	/* Free the IRQ lines */
 	stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
 
@@ -7795,6 +7809,15 @@ struct plat_stmmacenet_data *stmmac_plat_dat_alloc(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(stmmac_plat_dat_alloc);
 
+static void stmmac_ncsi_handler(struct ncsi_dev *nd)
+{
+	if (unlikely(nd->state != ncsi_dev_state_functional))
+		return;
+
+	netdev_info(nd->dev, "NCSI interface %s\n",
+		    nd->link_up ? "up" : "down");
+}
+
 static int __stmmac_dvr_probe(struct device *device,
 			      struct plat_stmmacenet_data *plat_dat,
 			      struct stmmac_resources *res)
@@ -8048,10 +8071,19 @@ static int __stmmac_dvr_probe(struct device *device,
 	if (ret)
 		goto error_pcs_setup;
 
-	ret = stmmac_phylink_setup(priv);
-	if (ret) {
-		netdev_err(ndev, "failed to setup phy (%d)\n", ret);
-		goto error_phy_setup;
+	if (priv->plat->use_ncsi) {
+		dev_info(priv->device, "Using NCSI interface\n");
+		priv->nsdev = ncsi_register_dev(ndev, stmmac_ncsi_handler);
+		if (!priv->nsdev) {
+			ret = -ENODEV;
+			goto error_phy_setup;
+		}
+	} else {
+		ret = stmmac_phylink_setup(priv);
+		if (ret) {
+			netdev_err(ndev, "failed to setup phy (%d)\n", ret);
+			goto error_phy_setup;
+		}
 	}
 
 	ret = stmmac_register_devlink(priv);
@@ -8082,6 +8114,8 @@ static int __stmmac_dvr_probe(struct device *device,
 error_netdev_register:
 	stmmac_unregister_devlink(priv);
 error_devlink_setup:
+	if (priv->nsdev)
+		ncsi_unregister_dev(priv->nsdev);
 	stmmac_phylink_destroy(priv->phylink);
 error_phy_setup:
 	stmmac_pcs_clean(ndev);
@@ -8141,6 +8175,8 @@ void stmmac_dvr_remove(struct device *dev)
 
 	pm_runtime_get_sync(dev);
 
+	if (priv->nsdev)
+		ncsi_unregister_dev(priv->nsdev);
 	unregister_netdev(ndev);
 
 #ifdef CONFIG_DEBUG_FS
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 5cae2aa72906..483ecf06fc13 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -348,7 +348,7 @@ static int stmmac_mdio_setup(struct plat_stmmacenet_data *plat,
 	 * described assume this is the case since there must be something
 	 * connected to the MAC.
 	 */
-	legacy_mdio = !of_phy_is_fixed_link(np) && !plat->phy_node;
+	legacy_mdio = !of_phy_is_fixed_link(np) && !plat->phy_node && !plat->use_ncsi;
 	if (legacy_mdio)
 		dev_info(dev, "Deprecated MDIO bus assumption used\n");
 
@@ -451,6 +451,14 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
 	 * they are not converted to phylink. */
 	plat->phy_node = of_parse_phandle(np, "phy-handle", 0);
 
+	if (of_property_read_bool(np, "snps,use-ncsi")) {
+		if (!IS_ENABLED(CONFIG_NET_NCSI)) {
+			dev_err(&pdev->dev, "NCSI stack not enabled\n");
+			return ERR_PTR(-EINVAL);
+		}
+		plat->use_ncsi = true;
+	}
+
 	/* Get max speed of operation from device tree */
 	of_property_read_u32(np, "max-speed", &plat->max_speed);
 
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 4430b967abde..8c4f1b0a1a42 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -348,6 +348,7 @@ struct plat_stmmacenet_data {
 	int mac_port_sel_speed;
 	u8 vlan_fail_q;
 	bool provide_bus_info;
+	bool use_ncsi;
 	int int_snapshot_num;
 	int msi_mac_vec;
 	int msi_wol_vec;
-- 
2.17.1


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

* [net-next v1 4/6] net: stmmac: Add NCSI VLAN setting
  2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
                   ` (2 preceding siblings ...)
  2026-06-10  7:24 ` [net-next v1 3/6] net: stmmac: Add register NCSI device support Minda Chen
@ 2026-06-10  7:24 ` Minda Chen
  2026-06-10  7:24 ` [net-next v1 5/6] net: dwmac4: Add NCSI mac speed and duplex setting in NCSI case Minda Chen
  2026-06-10  7:24 ` [net-next v1 6/6] net: stmmac: ethtool: Do NOT call phylink function in NCSI mode Minda Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

Add NCSI vlan setting while in NCSI cases,
The code process is like NCSI mode in faraday
ftgmac100.c.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b6af53783883..b8ce04d71d08 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6866,6 +6866,9 @@ static int stmmac_vlan_rx_add_vid(struct net_device *ndev, __be16 proto, u16 vid
 	bool is_double = false;
 	int ret;
 
+	if (priv->plat->use_ncsi)
+		return ncsi_vlan_rx_add_vid(ndev, proto, vid);
+
 	ret = pm_runtime_resume_and_get(priv->device);
 	if (ret < 0)
 		return ret;
@@ -6908,6 +6911,9 @@ static int stmmac_vlan_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vi
 	bool is_double = false;
 	int ret;
 
+	if (priv->plat->use_ncsi)
+		return ncsi_vlan_rx_kill_vid(ndev, proto, vid);
+
 	ret = pm_runtime_resume_and_get(priv->device);
 	if (ret < 0)
 		return ret;
@@ -7943,6 +7949,9 @@ static int __stmmac_dvr_probe(struct device *device,
 	ndev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
 			     NETDEV_XDP_ACT_XSK_ZEROCOPY;
 
+	if (priv->plat->use_ncsi)
+		ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+
 	ret = stmmac_tc_init(priv, priv);
 	if (!ret) {
 		ndev->hw_features |= NETIF_F_HW_TC;
-- 
2.17.1


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

* [net-next v1 5/6] net: dwmac4: Add NCSI mac speed and duplex setting in NCSI case
  2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
                   ` (3 preceding siblings ...)
  2026-06-10  7:24 ` [net-next v1 4/6] net: stmmac: Add NCSI VLAN setting Minda Chen
@ 2026-06-10  7:24 ` Minda Chen
  2026-06-10  7:24 ` [net-next v1 6/6] net: stmmac: ethtool: Do NOT call phylink function in NCSI mode Minda Chen
  5 siblings, 0 replies; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

Add dwmac4 mac speed config and duplex setting in NCSI case
because NCSI lack of PHY, will not call stmmac_mac_link_up().

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index c6fcfae27c3d..7db4c5dc1f80 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -46,7 +46,20 @@ static void dwmac4_core_init(struct mac_device_info *hw,
 	u32 value;
 
 	value = readl(ioaddr + GMAC_CONFIG);
-	writel(value | GMAC_CORE_INIT, ioaddr + GMAC_CONFIG);
+	if (priv->plat->use_ncsi) {
+		/*
+		 * In NCSI case, because lack of PHY, will NOT
+		 * set the mac speed config and mac duplex
+		 * in stmmac_mac_link_up(). Now set these in
+		 * core init function.
+		 */
+		value |= GMAC_CORE_INIT;
+		value &= ~priv->hw->link.speed_mask;
+		value |= priv->hw->link.duplex | priv->hw->link.speed100;
+		writel(value, ioaddr + GMAC_CONFIG);
+	} else {
+		writel(value | GMAC_CORE_INIT, ioaddr + GMAC_CONFIG);
+	}
 
 	/* Configure LPI 1us counter to number of CSR clock ticks in 1us - 1 */
 	clk_rate = clk_get_rate(priv->plat->stmmac_clk);
-- 
2.17.1


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

* [net-next v1 6/6] net: stmmac: ethtool: Do NOT call phylink function in NCSI mode.
  2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
                   ` (4 preceding siblings ...)
  2026-06-10  7:24 ` [net-next v1 5/6] net: dwmac4: Add NCSI mac speed and duplex setting in NCSI case Minda Chen
@ 2026-06-10  7:24 ` Minda Chen
  2026-06-10  8:31   ` Andrew Lunn
  5 siblings, 1 reply; 11+ messages in thread
From: Minda Chen @ 2026-06-10  7:24 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree, Minda Chen

stmmac ethtool module do not call phylink function
while GMAC NCSI mode.
stmmac_ethtool_get_link_ksettings() return NCSI defaut
speed and duplex setting, except that most cases return
-EOPNOTSUPP error code.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  | 32 ++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 92585d27ab88..149d3b9536ce 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -322,6 +322,12 @@ static int stmmac_ethtool_get_link_ksettings(struct net_device *dev,
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi) {
+		cmd->base.speed = SPEED_100;
+		cmd->base.duplex = DUPLEX_FULL;
+		return 0;
+	}
+
 	return phylink_ethtool_ksettings_get(priv->phylink, cmd);
 }
 
@@ -331,6 +337,9 @@ stmmac_ethtool_set_link_ksettings(struct net_device *dev,
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi)
+		return -EOPNOTSUPP;
+
 	return phylink_ethtool_ksettings_set(priv->phylink, cmd);
 }
 
@@ -384,6 +393,9 @@ static int stmmac_nway_reset(struct net_device *dev)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi)
+		return -EOPNOTSUPP;
+
 	return phylink_ethtool_nway_reset(priv->phylink);
 }
 
@@ -424,6 +436,9 @@ stmmac_get_pauseparam(struct net_device *netdev,
 {
 	struct stmmac_priv *priv = netdev_priv(netdev);
 
+	if (priv->plat->use_ncsi)
+		return;
+
 	phylink_ethtool_get_pauseparam(priv->phylink, pause);
 }
 
@@ -433,6 +448,9 @@ stmmac_set_pauseparam(struct net_device *netdev,
 {
 	struct stmmac_priv *priv = netdev_priv(netdev);
 
+	if (priv->plat->use_ncsi)
+		return -EOPNOTSUPP;
+
 	return phylink_ethtool_set_pauseparam(priv->phylink, pause);
 }
 
@@ -547,7 +565,7 @@ static void stmmac_get_ethtool_stats(struct net_device *dev,
 					     (*(u32 *)p);
 			}
 		}
-		if (priv->dma_cap.eee) {
+		if (priv->dma_cap.eee && !priv->plat->use_ncsi) {
 			int val = phylink_get_eee_err(priv->phylink);
 			if (val)
 				priv->xstats.phy_eee_wakeup_error_n = val;
@@ -723,6 +741,9 @@ static void stmmac_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi)
+		return;
+
 	return phylink_ethtool_get_wol(priv->phylink, wol);
 }
 
@@ -730,6 +751,9 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi)
+		return -EOPNOTSUPP;
+
 	return phylink_ethtool_set_wol(priv->phylink, wol);
 }
 
@@ -738,6 +762,9 @@ static int stmmac_ethtool_op_get_eee(struct net_device *dev,
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi)
+		return -EOPNOTSUPP;
+
 	return phylink_ethtool_get_eee(priv->phylink, edata);
 }
 
@@ -746,6 +773,9 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
+	if (priv->plat->use_ncsi)
+		return -EOPNOTSUPP;
+
 	return phylink_ethtool_set_eee(priv->phylink, edata);
 }
 
-- 
2.17.1


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

* Re: [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property
  2026-06-10  7:24 ` [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property Minda Chen
@ 2026-06-10  7:50   ` Krzysztof Kozlowski
  2026-06-10  8:17   ` Andrew Lunn
  1 sibling, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-10  7:50 UTC (permalink / raw)
  To: Minda Chen, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jose Abreu, Maxime Coquelin,
	Russell King, Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev
  Cc: linux-kernel, linux-stm32, devicetree

On 10/06/2026 09:24, Minda Chen wrote:
> Add snps,use-ncsi dts bindings property for Synopsys designware
> ethernet MAC with RMII interface and used as sideband interface
> network controller(NCSI).

Please use standard email subjects, so with the PATCH keyword in the
title. `git format-patch -vX` helps here to create proper versioned
patches. Another useful tool is b4. Skipping the PATCH keyword makes
filtering of emails more difficult thus making the review process less
convenient.

> 
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
> ---
>  Documentation/devicetree/bindings/net/snps,dwmac.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 2449311c6d28..05b1d8428f65 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -545,6 +545,13 @@ properties:
>        Enables the TSO feature otherwise it will be managed by MAC HW capability
>        register.
>  
> +  snps,use-ncsi:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      Use the NC-SI stack instead of an MDIO PHY. Currently assumes

You described the desired Linux feature or behavior, not the actual
hardware. The bindings are about the latter, so instead you need to
rephrase the property and its description to match actual hardware
capabilities/features/configuration etc.

Best regards,
Krzysztof

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

* Re: [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property
  2026-06-10  7:24 ` [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property Minda Chen
  2026-06-10  7:50   ` Krzysztof Kozlowski
@ 2026-06-10  8:17   ` Andrew Lunn
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2026-06-10  8:17 UTC (permalink / raw)
  To: Minda Chen
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev, linux-kernel,
	linux-stm32, devicetree

On Wed, Jun 10, 2026 at 03:24:15PM +0800, Minda Chen wrote:
> Add snps,use-ncsi dts bindings property for Synopsys designware

Is there anything SNPS specific in how NCSI is implemented? Should
this be a generic option which any Ethernet interface can use?

     Andrew

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

* Re: [net-next v1 2/6] net: stmmac: Checking whether priv->phylink if NULL in NCSI case
  2026-06-10  7:24 ` [net-next v1 2/6] net: stmmac: Checking whether priv->phylink if NULL in NCSI case Minda Chen
@ 2026-06-10  8:26   ` Andrew Lunn
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2026-06-10  8:26 UTC (permalink / raw)
  To: Minda Chen
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev, linux-kernel,
	linux-stm32, devicetree

> +static inline bool stmmac_phylink_expects_phy(struct phylink *link)
> +{
> +	if (link)
> +		return phylink_expects_phy(link);
> +
> +	return false;
> +}
> +
> +static inline int stmmac_phylink_pcs_pre_init(struct phylink *link, struct phylink_pcs *pcs)
> +{
> +	if (link)
> +		return phylink_pcs_pre_init(link, pcs);
> +
> +	return 0;
> +}
> +
> +static inline void stmmac_phylink_start(struct phylink *link)
> +{
> +	if (link)
> +		phylink_start(link);
> +}
> +
> +static inline void stmmac_phylink_stop(struct phylink *link)
> +{
> +	if (link)
> +		phylink_stop(link);
> +}

Please take a step back and think about the Linux big picture
architecture.

What is stmmac specific here? If you were to add NCSI support to
another driver which uses phylink, would it need to replicate all
this?

When you consider how the MAC is configured, does it need to know it
is connected to an NCSI? Can the MAC tell the difference between NSCI,
fixed-link, a PHY or an SFP? Or does the MAC just need to know RGMII,
the link is up, send frames?

Please look at adding generic support for NSCI in phylink, and see if
the existing phylink mac ops covers everything needed for configuring
the MAC.

	Andrew

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

* Re: [net-next v1 6/6] net: stmmac: ethtool: Do NOT call phylink function in NCSI mode.
  2026-06-10  7:24 ` [net-next v1 6/6] net: stmmac: ethtool: Do NOT call phylink function in NCSI mode Minda Chen
@ 2026-06-10  8:31   ` Andrew Lunn
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2026-06-10  8:31 UTC (permalink / raw)
  To: Minda Chen
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jose Abreu, Maxime Coquelin, Russell King,
	Giuseppe Cavallaro, Alexandre Torgue, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, netdev, linux-kernel,
	linux-stm32, devicetree

> @@ -424,6 +436,9 @@ stmmac_get_pauseparam(struct net_device *netdev,
>  {
>  	struct stmmac_priv *priv = netdev_priv(netdev);
>  
> +	if (priv->plat->use_ncsi)
> +		return;
> +
>  	phylink_ethtool_get_pauseparam(priv->phylink, pause);
>  }
>  
> @@ -433,6 +448,9 @@ stmmac_set_pauseparam(struct net_device *netdev,
>  {
>  	struct stmmac_priv *priv = netdev_priv(netdev);
>  
> +	if (priv->plat->use_ncsi)
> +		return -EOPNOTSUPP;
> +
>  	return phylink_ethtool_set_pauseparam(priv->phylink, pause);
>  }

Why is pause not supported with NCSI? There are two modes for
Pause. It can be negotiated, or it can be forced. Negotiation cannot
be used, there is not a link peer as such, but it should be possible
to force the configuration.

I am however assuming that pause frames do get forwarded by the other
end of the link. Does the NCSI standard say anything about that?

	Andrew

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

end of thread, other threads:[~2026-06-10  9:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10  7:24 [net-next v1 0/6] Add synopsys designware GMAC NCSI support Minda Chen
2026-06-10  7:24 ` [net-next v1 1/6] dt-bindings: net: dwmac: Add snps,use-ncsi property Minda Chen
2026-06-10  7:50   ` Krzysztof Kozlowski
2026-06-10  8:17   ` Andrew Lunn
2026-06-10  7:24 ` [net-next v1 2/6] net: stmmac: Checking whether priv->phylink if NULL in NCSI case Minda Chen
2026-06-10  8:26   ` Andrew Lunn
2026-06-10  7:24 ` [net-next v1 3/6] net: stmmac: Add register NCSI device support Minda Chen
2026-06-10  7:24 ` [net-next v1 4/6] net: stmmac: Add NCSI VLAN setting Minda Chen
2026-06-10  7:24 ` [net-next v1 5/6] net: dwmac4: Add NCSI mac speed and duplex setting in NCSI case Minda Chen
2026-06-10  7:24 ` [net-next v1 6/6] net: stmmac: ethtool: Do NOT call phylink function in NCSI mode Minda Chen
2026-06-10  8:31   ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox