diff mbox series

[for-next] RDMA/iw_cxgb4: cleanup device debugfs entries on ULD remove

Message ID 20200524190814.17599-1-bharat@chelsio.com (mailing list archive)
State Mainlined
Commit 49ea0c036ede81f126f1a9389d377999fdf5c5a1
Delegated to: Jason Gunthorpe
Headers show
Series [for-next] RDMA/iw_cxgb4: cleanup device debugfs entries on ULD remove | expand

Commit Message

Potnuri Bharat Teja May 24, 2020, 7:08 p.m. UTC
Remove device specific debugfs entries immediately if LLD detaches a
particular ULD device in case of fatal PCI errors.

Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
---
 drivers/infiniband/hw/cxgb4/device.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jason Gunthorpe May 25, 2020, 6:38 p.m. UTC | #1
On Mon, May 25, 2020 at 12:38:14AM +0530, Potnuri Bharat Teja wrote:
> Remove device specific debugfs entries immediately if LLD detaches a
> particular ULD device in case of fatal PCI errors.
> 
> Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> ---
>  drivers/infiniband/hw/cxgb4/device.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-next, thanks

Jason
diff mbox series

Patch

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);
 }