aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2014-09-14 09:47:50 -0400
committerRoland Dreier <roland@purestorage.com>2014-10-09 03:08:40 -0400
commiteefd56e5895540ea78979b7845f76c9bb94c8fed (patch)
tree55d3a6fd2c8467cf13f39af07baf3521f45bc291
parentfe82dcec644244676d55a1384c958d5f67979adb (diff)
IB/mlx5: Clear umr resources after ib_unregister_device
Some ULPs may make use of resources created in create_umr_res so make sure to call destroy_umrc_res after returning from ib_unregister_device, which makes sure all ULPs have closed their resources. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/hw/mlx5/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index d8907b20522a..ecd3aebc46fe 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1414,8 +1414,8 @@ err_dealloc:
1414static void mlx5_ib_remove(struct mlx5_core_dev *mdev, void *context) 1414static void mlx5_ib_remove(struct mlx5_core_dev *mdev, void *context)
1415{ 1415{
1416 struct mlx5_ib_dev *dev = context; 1416 struct mlx5_ib_dev *dev = context;
1417 destroy_umrc_res(dev);
1418 ib_unregister_device(&dev->ib_dev); 1417 ib_unregister_device(&dev->ib_dev);
1418 destroy_umrc_res(dev);
1419 destroy_dev_resources(&dev->devr); 1419 destroy_dev_resources(&dev->devr);
1420 free_comp_eqs(dev); 1420 free_comp_eqs(dev);
1421 ib_dealloc_device(&dev->ib_dev); 1421 ib_dealloc_device(&dev->ib_dev);