net: dpaa2-mac: add support for more ethtool 10G link modes
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 17 Sep 2021 13:41:17 +0000 (14:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Sep 2021 11:11:40 +0000 (12:11 +0100)
Phylink documentation says:
  Note that the PHY may be able to transform from one connection
  technology to another, so, eg, don't clear 1000BaseX just
  because the MAC is unable to BaseX mode. This is more about
  clearing unsupported speeds and duplex settings. The port modes
  should not be cleared; phylink_set_port_modes() will help with this.

So add the missing 10G modes.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Marek BehĂșn <kabel@kernel.org>
Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c

index ae6d382..543c1f2 100644 (file)
@@ -140,6 +140,11 @@ static void dpaa2_mac_validate(struct phylink_config *config,
        case PHY_INTERFACE_MODE_10GBASER:
        case PHY_INTERFACE_MODE_USXGMII:
                phylink_set(mask, 10000baseT_Full);
+               phylink_set(mask, 10000baseCR_Full);
+               phylink_set(mask, 10000baseSR_Full);
+               phylink_set(mask, 10000baseLR_Full);
+               phylink_set(mask, 10000baseLRM_Full);
+               phylink_set(mask, 10000baseER_Full);
                if (state->interface == PHY_INTERFACE_MODE_10GBASER)
                        break;
                phylink_set(mask, 5000baseT_Full);