796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From a444877c10a665cd8a869e6d37facdb89fd95f79 Mon Sep 17 00:00:00 2001
  2. Message-ID: <a444877c10a665cd8a869e6d37facdb89fd95f79.1706070008.git.daniel@makrotopia.org>
  3. From: Daniel Golle <[email protected]>
  4. Date: Wed, 24 Jan 2024 04:17:11 +0000
  5. Subject: [PATCH net] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch
  6. To: Arınç ÜNAL <[email protected]>,
  7. Daniel Golle <[email protected]>,
  8. DENG Qingfang <[email protected]>,
  9. Sean Wang <[email protected]>,
  10. Andrew Lunn <[email protected]>,
  11. Florian Fainelli <[email protected]>,
  12. Vladimir Oltean <[email protected]>,
  13. David S. Miller <[email protected]>,
  14. Eric Dumazet <[email protected]>,
  15. Jakub Kicinski <[email protected]>,
  16. Paolo Abeni <[email protected]>,
  17. Matthias Brugger <[email protected]>,
  18. AngeloGioacchino Del Regno <[email protected]>,
  19. [email protected],
  20. [email protected],
  21. [email protected],
  22. [email protected]
  23. Setup PMCR port register for actual speed and duplex on internally
  24. connected PHYs of the MT7988 built-in switch. This fixes links with
  25. speeds other than 1000M.
  26. Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch")
  27. Signed-off-by: Daniel Golle <[email protected]>
  28. ---
  29. drivers/net/dsa/mt7530.c | 3 +--
  30. 1 file changed, 1 insertion(+), 2 deletions(-)
  31. --- a/drivers/net/dsa/mt7530.c
  32. +++ b/drivers/net/dsa/mt7530.c
  33. @@ -2849,8 +2849,7 @@ static void mt753x_phylink_mac_link_up(s
  34. /* MT753x MAC works in 1G full duplex mode for all up-clocked
  35. * variants.
  36. */
  37. - if (interface == PHY_INTERFACE_MODE_INTERNAL ||
  38. - interface == PHY_INTERFACE_MODE_TRGMII ||
  39. + if (interface == PHY_INTERFACE_MODE_TRGMII ||
  40. (phy_interface_mode_is_8023z(interface))) {
  41. speed = SPEED_1000;
  42. duplex = DUPLEX_FULL;