summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c6
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 9835ddf1685b..156fb374522b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -7552,11 +7552,7 @@ static int bnxt_get_phys_port_name(struct net_device *dev, char *buf,
if (!BNXT_PF(bp))
return -EOPNOTSUPP;
- /* The switch-id that the pf belongs to is exported by
- * the switchdev ndo. This name is just to distinguish from the
- * vf-rep ports.
- */
- rc = snprintf(buf, len, "pf%d", bp->pf.port_id);
+ rc = snprintf(buf, len, "p%d", bp->pf.port_id);
if (rc >= len)
return -EOPNOTSUPP;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c
index c00352a4c1f0..b05c5d0ee3f9 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c
@@ -141,9 +141,11 @@ static int bnxt_vf_rep_get_phys_port_name(struct net_device *dev, char *buf,
size_t len)
{
struct bnxt_vf_rep *vf_rep = netdev_priv(dev);
+ struct pci_dev *pf_pdev = vf_rep->bp->pdev;
int rc;
- rc = snprintf(buf, len, "vfr%d", vf_rep->vf_idx);
+ rc = snprintf(buf, len, "pf%dvf%d", PCI_FUNC(pf_pdev->devfn),
+ vf_rep->vf_idx);
if (rc >= len)
return -EOPNOTSUPP;
return 0;