aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-12-12 13:30:21 +0200
committerJason Gunthorpe <jgg@mellanox.com>2020-01-07 20:18:10 -0400
commit4cca96a8d9da0ed8217cfdf2aec0c3c8b88e8911 (patch)
tree7c9b00dc6be1aef8f6240c077a1973b73b619794 /drivers/infiniband/hw/mlx5
parentRDMA/hns: Fix coding style issues (diff)
downloadlinux-dev-4cca96a8d9da0ed8217cfdf2aec0c3c8b88e8911.tar.xz
linux-dev-4cca96a8d9da0ed8217cfdf2aec0c3c8b88e8911.zip
IB/mlx5: Do reverse sequence during device removal
When IB device profile initialization completes, device is marked as active. However, IB device is not marked inactive, during device removal flow. It should be the mirror of the add flow. Hence, mark it inactive during remove sequence. Link: https://lore.kernel.org/r/20191212113024.336702-2-leon@kernel.org Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 997cbfe4b90c..05b557ddd0d8 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -6725,6 +6725,8 @@ void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
const struct mlx5_ib_profile *profile,
int stage)
{
+ dev->ib_active = false;
+
/* Number of stages to cleanup */
while (stage) {
stage--;