summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-07-04 08:50:23 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-07-04 22:47:01 +0300
commit87fc2a620a398e970872064841b0db7cc6d0149f (patch)
treefff3d636ab33a8ea70c3b95886d21f4a7da2b589 /drivers/infiniband/hw
parent8193abb6a8171c775503acd041eb957cc7e9e7f4 (diff)
downloadlinux-87fc2a620a398e970872064841b0db7cc6d0149f.tar.xz
RDMA/uverbs: Store the specs_root in the struct ib_uverbs_device
The specs are required to operate the uverbs file, so they belong inside the ib_uverbs_device, not inside the ib_device. The spec passed in the ib_device is just a communication from the driver and should not be used during runtime. This also changes the lifetime of the spec memory to match the ib_uverbs_device, however at this time the spec_root can still contain driver pointers after disassociation, so it cannot be used if ib_dev is NULL. This is preparation for another series. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index d3867286606c..0fb80777aade 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -5350,15 +5350,15 @@ static int populate_specs_root(struct mlx5_ib_dev *dev)
!WARN_ON(num_trees >= ARRAY_SIZE(default_root)))
default_root[num_trees++] = mlx5_ib_get_devx_tree();
- dev->ib_dev.specs_root =
+ dev->ib_dev.driver_specs_root =
uverbs_alloc_spec_tree(num_trees, default_root);
- return PTR_ERR_OR_ZERO(dev->ib_dev.specs_root);
+ return PTR_ERR_OR_ZERO(dev->ib_dev.driver_specs_root);
}
static void depopulate_specs_root(struct mlx5_ib_dev *dev)
{
- uverbs_free_spec_tree(dev->ib_dev.specs_root);
+ uverbs_free_spec_tree(dev->ib_dev.driver_specs_root);
}
static int mlx5_ib_read_counters(struct ib_counters *counters,