diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-03-24 11:14:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-24 14:55:31 -0400 |
commit | d0d54e8c359399a8d07656779d5b6ddae68ef3c7 (patch) | |
tree | aba1a54e4c3d3eb3fbe93c3c1aa962a88fffeb94 /drivers/net/ethernet/broadcom/bnxt | |
parent | faaccbe6eb07ecd590bebae11eb236661ecfb069 (diff) | |
download | linux-d0d54e8c359399a8d07656779d5b6ddae68ef3c7.tar.bz2 |
bnxt: set devlink port type after registration
Move the type set of devlink port after it is registered.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index a266bff559dc..ab6fd05c462b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -229,7 +229,6 @@ int bnxt_dl_register(struct bnxt *bp) goto err_dl_unreg; } - devlink_port_type_eth_set(&bp->dl_port, bp->dev); devlink_port_attrs_set(&bp->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL, bp->pf.port_id, false, 0); rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id); @@ -237,6 +236,7 @@ int bnxt_dl_register(struct bnxt *bp) netdev_err(bp->dev, "devlink_port_register failed"); goto err_dl_param_unreg; } + devlink_port_type_eth_set(&bp->dl_port, bp->dev); rc = devlink_port_params_register(&bp->dl_port, bnxt_dl_port_params, ARRAY_SIZE(bnxt_dl_port_params)); |