linux/drivers/infiniband
Jason Gunthorpe d0899892ed RDMA/device: Provide APIs from the core code to help unregistration
These APIs are intended to support drivers that exist outside the usual
driver core probe()/remove() callbacks. Normally the driver core will
prevent remove() from running concurrently with probe(), once this safety
is lost drivers need more support to get the locking and lifetimes right.

ib_unregister_driver() is intended to be used during module_exit of a
driver using these APIs. It unregisters all the associated ib_devices.

ib_unregister_device_and_put() is to be used by a driver-specific removal
function (ie removal by name, removal from a netdev notifier, removal from
netlink)

ib_unregister_queued() is to be used from netdev notifier chains where
RTNL is held.

The locking is tricky here since once things become async it is possible
to race unregister with registration. This is largely solved by relying on
the registration refcount, unregistration will only ever work on something
that has a positive registration refcount - and then an unregistration
mutex serializes all competing unregistrations of the same device.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-02-19 20:52:18 -07:00
..
core RDMA/device: Provide APIs from the core code to help unregistration 2019-02-19 20:52:18 -07:00
hw RDMA/cxgb4: Remove kref accounting for sync operation 2019-02-15 21:39:15 -07:00
sw RDMA/rxe: Use ib_device_get_by_netdev() instead of open coding 2019-02-19 20:52:18 -07:00
ulp RDMA: Add and use rdma_for_each_port 2019-02-19 10:13:39 -07:00
Kconfig IB/{core,uverbs}: Move ib_umem_xxx functions from ib_core to ib_uverbs 2019-01-10 17:06:44 -07:00
Makefile