Commit 8cc0698f authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Jason Gunthorpe

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: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Acked-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 9435ef4c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment