Skip to content

Commit

Permalink
RDMA/ocrdma: Use PCI-ID as an identification in debugfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Leon Romanovsky authored and Jason Gunthorpe committed Dec 11, 2018
1 parent 9435ef4 commit 8cc0698
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/infiniband/hw/ocrdma/ocrdma_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8cc0698

Please sign in to comment.