790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From d55c300aa1fe240aa3eba18550ba6c4e2c4bd157 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <[email protected]>
  3. Date: Fri, 1 Mar 2024 12:43:03 +0200
  4. Subject: [PATCH 43/48] net: dsa: mt7530: put initialising PCS devices code
  5. back to original order
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. The commit fae463084032 ("net: dsa: mt753x: fix pcs conversion regression")
  10. fixes regression caused by cpu_port_config manually calling phylink
  11. operations. cpu_port_config was deemed useless and was removed. Therefore,
  12. put initialising PCS devices code back to its original order.
  13. Signed-off-by: Arınç ÜNAL <[email protected]>
  14. Signed-off-by: Paolo Abeni <[email protected]>
  15. ---
  16. drivers/net/dsa/mt7530.c | 20 ++++++++++----------
  17. 1 file changed, 10 insertions(+), 10 deletions(-)
  18. --- a/drivers/net/dsa/mt7530.c
  19. +++ b/drivers/net/dsa/mt7530.c
  20. @@ -2845,17 +2845,9 @@ static int
  21. mt753x_setup(struct dsa_switch *ds)
  22. {
  23. struct mt7530_priv *priv = ds->priv;
  24. - int i, ret;
  25. + int ret = priv->info->sw_setup(ds);
  26. + int i;
  27. - /* Initialise the PCS devices */
  28. - for (i = 0; i < priv->ds->num_ports; i++) {
  29. - priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  30. - priv->pcs[i].pcs.neg_mode = true;
  31. - priv->pcs[i].priv = priv;
  32. - priv->pcs[i].port = i;
  33. - }
  34. -
  35. - ret = priv->info->sw_setup(ds);
  36. if (ret)
  37. return ret;
  38. @@ -2867,6 +2859,14 @@ mt753x_setup(struct dsa_switch *ds)
  39. if (ret && priv->irq)
  40. mt7530_free_irq_common(priv);
  41. + /* Initialise the PCS devices */
  42. + for (i = 0; i < priv->ds->num_ports; i++) {
  43. + priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  44. + priv->pcs[i].pcs.neg_mode = true;
  45. + priv->pcs[i].priv = priv;
  46. + priv->pcs[i].port = i;
  47. + }
  48. +
  49. if (priv->create_sgmii) {
  50. ret = priv->create_sgmii(priv);
  51. if (ret && priv->irq)