diff options
author | Mark Zhang <markzhang@nvidia.com> | 2023-01-04 11:43:34 +0200 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-01-15 12:23:10 +0200 |
commit | 312b8f79eb05479628ee71357749815b2eeeeea8 (patch) | |
tree | 5aa94795a7badd6a549a0bfb0cd07c4f68865179 /drivers/infiniband/hw/mlx5/main.c | |
parent | 1ca49d26afc2609542be4a57e336191b525ca698 (diff) | |
download | linux-stable-312b8f79eb05479628ee71357749815b2eeeeea8.tar.gz linux-stable-312b8f79eb05479628ee71357749815b2eeeeea8.tar.bz2 linux-stable-312b8f79eb05479628ee71357749815b2eeeeea8.zip |
RDMA/mlx: Calling qp event handler in workqueue context
Move the call of qp event handler from atomic to workqueue context,
so that the handler is able to block. This is needed by following
patches.
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Link: https://lore.kernel.org/r/0cd17b8331e445f03942f4bb28d447f24ac5669d.1672821186.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index c669ef6e47e7..8588f2fc0cba 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -4403,6 +4403,10 @@ static int __init mlx5_ib_init(void) return -ENOMEM; } + ret = mlx5_ib_qp_event_init(); + if (ret) + goto qp_event_err; + mlx5_ib_odp_init(); ret = mlx5r_rep_init(); if (ret) @@ -4420,6 +4424,8 @@ drv_err: mp_err: mlx5r_rep_cleanup(); rep_err: + mlx5_ib_qp_event_cleanup(); +qp_event_err: destroy_workqueue(mlx5_ib_event_wq); free_page((unsigned long)xlt_emergency_page); return ret; @@ -4431,6 +4437,7 @@ static void __exit mlx5_ib_cleanup(void) auxiliary_driver_unregister(&mlx5r_mp_driver); mlx5r_rep_cleanup(); + mlx5_ib_qp_event_cleanup(); destroy_workqueue(mlx5_ib_event_wq); free_page((unsigned long)xlt_emergency_page); } |