net/bnxt: refactor init/uninit
authorSomnath Kotur <somnath.kotur@broadcom.com>
Thu, 14 Jan 2021 02:19:14 +0000 (18:19 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:07 +0000 (18:16 +0100)
commit3127f99274b679124658afdbfc49210730c50617
treeb6a5d835c12cea4b3094f4d23ff08e765a87e294
parent5b4279b50f7feca8b43a4f3360a7c42eeee8f17a
net/bnxt: refactor init/uninit

Move all the individual driver fields allocation routines to one
routine - bnxt_drv_init(). This houses all such routines where
memory needs to be allocated once during the driver's lifetime
and does not need to be torn down during error recovery.

Rename some function names in accordance with their functionality.
bnxt_init_board() is doing nothing more than mapping the PCI bars,
so rename it as such.

Given that there is a bnxt_shutdown_nic that is called in dev_stop_op,
rename it's counterpart - bnxt_init_chip() that is called in
dev_start_op, to bnxt_start_nic. Also helps avoid confusion with some of
the other bnxt_init_xxx routines.
Rename bnxt_init_fw() to bnxt_get_config() as that is what that routine
is doing mostly functionality wise.

Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c