nfp: do not handle nn->port defined case in nfp_net_get_phys_port_name()
authorJiri Pirko <jiri@mellanox.com>
Thu, 28 Mar 2019 12:56:45 +0000 (13:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Mar 2019 19:55:31 +0000 (12:55 -0700)
If nn->port is defined it means that devlink_port has been registered
for this port as well. Devlink core is handling the port name
formatting.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index b676943..99200b5 100644 (file)
@@ -3324,8 +3324,11 @@ nfp_net_get_phys_port_name(struct net_device *netdev, char *name, size_t len)
        struct nfp_net *nn = netdev_priv(netdev);
        int n;
 
+       /* If port is defined, devlink_port is registered and devlink core
+        * is taking care of name formatting.
+        */
        if (nn->port)
-               return nfp_port_get_phys_port_name(netdev, name, len);
+               return -EOPNOTSUPP;
 
        if (nn->dp.is_vf || nn->vnic_no_name)
                return -EOPNOTSUPP;