diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2019-06-30 19:23:30 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-07-03 17:12:37 -0300 |
commit | e337dd53ce4cc3db79e52704e554f648c46d5e91 (patch) | |
tree | de1fe59249fb690a587b921109026e518a0135ca /drivers/infiniband/hw/mlx5/main.c | |
parent | IB/mlx5: Introduce MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD (diff) | |
download | linux-dev-e337dd53ce4cc3db79e52704e554f648c46d5e91.tar.xz linux-dev-e337dd53ce4cc3db79e52704e554f648c46d5e91.zip |
IB/mlx5: Register DEVX with mlx5_core to get async events
Register DEVX with with mlx5_core to get async events. This will enable
to dispatch the applicable events to its consumers in down stream patches.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 9db8c06aa01e..692b60898ee2 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -6630,15 +6630,19 @@ static int mlx5_ib_stage_devx_init(struct mlx5_ib_dev *dev) int uid; uid = mlx5_ib_devx_create(dev, false); - if (uid > 0) + if (uid > 0) { dev->devx_whitelist_uid = uid; + mlx5_ib_devx_init_event_table(dev); + } return 0; } static void mlx5_ib_stage_devx_cleanup(struct mlx5_ib_dev *dev) { - if (dev->devx_whitelist_uid) + if (dev->devx_whitelist_uid) { + mlx5_ib_devx_cleanup_event_table(dev); mlx5_ib_devx_destroy(dev, dev->devx_whitelist_uid); + } } void __mlx5_ib_remove(struct mlx5_ib_dev *dev, |