PCI: Export pci_probe_reset_function()
PATCH 1/1 PCI: Export pci_probe_reset_function()
The equivalent bus and slot versions of this are already exported and vfio-pci would like a function-probe available so we can expose function-level reset capabilities to the user without necessarily using it to perform a reset before enabling the device for the user.
--- drivers/pci/pci.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+)
drivers/pci/pci.c +1 -0
@@ -3524,6 +3524,7 @@ int pci_probe_reset_function(struct pci_dev *dev) {return pci_dev_reset (dev,1 ); } +EXPORT_SYMBOL_GPL (pci_probe_reset_function);/** * pci_reset_function - quiesce and reset a PCI device function
include/linux/pci.h +1 -0
@@ -986,6 +986,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width);int __pci_reset_function (struct pci_dev *dev);int __pci_reset_function_locked (struct pci_dev *dev); +int pci_probe_reset_function (struct pci_dev *dev);int pci_reset_function (struct pci_dev *dev);int pci_try_reset_function (struct pci_dev *dev);int pci_probe_reset_slot (struct pci_slot *slot);
Quoted 6 lines · Alex Williamson
The equivalent bus and slot versions of this are already exported and vfio-pci would like a function-probe available so we can expose function-level reset capabilities to the user without necessarily using it to perform a reset before enabling the device for the user.
Signed-off-by Alex Williamson <[email protected]>
Applied to pci/virtualization for v4.1, thanks!
Quoted 30 lines
--- drivers/pci/pci.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+)drivers/pci/pci.c +1
-0@@ -3524,6 +3524,7 @@ int pci_probe_reset_function(struct pci_dev *dev) {return pci_dev_reset (dev,1 ); } +EXPORT_SYMBOL_GPL (pci_probe_reset_function);/** * pci_reset_function - quiesce and reset a PCI device function include/linux/pci.h +1
-0@@ -986,6 +986,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width);int __pci_reset_function (struct pci_dev *dev);int __pci_reset_function_locked (struct pci_dev *dev); +int pci_probe_reset_function (struct pci_dev *dev);int pci_reset_function (struct pci_dev *dev);int pci_try_reset_function (struct pci_dev *dev);int pci_probe_reset_slot (struct pci_slot *slot);
Quoted 9 lines · Bjorn Helgaas
Quoted 6 lines · Alex Williamson
The equivalent bus and slot versions of this are already exported and vfio-pci would like a function-probe available so we can expose function-level reset capabilities to the user without necessarily using it to perform a reset before enabling the device for the user.
Signed-off-by Alex Williamson <[email protected]>Applied to pci/virtualization for v4.1, thanks!
Actually, maybe it makes more sense for you to apply this along with the vfio patch that uses it? So if you want:
Quoted 30 lines
Quoted 30 lines
--- drivers/pci/pci.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+)drivers/pci/pci.c +1
-0@@ -3524,6 +3524,7 @@ int pci_probe_reset_function(struct pci_dev *dev) {return pci_dev_reset (dev,1 ); } +EXPORT_SYMBOL_GPL (pci_probe_reset_function);/** * pci_reset_function - quiesce and reset a PCI device function include/linux/pci.h +1
-0@@ -986,6 +986,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width);int __pci_reset_function (struct pci_dev *dev);int __pci_reset_function_locked (struct pci_dev *dev); +int pci_probe_reset_function (struct pci_dev *dev);int pci_reset_function (struct pci_dev *dev);int pci_try_reset_function (struct pci_dev *dev);int pci_probe_reset_slot (struct pci_slot *slot);
Quoted 7 lines · Bjorn Helgaas
Quoted 6 lines · Bjorn Helgaas
Quoted 5 lines · Alex Williamson
The equivalent bus and slot versions of this are already exported and vfio-pci would like a function-probe available so we can expose function-level reset capabilities to the user without necessarily using it to perform a reset before enabling the device for the user.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Alex Williamson <[email protected]>Applied to pci/virtualization for v4.1, thanks!
Actually, maybe it makes more sense for you to apply this along with the vfio patch that uses it? So if you want:
Acked-by Bjorn Helgaas <[email protected]>
That would be more convenient, I'll take it. Thanks!
Alex
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
--- drivers/pci/pci.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+)drivers/pci/pci.c +1
-0@@ -3524,6 +3524,7 @@ int pci_probe_reset_function(struct pci_dev *dev) {return pci_dev_reset (dev,1 ); } +EXPORT_SYMBOL_GPL (pci_probe_reset_function);/** * pci_reset_function - quiesce and reset a PCI device function include/linux/pci.h +1
-0@@ -986,6 +986,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width);int __pci_reset_function (struct pci_dev *dev);int __pci_reset_function_locked (struct pci_dev *dev); +int pci_probe_reset_function (struct pci_dev *dev);int pci_reset_function (struct pci_dev *dev);int pci_try_reset_function (struct pci_dev *dev);int pci_probe_reset_slot (struct pci_slot *slot);