From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "Marek Behún" <kabel@kernel.org>,
UNGLinuxDriver@microchip.com, "Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH RFC net-next 2/4] net: dsa: ocelot: remove interface checks
Date: Fri, 25 Feb 2022 14:35:21 +0000 [thread overview]
Message-ID: <E1nNbgn-00Akik-MJ@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Yhjo4nwmEZJ/RsJ/@shell.armlinux.org.uk>
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) <rmk+kernel@armlinux.org.uk>
---
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
next prev parent reply other threads:[~2022-02-25 14:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 14:34 [PATCH RFC net-next 0/4] net: dsa: ocelot: phylink updates Russell King (Oracle)
2022-02-25 14:35 ` [PATCH RFC net-next 1/4] net: dsa: ocelot: populate supported_interfaces Russell King (Oracle)
2022-02-25 15:25 ` Vladimir Oltean
2022-02-25 14:35 ` Russell King (Oracle) [this message]
2022-02-25 14:37 ` [PATCH RFC net-next 2/4] net: dsa: ocelot: remove interface checks Russell King (Oracle)
2022-02-25 15:30 ` Vladimir Oltean
2022-02-25 14:35 ` [PATCH RFC net-next 3/4] net: dsa: ocelot: convert to mac_select_pcs() Russell King (Oracle)
2022-02-25 15:31 ` Vladimir Oltean
2022-02-25 14:35 ` [PATCH RFC net-next 4/4] net: dsa: ocelot: mark as non-legacy Russell King (Oracle)
2022-02-25 15:46 ` Vladimir Oltean
2022-02-25 15:59 ` Russell King (Oracle)
2022-02-25 16:00 ` Vladimir Oltean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1nNbgn-00Akik-MJ@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).