netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS
@ 2025-01-03 11:16 Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 1/6] net: phylink: add support for PCS supported_interfaces bitmap Russell King (Oracle)
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

Hi,

This series adds supported_interfaces for PCS, which gives MAC code a
way to determine the interface modes that the PCS supports without
having to implement functions such as xpcs_get_interfaces(), or
workarounds such as in

https://lore.kernel.org/r/20241213090526.71516-3-maxime.chevallier@bootlin.com

Patch 1 adds the new bitmask to struct phylink_pcs, and code within
phylink to validate that the PCS returned by the MAC driver supports
the interface mode - but only if this bitmask is non-empty.

Patch 2 through 4 fills in the interface modes for XPCS, Mediatek LynxI
and Lynx PCS.

Patch 5 adds support to stmmac to make use of this bitmask when filling
in phylink_config.supported_interfaces, eliminating the call to
xpcs_get_interfaces.

As xpcs_get_interfaces() is now unused outside of pcs-xpcs.c, patch 6
makes this function static and removes it from the header file.

 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++++++++--
 drivers/net/pcs/pcs-lynx.c                        | 13 +++++++++++++
 drivers/net/pcs/pcs-mtk-lynxi.c                   |  4 ++++
 drivers/net/pcs/pcs-xpcs.c                        |  5 +++--
 drivers/net/phy/phylink.c                         | 11 +++++++++++
 include/linux/pcs/pcs-xpcs.h                      |  1 -
 include/linux/phylink.h                           |  3 +++
 7 files changed, 43 insertions(+), 5 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

* [PATCH net-next 1/6] net: phylink: add support for PCS supported_interfaces bitmap
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
@ 2025-01-03 11:16 ` Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 2/6] net: pcs: xpcs: fill in PCS supported_interfaces Russell King (Oracle)
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

Add support for the PCS to specify which interfaces it supports, which
can be used by MAC drivers to build the main supported_interfaces
bitmap. Phylink also validates that the PCS returned by the MAC driver
supports the interface that the MAC was asked for.

An empty supported_interfaces bitmap from the PCS indicates that it
does not provide this information, and we handle that appropriately.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/phylink.c | 11 +++++++++++
 include/linux/phylink.h   |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 6d50c2fdb190..31754d5fd659 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -691,6 +691,17 @@ static int phylink_validate_mac_and_pcs(struct phylink *pl,
 			return -EINVAL;
 		}
 
+		/* Ensure that this PCS supports the interface which the MAC
+		 * returned it for. It is an error for the MAC to return a PCS
+		 * that does not support the interface mode.
+		 */
+		if (!phy_interface_empty(pcs->supported_interfaces) &&
+		    !test_bit(state->interface, pcs->supported_interfaces)) {
+			phylink_err(pl, "MAC returned PCS which does not support %s\n",
+				    phy_modes(state->interface));
+			return -EINVAL;
+		}
+
 		/* Validate the link parameters with the PCS */
 		if (pcs->ops->pcs_validate) {
 			ret = pcs->ops->pcs_validate(pcs, supported, state);
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index 5462cc6a37dc..4b7a20620b49 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -393,6 +393,8 @@ struct phylink_pcs_ops;
 
 /**
  * struct phylink_pcs - PHYLINK PCS instance
+ * @supported_interfaces: describing which PHY_INTERFACE_MODE_xxx
+ *                        are supported by this PCS.
  * @ops: a pointer to the &struct phylink_pcs_ops structure
  * @phylink: pointer to &struct phylink_config
  * @neg_mode: provide PCS neg mode via "mode" argument
@@ -409,6 +411,7 @@ struct phylink_pcs_ops;
  * the PCS driver.
  */
 struct phylink_pcs {
+	DECLARE_PHY_INTERFACE_MASK(supported_interfaces);
 	const struct phylink_pcs_ops *ops;
 	struct phylink *phylink;
 	bool neg_mode;
-- 
2.30.2


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

* [PATCH net-next 2/6] net: pcs: xpcs: fill in PCS supported_interfaces
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 1/6] net: phylink: add support for PCS supported_interfaces bitmap Russell King (Oracle)
@ 2025-01-03 11:16 ` Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 3/6] net: pcs: mtk-lynxi: " Russell King (Oracle)
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

Fill in the new PCS supported_interfaces member with the interfaces
that XPCS supports.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/pcs/pcs-xpcs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
index f70ca39f0905..cf41dc5e74e8 100644
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -1446,6 +1446,8 @@ static struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev)
 	if (ret)
 		goto out_clear_clks;
 
+	xpcs_get_interfaces(xpcs, xpcs->pcs.supported_interfaces);
+
 	if (xpcs->info.pma == WX_TXGBE_XPCS_PMA_10G_ID)
 		xpcs->pcs.poll = false;
 	else
