OSDN Git Service

IB/mlx5: Move IB event processing onto a workqueue
authorDaniel Jurgens <danielj@mellanox.com>
Thu, 4 Jan 2018 15:25:37 +0000 (17:25 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 8 Jan 2018 18:42:22 +0000 (11:42 -0700)
commitd69a24e036596877ce08c25ab8e63a202412fd9e
tree2b716d324b8dec92a63b5d7139388d3af8cd0b9d
parent32f69e4be269739c3850cd20f1a3322e95c1145f
IB/mlx5: Move IB event processing onto a workqueue

Because mlx5_ib_event can be called from atomic context move event
handling onto a workqueue. A mutex lock is required to get the IB device
for slave ports, so move event processing onto a work queue. When an IB
event is received, check if the mlx5_core_dev  is a slave port, if so
attempt to get the IB device it's affiliated with. If found process the
event for that device, otherwise return.

Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c