]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI/IOV: Add pci_resource_num_to_vf_bar() to convert VF BAR number to/from IOV resource
authorMichał Winiarski <michal.winiarski@intel.com>
Wed, 2 Jul 2025 09:35:19 +0000 (11:35 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 14 Jul 2025 20:03:23 +0000 (15:03 -0500)
commit535bdbeaacf96a8c4ef8d726382fb8fae97f168f
tree85c4597a48c920569892b2f5ad8614dd450e68eb
parent5a8f77e24a30bbce2fa57926f3dede84894fd10a
PCI/IOV: Add pci_resource_num_to_vf_bar() to convert VF BAR number to/from IOV resource

There are multiple places where conversions between IOV resources and
corresponding VF BAR numbers are done.

Extract the logic to pci_resource_num_from_vf_bar() and
pci_resource_num_to_vf_bar() helpers.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://patch.msgid.link/20250702093522.518099-3-michal.winiarski@intel.com
drivers/pci/iov.c
drivers/pci/pci.h
drivers/pci/setup-bus.c