summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt.c
diff options
context:
space:
mode:
authorSathya Perla2017-07-25 19:28:41 +0200
committerDavid S. Miller2017-07-25 21:48:19 +0200
commit53f70b8b5aa06db53eb06f092342e6073891729a (patch)
treead49fbd2ddb2214efd045008417397b9bd367821 /drivers/net/ethernet/broadcom/bnxt/bnxt.c
parentbnxt_en: use SWITCHDEV_SET_OPS() for setting vf_rep_switchdev_ops (diff)
downloadkernel-qcow2-linux-53f70b8b5aa06db53eb06f092342e6073891729a.tar.gz
kernel-qcow2-linux-53f70b8b5aa06db53eb06f092342e6073891729a.tar.xz
kernel-qcow2-linux-53f70b8b5aa06db53eb06f092342e6073891729a.zip
bnxt_en: fix switchdev port naming for external-port-rep and vf-reps
Fix the phys_port_name for the external physical port to be in "pA" format and that of VF-rep to be in "pCvfD" format as suggested by Jakub Kicinski. Fixes: c124a62ff2dd ("bnxt_en: add support for port_attr_get and get_phys_port_name") Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c6
1 files changed, 1 insertions, 5 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;