1 From d22c85764665af931c5c61bbe282b4116a88e792 Mon Sep 17 00:00:00 2001
2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
3 Date: Wed, 27 Sep 2023 13:13:56 +0100
4 Subject: [PATCH 02/30] net: dsa: mt753x: remove mt753x_phylink_pcs_link_up()
6 Remove the mt753x_phylink_pcs_link_up() function for two reasons:
8 1) priv->pcs[i].pcs.neg_mode is set true, meaning it doesn't take a
9 MLO_AN_FIXED anymore, but one of PHYLINK_PCS_NEG_*. However, this
10 is inconsequential due to...
11 2) priv->pcs[port].pcs.ops is always initialised to point at
12 mt7530_pcs_ops, which does not have a pcs_link_up() member.
14 So, let's remove mt753x_phylink_pcs_link_up() entirely.
16 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
17 Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
18 Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
19 Link: https://lore.kernel.org/r/E1qlTQS-008BWe-Va@rmk-PC.armlinux.org.uk
20 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
22 drivers/net/dsa/mt7530.c | 11 -----------
23 1 file changed, 11 deletions(-)
25 --- a/drivers/net/dsa/mt7530.c
26 +++ b/drivers/net/dsa/mt7530.c
27 @@ -2860,15 +2860,6 @@ static void mt753x_phylink_mac_link_down
28 mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
31 -static void mt753x_phylink_pcs_link_up(struct phylink_pcs *pcs,
33 - phy_interface_t interface,
34 - int speed, int duplex)
36 - if (pcs->ops->pcs_link_up)
37 - pcs->ops->pcs_link_up(pcs, mode, interface, speed, duplex);
40 static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
42 phy_interface_t interface,
43 @@ -2956,8 +2947,6 @@ mt7531_cpu_port_config(struct dsa_switch
45 mt7530_write(priv, MT7530_PMCR_P(port),
46 PMCR_CPU_PORT_SETTING(priv->id));
47 - mt753x_phylink_pcs_link_up(&priv->pcs[port].pcs, MLO_AN_FIXED,
48 - interface, speed, DUPLEX_FULL);
49 mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
50 speed, DUPLEX_FULL, true, true);