-- 
2.30.2


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

* [PATCH net-next 3/6] net: pcs: mtk-lynxi: fill in PCS supported_interfaces
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 1/6] net: phylink: add support for PCS supported_interfaces bitmap Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 2/6] net: pcs: xpcs: fill in PCS supported_interfaces Russell King (Oracle)
@ 2025-01-03 11:16 ` Russell King (Oracle)
  2025-01-03 11:21   ` Daniel Golle
  2025-01-03 22:44   ` Andrew Lunn
  2025-01-03 11:16 ` [PATCH net-next 4/6] net: pcs: lynx: " Russell King (Oracle)
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

Fill in the new PCS supported_interfaces member with the interfaces
that the Mediatek LynxI supports.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/pcs/pcs-mtk-lynxi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
index 7de804535229..a6153e9999a7 100644
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
@@ -306,6 +306,10 @@ struct phylink_pcs *mtk_pcs_lynxi_create(struct device *dev,
 	mpcs->pcs.poll = true;
 	mpcs->interface = PHY_INTERFACE_MODE_NA;
 
+	__set_bit(PHY_INTERFACE_MODE_SGMII, mpcs->pcs.supported_interfaces);
+	__set_bit(PHY_INTERFACE_MODE_1000BASEX, mpcs->pcs.supported_interfaces);
+	__set_bit(PHY_INTERFACE_MODE_2500BASEX, mpcs->pcs.supported_interfaces);
+
 	return &mpcs->pcs;
 }
 EXPORT_SYMBOL(mtk_pcs_lynxi_create);
-- 
2.30.2


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

* [PATCH net-next 4/6] net: pcs: lynx: fill in PCS supported_interfaces
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
                   ` (2 preceding siblings ...)
  2025-01-03 11:16 ` [PATCH net-next 3/6] net: pcs: mtk-lynxi: " Russell King (Oracle)
