Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2021
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.46 KB | None | 0 0
  1. --- a/drivers/net/dsa/lantiq_gswip.c
  2. +++ b/drivers/net/dsa/lantiq_gswip.c
  3. @@ -392,17 +392,7 @@ static void gswip_mii_mask(struct gswip_priv *priv, u32 clear, u32 set,
  4.  static void gswip_mii_mask_cfg(struct gswip_priv *priv, u32 clear, u32 set,
  5.                    int port)
  6.  {
  7. -   switch (port) {
  8. -   case 0:
  9. -       gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG0);
  10. -       break;
  11. -   case 1:
  12. -       gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG1);
  13. -       break;
  14. -   case 5:
  15. -       gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG5);
  16. -       break;
  17. -   }
  18. +   gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG0 + (port * 2));
  19.  }
  20.  
  21.  static void gswip_mii_mask_pcdu(struct gswip_priv *priv, u32 clear, u32 set,
  22. @@ -1470,6 +1460,8 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port,
  23.     case PHY_INTERFACE_MODE_MII:
  24.     case PHY_INTERFACE_MODE_INTERNAL:
  25.         miicfg |= GSWIP_MII_CFG_MODE_MIIM;
  26. +       miicfg &= ~GSWIP_MII_CFG_RATE_MASK;
  27. +       miicfg |= GSWIP_MII_CFG_RATE_M25;
  28.         break;
  29.     case PHY_INTERFACE_MODE_REVMII:
  30.         miicfg |= GSWIP_MII_CFG_MODE_MIIP;
  31. @@ -1522,9 +1514,7 @@ static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
  32.  {
  33.     struct gswip_priv *priv = ds->priv;
  34.  
  35. -   /* Enable the xMII interface only for the external PHY */
  36. -   if (interface != PHY_INTERFACE_MODE_INTERNAL)
  37. -       gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
  38. +   gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
  39.  }
  40.  
  41.  static void gswip_get_strings(struct dsa_switch *ds, int port, u32 stringset,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement