790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 1a1a723d47c046d6c251651c9ade589040dafacf Mon Sep 17 00:00:00 2001
  2. From: "Russell King (Oracle)" <[email protected]>
  3. Date: Wed, 27 Sep 2023 13:13:56 +0100
  4. Subject: [PATCH 19/48] net: dsa: mt753x: remove mt753x_phylink_pcs_link_up()
  5. Remove the mt753x_phylink_pcs_link_up() function for two reasons:
  6. 1) priv->pcs[i].pcs.neg_mode is set true, meaning it doesn't take a
  7. MLO_AN_FIXED anymore, but one of PHYLINK_PCS_NEG_*. However, this
  8. is inconsequential due to...
  9. 2) priv->pcs[port].pcs.ops is always initialised to point at
  10. mt7530_pcs_ops, which does not have a pcs_link_up() member.
  11. So, let's remove mt753x_phylink_pcs_link_up() entirely.
  12. Signed-off-by: Russell King (Oracle) <[email protected]>
  13. Reviewed-by: Vladimir Oltean <[email protected]>
  14. Reviewed-by: Florian Fainelli <[email protected]>
  15. Link: https://lore.kernel.org/r/[email protected]
  16. Signed-off-by: Jakub Kicinski <[email protected]>
  17. ---
  18. drivers/net/dsa/mt7530.c | 11 -----------
  19. 1 file changed, 11 deletions(-)
  20. --- a/drivers/net/dsa/mt7530.c
  21. +++ b/drivers/net/dsa/mt7530.c
  22. @@ -2851,15 +2851,6 @@ static void mt753x_phylink_mac_link_down
  23. mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  24. }
  25. -static void mt753x_phylink_pcs_link_up(struct phylink_pcs *pcs,
  26. - unsigned int mode,
  27. - phy_interface_t interface,
  28. - int speed, int duplex)
  29. -{
  30. - if (pcs->ops->pcs_link_up)
  31. - pcs->ops->pcs_link_up(pcs, mode, interface, speed, duplex);
  32. -}
  33. -
  34. static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
  35. unsigned int mode,
  36. phy_interface_t interface,
  37. @@ -2948,8 +2939,6 @@ mt7531_cpu_port_config(struct dsa_switch
  38. return ret;
  39. mt7530_write(priv, MT7530_PMCR_P(port),
  40. PMCR_CPU_PORT_SETTING(priv->id));
  41. - mt753x_phylink_pcs_link_up(&priv->pcs[port].pcs, MLO_AN_FIXED,
  42. - interface, speed, DUPLEX_FULL);
  43. mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
  44. speed, DUPLEX_FULL, true, true);