]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
RDMA/ocrdma: Use PCI-ID as an identification in debugfs
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 11 Dec 2018 10:04:42 +0000 (12:04 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Dec 2018 21:38:17 +0000 (14:38 -0700)
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>
drivers/infiniband/hw/ocrdma/ocrdma_stats.c

index 290d776edf4858d6951e3fbb1e1f58b1adfbd605..dd15474b19b7e62eb6b41839c70810c9935db7ba 100644 (file)
@@ -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;