Commit d06a420e authored by Yuyu Li's avatar Yuyu Li Committed by huwentao
Browse files

RDMA/hns: Modify debugfs name

mainline inclusion
from mainline-v6.13-rc1
commit 370a9351bf84afc5a56a3f02ba3805bbfcb53c32
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB4ZYK

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=370a9351bf84afc5a56a3f02ba3805bbfcb53c32



----------------------------------------------------------------------

The sub-directory of hns_roce debugfs is named after the device's
kernel name currently, but it will be inconvenient to use when
the device is renamed.

Modify the name to pci name as users can always easily find the
correspondence between an RDMA device and its pci name.

Fixes: eb7854d63db5 ("RDMA/hns: Support SW stats with debugfs")
Signed-off-by: default avatarYuyu Li <liyuyu6@huawei.com>
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20241024124000.2931869-4-huangjunxian6@hisilicon.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarhuwentao <huwentao19@h-partners.com>
parent 305d85ee
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/pci.h>

#include "hns_roce_common.h"
#include "hns_roce_device.h"
@@ -675,7 +676,7 @@ void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev)
{
	struct hns_roce_dev_debugfs *dbgfs = &hr_dev->dbgfs;

	dbgfs->root = debugfs_create_dir(dev_name(&hr_dev->ib_dev.dev),
	dbgfs->root = debugfs_create_dir(pci_name(hr_dev->pci_dev),
					 hns_roce_dbgfs_root);

	if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_DCA_MODE)