summary refs log tree commit diff
diff options
context:
space:
mode:
authorPotnuri Bharat Teja <bharat@chelsio.com>2020-05-25 00:38:14 +0530
committerJason Gunthorpe <jgg@mellanox.com>2020-05-25 15:38:35 -0300
commit49ea0c036ede81f126f1a9389d377999fdf5c5a1 (patch)
tree9b47f1baaf0839a44c5b5989ccefcf4b4bda5602
parente1b43f07c0d4c82fd5591ae24d045fee2b00edf3 (diff)
downloadlinux-49ea0c036ede81f126f1a9389d377999fdf5c5a1.tar.gz
RDMA/iw_cxgb4: cleanup device debugfs entries on ULD remove
Remove device specific debugfs entries immediately if LLD detaches a
particular ULD device in case of fatal PCI errors.

Link: https://lore.kernel.org/r/20200524190814.17599-1-bharat@chelsio.com
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 599340c1f0b8..541dbcf22d0e 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -953,6 +953,7 @@ void c4iw_dealloc(struct uld_ctx *ctx)
 static void c4iw_remove(struct uld_ctx *ctx)
 {
 	pr_debug("c4iw_dev %p\n", ctx->dev);
+	debugfs_remove_recursive(ctx->dev->debugfs_root);
 	c4iw_unregister_device(ctx->dev);
 	c4iw_dealloc(ctx);
 }