RDMA/bnxt_re: Use driver_unregister and unregistration API
authorSelvin Xavier <selvin.xavier@broadcom.com>
Wed, 26 Feb 2020 15:45:32 +0000 (07:45 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 2 Mar 2020 15:10:38 +0000 (11:10 -0400)
commit66832705c4d01e52df78570e72a9392a1271d2e9
tree9a9a4b5548a8fc90714fab5d26055f6d7b24391f
parentc2b777a9592395bf68f17bcfa76813eb507a001c
RDMA/bnxt_re: Use driver_unregister and unregistration API

Using the new unregister APIs provided by the core.  Provide the
dealloc_driver hook for the core to callback at the time of device
un-registration.

bnxt_re VF resources are created by the corresponding PF driver.  During
ib_unregister_driver, PF might get removed before VF and this could cause
failure when VFs are removed. Driver is explicitly queuing the removal of
VF devices before calling ib_unregister_driver.

Link: https://lore.kernel.org/r/1582731932-26574-3-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/main.c