nfp: ethtool: supplement nfp link modes supported
authorYu Xiao <yu.xiao@corigine.com>
Fri, 10 Feb 2023 09:53:19 +0000 (10:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2023 09:46:10 +0000 (09:46 +0000)
Add support for the following modes to the nfp driver:

NFP_MEDIA_10GBASE_LR
NFP_MEDIA_25GBASE_LR
NFP_MEDIA_25GBASE_ER

These modes are supported by the hardware and,
support for them was recently added to firmware.

Signed-off-by: Yu Xiao <yu.xiao@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h

index 918319f..dfedb52 100644 (file)
@@ -313,6 +313,10 @@ static const struct nfp_eth_media_link_mode {
                .ethtool_link_mode      = ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
                .speed                  = NFP_SPEED_10G,
        },
+       [NFP_MEDIA_10GBASE_LR] = {
+               .ethtool_link_mode      = ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
+               .speed                  = NFP_SPEED_10G,
+       },
        [NFP_MEDIA_10GBASE_CX4] = {
                .ethtool_link_mode      = ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
                .speed                  = NFP_SPEED_10G,
@@ -349,6 +353,14 @@ static const struct nfp_eth_media_link_mode {
                .ethtool_link_mode      = ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
                .speed                  = NFP_SPEED_25G,
        },
+       [NFP_MEDIA_25GBASE_LR] = {
+               .ethtool_link_mode      = ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+               .speed                  = NFP_SPEED_25G,
+       },
+       [NFP_MEDIA_25GBASE_ER] = {
+               .ethtool_link_mode      = ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+               .speed                  = NFP_SPEED_25G,
+       },
        [NFP_MEDIA_40GBASE_CR4] = {
                .ethtool_link_mode      = ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT,
                .speed                  = NFP_SPEED_40G,
index 8f5cab0..781edc4 100644 (file)
@@ -140,6 +140,9 @@ enum nfp_ethtool_link_mode_list {
        NFP_MEDIA_100GBASE_CR4,
        NFP_MEDIA_100GBASE_KP4,
        NFP_MEDIA_100GBASE_CR10,
+       NFP_MEDIA_10GBASE_LR,
+       NFP_MEDIA_25GBASE_LR,
+       NFP_MEDIA_25GBASE_ER,
        NFP_MEDIA_LINK_MODES_NUMBER
 };