Skip to contentSkip to conversation

PCI: Export pci_probe_reset_function()

PATCH Applied Alex Williamson 2 participants 4 messages Apr 9, 2015 PCI

lore
Share & tools
lore
#0 lore raw

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
index 81f06e8..9f3e691 100644
@@ -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
index 211e9da..233d1ae 100644
@@ -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);
maintainer Applied
#1 lore raw
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.

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
index 81f06e8..9f3e691 100644
@@ -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
index 211e9da..233d1ae 100644
@@ -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);
maintainer Acked-by
#2 lore raw
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.

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
index 81f06e8..9f3e691 100644
@@ -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
index 211e9da..233d1ae 100644
@@ -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);
#3 lore raw
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

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:

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
index 81f06e8..9f3e691 100644
@@ -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
index 211e9da..233d1ae 100644
@@ -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);