aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
diff options
context:
space:
mode:
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>2020-01-27 04:56:22 -0500
committerDavid S. Miller <davem@davemloft.net>2020-01-27 11:33:28 +0100
commitcda2cab0771183932d6ba73c5ac63bb63decdadf (patch)
treef1c181211bd04c43760ab36fadcd030cb8d56bac /drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
parentbnxt_en: Register devlink irrespective of firmware spec version (diff)
downloadlinux-dev-cda2cab0771183932d6ba73c5ac63bb63decdadf.tar.xz
linux-dev-cda2cab0771183932d6ba73c5ac63bb63decdadf.zip
bnxt_en: Move devlink_register before registering netdev
Latest kernels get the phys_port_name via devlink, if ndo_get_phys_port_name is not defined. To provide the phys_port_name correctly, register devlink before registering netdev. Also call devlink_port_type_eth_set() after registering netdev as devlink port updates the netdev structure and notifies user. Cc: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@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_devlink.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index a8cdfbdd5598..f2d9cd6892d1 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -561,7 +561,6 @@ int bnxt_dl_register(struct bnxt *bp)
netdev_err(bp->dev, "devlink_port_register failed");
goto err_dl_unreg;
}
- devlink_port_type_eth_set(&bp->dl_port, bp->dev);
rc = bnxt_dl_params_register(bp);
if (rc)