Commit 2d2917f7 authored by Alex Williamson's avatar Alex Williamson Committed by Bjorn Helgaas

PCI: Export pcie_has_flr()

pcie_flr() suggests pcie_has_flr() to ensure that PCIe FLR support is
present prior to calling.  pcie_flr() is exported while pcie_has_flr()
is not.  Resolve this.
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent c6a44ba9
...@@ -4039,7 +4039,7 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout) ...@@ -4039,7 +4039,7 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
* Returns true if the device advertises support for PCIe function level * Returns true if the device advertises support for PCIe function level
* resets. * resets.
*/ */
static bool pcie_has_flr(struct pci_dev *dev) bool pcie_has_flr(struct pci_dev *dev)
{ {
u32 cap; u32 cap;
...@@ -4049,6 +4049,7 @@ static bool pcie_has_flr(struct pci_dev *dev) ...@@ -4049,6 +4049,7 @@ static bool pcie_has_flr(struct pci_dev *dev)
pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap); pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap);
return cap & PCI_EXP_DEVCAP_FLR; return cap & PCI_EXP_DEVCAP_FLR;
} }
EXPORT_SYMBOL_GPL(pcie_has_flr);
/** /**
* pcie_flr - initiate a PCIe function level reset * pcie_flr - initiate a PCIe function level reset
......
...@@ -1090,6 +1090,7 @@ u32 pcie_bandwidth_available(struct pci_dev *dev, struct pci_dev **limiting_dev, ...@@ -1090,6 +1090,7 @@ u32 pcie_bandwidth_available(struct pci_dev *dev, struct pci_dev **limiting_dev,
enum pci_bus_speed *speed, enum pci_bus_speed *speed,
enum pcie_link_width *width); enum pcie_link_width *width);
void pcie_print_link_status(struct pci_dev *dev); void pcie_print_link_status(struct pci_dev *dev);
bool pcie_has_flr(struct pci_dev *dev);
int pcie_flr(struct pci_dev *dev); int pcie_flr(struct pci_dev *dev);
int __pci_reset_function_locked(struct pci_dev *dev); int __pci_reset_function_locked(struct pci_dev *dev);
int pci_reset_function(struct pci_dev *dev); int pci_reset_function(struct pci_dev *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment