bnxt_en: Refactor bnxt_rdma_aux_device_init/uninit functions
authorVikas Gupta <vikas.gupta@broadcom.com>
Tue, 9 Apr 2024 21:54:28 +0000 (14:54 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 11 Apr 2024 02:55:05 +0000 (19:55 -0700)
commit194fad5b27815ca80e832ac875c0026ff96fc243
tree1e3581263722691095536a9d7e93db356dc1449b
parentb58f5a9c7034e02c391f4ae70fc62c927ce8f04f
bnxt_en: Refactor bnxt_rdma_aux_device_init/uninit functions

In its current form, bnxt_rdma_aux_device_init() not only initializes
the necessary data structures of the newly created aux device but also
adds the aux device into the aux bus subsytem. Refactor the logic into
separate functions, first function to initialize the aux device along
with the required resources and second, to actually add the device to
the aux bus subsytem.
This separation helps to create bnxt_en_dev much earlier and save its
resources separately.

Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240409215431.41424-5-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h