Re: [PATCH RFC net-next 2/4] net: dsa: ocelot: remove interface checks
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2022-02-25 14:38:01
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>
Sorry, just realised I should've deleted "ocelot_port" here as well, for some reason my build testing didn't find that. Please assume that I've deleted it (I've updated the patch locally.) Thanks.
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
-- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!