Thread (12 messages) flat view 12 messages, 3 authors, 2022-02-25

Re: [PATCH RFC net-next 2/4] net: dsa: ocelot: remove interface checks

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2022-02-25 15:31:05

On Fri, Feb 25, 2022 at 02:35:21PM +0000, Russell King (Oracle) wrote:
When the supported interfaces bitmap is populated, phylink will itself
check that the interface mode is present in this bitmap. Drivers no
longer need to perform this check themselves. Remove these checks.

Signed-off-by: Russell King (Oracle) <redacted>
---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
quoted hunk ↗ jump to hunk
 drivers/net/dsa/ocelot/felix_vsc9959.c   | 6 ------
 drivers/net/dsa/ocelot/seville_vsc9953.c | 6 ------
 2 files changed, 12 deletions(-)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index a1be0e91dde6..4c635c46705e 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -956,12 +956,6 @@ static void vsc9959_phylink_validate(struct ocelot *ocelot, int port,
 	struct ocelot_port *ocelot_port = ocelot->ports[port];
 	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
 
-	if (state->interface != PHY_INTERFACE_MODE_NA &&
-	    state->interface != ocelot_port->phy_mode) {
-		linkmode_zero(supported);
-		return;
-	}
-
 	phylink_set_port_modes(mask);
 	phylink_set(mask, Autoneg);
 	phylink_set(mask, Pause);
diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c
index 2db51494b1a9..0ae8424c47e2 100644
--- a/drivers/net/dsa/ocelot/seville_vsc9953.c
+++ b/drivers/net/dsa/ocelot/seville_vsc9953.c
@@ -929,12 +929,6 @@ static void vsc9953_phylink_validate(struct ocelot *ocelot, int port,
 	struct ocelot_port *ocelot_port = ocelot->ports[port];
 	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
 
-	if (state->interface != PHY_INTERFACE_MODE_NA &&
-	    state->interface != ocelot_port->phy_mode) {
-		linkmode_zero(supported);
-		return;
-	}
-
 	phylink_set_port_modes(mask);
 	phylink_set(mask, Autoneg);
 	phylink_set(mask, Pause);
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help