aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-12-11 12:04:42 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-12-11 14:38:17 -0700
commit8cc0698f46ca9cb38e77323e1074f182aac4040a (patch)
treee9b33d17e5e063ca67ae31ee87f9ef800284e680 /drivers/infiniband/hw/ocrdma/ocrdma_stats.c
parentRDMA/uverbs: Optimize clearing of extra bytes in response (diff)
downloadlinux-dev-8cc0698f46ca9cb38e77323e1074f182aac4040a.tar.xz
linux-dev-8cc0698f46ca9cb38e77323e1074f182aac4040a.zip
RDMA/ocrdma: Use PCI-ID as an identification in debugfs
In opposite to current implementation of identification based on device name, PCI-ID identification provides stable names suitable for device rename. Change ocrdma debugfs representation to use PCI-ID. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Acked-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
index 290d776edf48..dd15474b19b7 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
@@ -760,12 +760,13 @@ static const struct file_operations ocrdma_dbg_ops = {
void ocrdma_add_port_stats(struct ocrdma_dev *dev)
{
+ const struct pci_dev *pdev = dev->nic_info.pdev;
+
if (!ocrdma_dbgfs_dir)
return;
/* Create post stats base dir */
- dev->dir =
- debugfs_create_dir(dev_name(&dev->ibdev.dev), ocrdma_dbgfs_dir);
+ dev->dir = debugfs_create_dir(pci_name(pdev), ocrdma_dbgfs_dir);
if (!dev->dir)
goto err;