]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2016 12:54:21 +0000 (13:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2016 12:54:21 +0000 (13:54 +0100)
added patches:
pci-export-pcie_find_root_port.patch

queue-4.8/pci-export-pcie_find_root_port.patch [new file with mode: 0644]
queue-4.8/series

diff --git a/queue-4.8/pci-export-pcie_find_root_port.patch b/queue-4.8/pci-export-pcie_find_root_port.patch
new file mode 100644 (file)
index 0000000..9a5f6a5
--- /dev/null
@@ -0,0 +1,67 @@
+From e784930bd645e7df78c66e7872fec282b0620075 Mon Sep 17 00:00:00 2001
+From: Johannes Thumshirn <jthumshirn@suse.de>
+Date: Wed, 2 Nov 2016 16:35:51 -0600
+Subject: PCI: Export pcie_find_root_port
+
+From: Johannes Thumshirn <jthumshirn@suse.de>
+
+commit e784930bd645e7df78c66e7872fec282b0620075 upstream.
+
+Export pcie_find_root_port() so we can use it outside of PCIe-AER error
+injection.
+
+Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pci/pcie/aer/aer_inject.c |   14 --------------
+ include/linux/pci.h               |   14 ++++++++++++++
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+--- a/drivers/pci/pcie/aer/aer_inject.c
++++ b/drivers/pci/pcie/aer/aer_inject.c
+@@ -307,20 +307,6 @@ out:
+       return 0;
+ }
+-static struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
+-{
+-      while (1) {
+-              if (!pci_is_pcie(dev))
+-                      break;
+-              if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
+-                      return dev;
+-              if (!dev->bus->self)
+-                      break;
+-              dev = dev->bus->self;
+-      }
+-      return NULL;
+-}
+-
+ static int find_aer_device_iter(struct device *device, void *data)
+ {
+       struct pcie_device **result = data;
+--- a/include/linux/pci.h
++++ b/include/linux/pci.h
+@@ -1896,6 +1896,20 @@ static inline int pci_pcie_type(const st
+       return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
+ }
++static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
++{
++      while (1) {
++              if (!pci_is_pcie(dev))
++                      break;
++              if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
++                      return dev;
++              if (!dev->bus->self)
++                      break;
++              dev = dev->bus->self;
++      }
++      return NULL;
++}
++
+ void pci_request_acs(void);
+ bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags);
+ bool pci_acs_path_enabled(struct pci_dev *start,
index 711d4b2b0ad32dbb2a0d28b02b7a5b2686feffb8..09a46d959adc8907f3cb2f5441deae754d623459 100644 (file)
@@ -13,6 +13,7 @@ input-change-key_data-from-0x275-to-0x277.patch
 input-psmouse-disable-automatic-probing-of-byd-touchpads.patch
 rcu-fix-soft-lockup-for-rcu_nocb_kthread.patch
 mm-workingset-fix-null-ptr-in-count_shadow_nodes.patch
+pci-export-pcie_find_root_port.patch
 pci-set-read-completion-boundary-to-128-iff-root-port-supports-it-_hpx.patch
 mwifiex-printk-overflow-with-32-byte-ssids.patch
 kvm-arm-arm64-vgic-don-t-notify-eoi-for-non-spis.patch