Commit f1fa719c authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

nfp: do not handle nn->port defined case in nfp_net_get_phys_port_name()

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: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d484210b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment