diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2013-07-31 02:53:26 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-07-31 03:30:20 -0400 |
commit | 81377c8d3563e7aec5c8baaaacacb48034f430a0 (patch) | |
tree | fe58387e3bea2c5b5656e2a81d9bfd558b2a3d83 /include/linux/pci.h | |
parent | 59da381ee2afc806f85becf3aa64ffc952355552 (diff) |
PCI: Add function to obtain minimum link width and speed
A PCI Express device can potentially report a link width and speed which it will
not properly fulfill due to being plugged into a slower link higher in the
chain. This function walks up the PCI bus chain and calculates the minimum link
width and speed of this entire chain. This can be useful to enable a device to
determine if it has enough bandwidth for optimum functionality.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index a0bf22d816cf..2edbee64aeba 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -934,6 +934,8 @@ int pcie_get_readrq(struct pci_dev *dev); | |||
934 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 934 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
935 | int pcie_get_mps(struct pci_dev *dev); | 935 | int pcie_get_mps(struct pci_dev *dev); |
936 | int pcie_set_mps(struct pci_dev *dev, int mps); | 936 | int pcie_set_mps(struct pci_dev *dev, int mps); |
937 | int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, | ||
938 | enum pcie_link_width *width); | ||
937 | int __pci_reset_function(struct pci_dev *dev); | 939 | int __pci_reset_function(struct pci_dev *dev); |
938 | int __pci_reset_function_locked(struct pci_dev *dev); | 940 | int __pci_reset_function_locked(struct pci_dev *dev); |
939 | int pci_reset_function(struct pci_dev *dev); | 941 | int pci_reset_function(struct pci_dev *dev); |