701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch 1.1 KB

123456789101112131415161718192021222324252627282930
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  2. Date: Tue, 16 Feb 2021 00:06:35 +0100
  3. Subject: [PATCH] net: dsa: bcm_sf2: keep GPHY enabled on the BCM4908
  4. Trying to access disabled PHY results in MDIO_READ_FAIL and:
  5. [ 11.962886] brcm-sf2 80080000.switch wan: configuring for phy/internal link mode
  6. [ 11.972500] 8021q: adding VLAN 0 to HW filter on device wan
  7. [ 11.980205] ------------[ cut here ]------------
  8. [ 11.984885] WARNING: CPU: 0 PID: 7 at phy_error+0x10/0x58
  9. Signed-off-by: Rafał Miłecki <[email protected]>
  10. ---
  11. drivers/net/dsa/bcm_sf2.c | 6 ++++++
  12. 1 file changed, 6 insertions(+)
  13. --- a/drivers/net/dsa/bcm_sf2.c
  14. +++ b/drivers/net/dsa/bcm_sf2.c
  15. @@ -1562,6 +1562,12 @@ static int bcm_sf2_sw_probe(struct platf
  16. priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
  17. priv->irq0, priv->irq1);
  18. + /* BCM4908 has 5 GPHYs which means bcm_sf2_port_setup() will not enable
  19. + * GPHY when needed. Leave it enabled here.
  20. + */
  21. + if (priv->type == BCM4908_DEVICE_ID)
  22. + bcm_sf2_gphy_enable_set(priv->dev->ds, true);
  23. +
  24. return 0;
  25. out_mdio: