[rdma-next,v1,1/4] IB/mlx5: Do reverse sequence during device removal
diff mbox series

Message ID 20191212113024.336702-2-leon@kernel.org
State Accepted
Delegated to: Jason Gunthorpe
Headers show
  • Let IB core distribute cache update events
Related show

Commit Message

Leon Romanovsky Dec. 12, 2019, 11:30 a.m. UTC
From: Parav Pandit <parav@mellanox.com>

When IB device profile initialization completes, device is marked as
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.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
 drivers/infiniband/hw/mlx5/main.c | 2 ++
 1 file changed, 2 insertions(+)


diff mbox series

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 52bc86ab9490..a9090065a997 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -6921,6 +6921,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) {