Blob Blame History Raw
From: Parav Pandit <parav@mellanox.com>
Date: Thu, 12 Dec 2019 13:30:21 +0200
Subject: IB/mlx5: Do reverse sequence during device removal
Patch-mainline: v5.6-rc1
Git-commit: 4cca96a8d9da0ed8217cfdf2aec0c3c8b88e8911
References: jsc#SLE-8446

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/hw/mlx5/main.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -6742,6 +6742,8 @@ void __mlx5_ib_remove(struct mlx5_ib_dev
 		      const struct mlx5_ib_profile *profile,
 		      int stage)
 {
+	dev->ib_active = false;
+
 	/* Number of stages to cleanup */
 	while (stage) {
 		stage--;