common/mlx5: get PCI device address from any bus
authorThomas Monjalon <thomas@monjalon.net>
Wed, 21 Jul 2021 14:37:32 +0000 (22:37 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Jul 2021 22:11:14 +0000 (00:11 +0200)
commit4d567938be21d7a91e63100e2e2eb9bc25c0a8db
tree17310b7e1f18fa51a1c44173ed099b3e07ce718f
parent777b72a9339c375b5c70dbe09262ad1fd123f159
common/mlx5: get PCI device address from any bus

A function is exported to allow retrieving the PCI address
of the parent PCI device of a Sub-Function in auxiliary bus sysfs.
The function mlx5_dev_to_pci_str() is accepting both PCI and auxiliary
devices. In case of a PCI device, it is simply using the device name.

The function mlx5_dev_to_pci_addr(), which is based on sysfs path
and do not use any device object, is renamed to mlx5_get_pci_addr()
for clarity purpose.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/common/mlx5/linux/mlx5_common_auxiliary.c
drivers/common/mlx5/linux/mlx5_common_os.c
drivers/common/mlx5/mlx5_common.c
drivers/common/mlx5/mlx5_common.h
drivers/common/mlx5/mlx5_common_private.h
drivers/common/mlx5/version.map
drivers/net/mlx5/linux/mlx5_os.c