]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bnxt_en: Move devlink_register before registering netdev
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 27 Jan 2020 09:56:22 +0000 (04:56 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jan 2020 10:33:28 +0000 (11:33 +0100)
commitcda2cab0771183932d6ba73c5ac63bb63decdadf
treef1c181211bd04c43760ab36fadcd030cb8d56bac
parent002870ebdabb75809d753e3c171c68c4e70a0e91
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c