@ 2025-01-03 11:16 ` Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 5/6] net: stmmac: use " Russell King (Oracle)
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

Fill in the new PCS supported_interfaces member with the interfaces
that Lynx supports.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/pcs/pcs-lynx.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c
index 767a8c0714ac..6457190ec6e7 100644
--- a/drivers/net/pcs/pcs-lynx.c
+++ b/drivers/net/pcs/pcs-lynx.c
@@ -334,9 +334,19 @@ static const struct phylink_pcs_ops lynx_pcs_phylink_ops = {
 	.pcs_link_up = lynx_pcs_link_up,
 };
 
+static const phy_interface_t lynx_interfaces[] = {
+	PHY_INTERFACE_MODE_SGMII,
+	PHY_INTERFACE_MODE_QSGMII,
+	PHY_INTERFACE_MODE_1000BASEX,
+	PHY_INTERFACE_MODE_2500BASEX,
+	PHY_INTERFACE_MODE_10GBASER,
+	PHY_INTERFACE_MODE_USXGMII,
+};
+
 static struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio)
 {
 	struct lynx_pcs *lynx;
+	int i;
 
 	lynx = kzalloc(sizeof(*lynx), GFP_KERNEL);
 	if (!lynx)
@@ -348,6 +358,9 @@ static struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio)
 	lynx->pcs.neg_mode = true;
 	lynx->pcs.poll = true;
 
+	for (i = 0; i < ARRAY_SIZE(lynx_interfaces); i++)
+		__set_bit(lynx_interfaces[i], lynx->pcs.supported_interfaces);
+
 	return lynx_to_phylink_pcs(lynx);
 }
 
-- 
2.30.2


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

* [PATCH net-next 5/6] net: stmmac: use PCS supported_interfaces
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
                   ` (3 preceding siblings ...)
  2025-01-03 11:16 ` [PATCH net-next 4/6] net: pcs: lynx: " Russell King (Oracle)
@ 2025-01-03 11:16 ` Russell King (Oracle)
  2025-01-03 11:16 ` [PATCH net-next 6/6] net: pcs: xpcs: make xpcs_get_interfaces() static Russell King (Oracle)
  2025-01-07  0:40 ` [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS patchwork-bot+netdevbpf
  6 siblings, 0 replies; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

Use the PCS' supported_interfaces member to build the MAC level
supported_interfaces bitmap.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 6bc10ffe7a2b..fcb5649fb738 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1203,6 +1203,7 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
 	struct stmmac_mdio_bus_data *mdio_bus_data;
 	int mode = priv->plat->phy_interface;
 	struct fwnode_handle *fwnode;
+	struct phylink_pcs *pcs;
 	struct phylink *phylink;
 
 	priv->phylink_config.dev = &priv->dev->dev;
@@ -1224,8 +1225,14 @@ static int stmmac_phy_setup(struct stmmac_priv *priv)
 
 	/* If we have an xpcs, it defines which PHY interfaces are supported. */
 	if (priv->hw->xpcs)
-		xpcs_get_interfaces(priv->hw->xpcs,
-				    priv->phylink_config.supported_interfaces);
+		pcs = xpcs_to_phylink_pcs(priv->hw->xpcs);
+	else
+		pcs = priv->hw->phylink_pcs;
+
+	if (pcs)
+		phy_interface_or(priv->phylink_config.supported_interfaces,
+				 priv->phylink_config.supported_interfaces,
+				 pcs->supported_interfaces);
 
 	fwnode = priv->plat->port_node;
 	if (!fwnode)
-- 
2.30.2


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

* [PATCH net-next 6/6] net: pcs: xpcs: make xpcs_get_interfaces() static
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
                   ` (4 preceding siblings ...)
  2025-01-03 11:16 ` [PATCH net-next 5/6] net: stmmac: use " Russell King (Oracle)
@ 2025-01-03 11:16 ` Russell King (Oracle)
  2025-01-03 22:45   ` Andrew Lunn
  2025-01-07  0:40 ` [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS patchwork-bot+netdevbpf
  6 siblings, 1 reply; 11+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

xpcs_get_interfaces() should no longer be used outside of the XPCS
code, so make it static.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/pcs/pcs-xpcs.c   | 3 +--
 include/linux/pcs/pcs-xpcs.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
index cf41dc5e74e8..c06b66f40022 100644
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -594,14 +594,13 @@ static unsigned int xpcs_inband_caps(struct phylink_pcs *pcs,
 	}
 }
 
-void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces)
+static void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces)
 {
 	const struct dw_xpcs_compat *compat;
 
 	for (compat = xpcs->desc->compat; compat->supported; compat++)
 		__set_bit(compat->interface, interfaces);
 }
-EXPORT_SYMBOL_GPL(xpcs_get_interfaces);
 
 int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns, int enable)
 {
diff --git a/include/linux/pcs/pcs-xpcs.h b/include/linux/pcs/pcs-xpcs.h
index b5b5d17998b8..733f4ddd2ef1 100644
--- a/include/linux/pcs/pcs-xpcs.h
+++ b/include/linux/pcs/pcs-xpcs.h
@@ -50,7 +50,6 @@ struct dw_xpcs;
 
 struct phylink_pcs *xpcs_to_phylink_pcs(struct dw_xpcs *xpcs);
 int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface);
-void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces);
 int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns,
 		    int enable);
 struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr);
-- 
2.30.2


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

* Re: [PATCH net-next 3/6] net: pcs: mtk-lynxi: fill in PCS supported_interfaces
  2025-01-03 11:16 ` [PATCH net-next 3/6] net: pcs: mtk-lynxi: " Russell King (Oracle)
@ 2025-01-03 11:21   ` Daniel Golle
  2025-01-03 22:44   ` Andrew Lunn
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Golle @ 2025-01-03 11:21 UTC (permalink / raw)
  To: Russell King (Oracle), Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, David S. Miller, Eric Dumazet,
	Ioana Ciornei, Jakub Kicinski, Jose Abreu, Jose Abreu,
	linux-arm-kernel, linux-mediatek, linux-stm32, Matthias Brugger,
	Maxime Chevallier, Maxime Coquelin, netdev, Paolo Abeni



On 3 January 2025 11:16:41 UTC, "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:
>Fill in the new PCS supported_interfaces member with the interfaces
>that the Mediatek LynxI supports.
>
>Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Acked-by: Daniel Golle <daniel@makrotopia.org>

>---
> drivers/net/pcs/pcs-mtk-lynxi.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
>index 7de804535229..a6153e9999a7 100644
>--- a/drivers/net/pcs/pcs-mtk-lynxi.c
>+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
>@@ -306,6 +306,10 @@ struct phylink_pcs *mtk_pcs_lynxi_create(struct device *dev,
> 	mpcs->pcs.poll = true;
> 	mpcs->interface = PHY_INTERFACE_MODE_NA;
> 
>+	__set_bit(PHY_INTERFACE_MODE_SGMII, mpcs->pcs.supported_interfaces);
>+	__set_bit(PHY_INTERFACE_MODE_1000BASEX, mpcs->pcs.supported_interfaces);
>+	__set_bit(PHY_INTERFACE_MODE_2500BASEX, mpcs->pcs.supported_interfaces);
>+
> 	return &mpcs->pcs;
> }
> EXPORT_SYMBOL(mtk_pcs_lynxi_create);

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

* Re: [PATCH net-next 3/6] net: pcs: mtk-lynxi: fill in PCS supported_interfaces
  2025-01-03 11:16 ` [PATCH net-next 3/6] net: pcs: mtk-lynxi: " Russell King (Oracle)
  2025-01-03 11:21   ` Daniel Golle
@ 2025-01-03 22:44   ` Andrew Lunn
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2025-01-03 22:44 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Heiner Kallweit, Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

On Fri, Jan 03, 2025 at 11:16:41AM +0000, Russell King (Oracle) wrote:
> Fill in the new PCS supported_interfaces member with the interfaces
> that the Mediatek LynxI supports.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 6/6] net: pcs: xpcs: make xpcs_get_interfaces() static
  2025-01-03 11:16 ` [PATCH net-next 6/6] net: pcs: xpcs: make xpcs_get_interfaces() static Russell King (Oracle)
@ 2025-01-03 22:45   ` Andrew Lunn
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2025-01-03 22:45 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Heiner Kallweit, Alexander Couzens, Alexandre Torgue, Andrew Lunn,
	AngeloGioacchino Del Regno, Daniel Golle, David S. Miller,
	Eric Dumazet, Ioana Ciornei, Jakub Kicinski, Jose Abreu,
	Jose Abreu, linux-arm-kernel, linux-mediatek, linux-stm32,
	Matthias Brugger, Maxime Chevallier, Maxime Coquelin, netdev,
	Paolo Abeni

On Fri, Jan 03, 2025 at 11:16:56AM +0000, Russell King (Oracle) wrote:
> xpcs_get_interfaces() should no longer be used outside of the XPCS
> code, so make it static.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS
  2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
                   ` (5 preceding siblings ...)
  2025-01-03 11:16 ` [PATCH net-next 6/6] net: pcs: xpcs: make xpcs_get_interfaces() static Russell King (Oracle)
@ 2025-01-07  0:40 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-07  0:40 UTC (permalink / raw)
  To: Russell King
  Cc: andrew, hkallweit1, lynxis, alexandre.torgue, andrew+netdev,
	angelogioacchino.delregno, daniel, davem, edumazet, ioana.ciornei,
	kuba, joabreu, Jose.Abreu, linux-arm-kernel, linux-mediatek,
	linux-stm32, matthias.bgg, maxime.chevallier, mcoquelin.stm32,
	netdev, pabeni

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 3 Jan 2025 11:16:06 +0000 you wrote:
> Hi,
> 
> This series adds supported_interfaces for PCS, which gives MAC code a
> way to determine the interface modes that the PCS supports without
> having to implement functions such as xpcs_get_interfaces(), or
> workarounds such as in
> 
> [...]

Here is the summary with links:
  - [net-next,1/6] net: phylink: add support for PCS supported_interfaces bitmap
    https://git.kernel.org/netdev/net-next/c/fbb9a9d263a6
  - [net-next,2/6] net: pcs: xpcs: fill in PCS supported_interfaces
    https://git.kernel.org/netdev/net-next/c/906909fabb81
  - [net-next,3/6] net: pcs: mtk-lynxi: fill in PCS supported_interfaces
    https://git.kernel.org/netdev/net-next/c/b87d4ee16bb4
  - [net-next,4/6] net: pcs: lynx: fill in PCS supported_interfaces
    https://git.kernel.org/netdev/net-next/c/b0f88c1b9a53
  - [net-next,5/6] net: stmmac: use PCS supported_interfaces
    https://git.kernel.org/netdev/net-next/c/d13cefbb108e
  - [net-next,6/6] net: pcs: xpcs: make xpcs_get_interfaces() static
    https://git.kernel.org/netdev/net-next/c/2410719cdd49

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-01-07  0:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 11:16 [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS Russell King (Oracle)
2025-01-03 11:16 ` [PATCH net-next 1/6] net: phylink: add support for PCS supported_interfaces bitmap Russell King (Oracle)
2025-01-03 11:16 ` [PATCH net-next 2/6] net: pcs: xpcs: fill in PCS supported_interfaces Russell King (Oracle)
2025-01-03 11:16 ` [PATCH net-next 3/6] net: pcs: mtk-lynxi: " Russell King (Oracle)
2025-01-03 11:21   ` Daniel Golle
2025-01-03 22:44   ` Andrew Lunn
2025-01-03 11:16 ` [PATCH net-next 4/6] net: pcs: lynx: " Russell King (Oracle)
2025-01-03 11:16 ` [PATCH net-next 5/6] net: stmmac: use " Russell King (Oracle)
2025-01-03 11:16 ` [PATCH net-next 6/6] net: pcs: xpcs: make xpcs_get_interfaces() static Russell King (Oracle)
2025-01-03 22:45   ` Andrew Lunn
2025-01-07  0:40 ` [PATCH net-next 0/6] net: pcs: add supported_interfaces bitmap for PCS patchwork-bot+netdevbpf

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).