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: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d484210bf7
commit
f1fa719cfd
@ -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);
|
struct nfp_net *nn = netdev_priv(netdev);
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
/* If port is defined, devlink_port is registered and devlink core
|
||||||
|
* is taking care of name formatting.
|
||||||
|
*/
|
||||||
if (nn->port)
|
if (nn->port)
|
||||||
return nfp_port_get_phys_port_name(netdev, name, len);
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
if (nn->dp.is_vf || nn->vnic_no_name)
|
if (nn->dp.is_vf || nn->vnic_no_name)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user