From: Greg Kroah-Hartman Date: Mon, 5 Dec 2016 13:06:35 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.8.13~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55c89e408574cb58cd9bc83eedaefb8b218401b0;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: pci-export-pcie_find_root_port.patch --- diff --git a/queue-4.4/pci-export-pcie_find_root_port.patch b/queue-4.4/pci-export-pcie_find_root_port.patch new file mode 100644 index 00000000000..34f0187575b --- /dev/null +++ b/queue-4.4/pci-export-pcie_find_root_port.patch @@ -0,0 +1,67 @@ +From e784930bd645e7df78c66e7872fec282b0620075 Mon Sep 17 00:00:00 2001 +From: Johannes Thumshirn +Date: Wed, 2 Nov 2016 16:35:51 -0600 +Subject: PCI: Export pcie_find_root_port + +From: Johannes Thumshirn + +commit e784930bd645e7df78c66e7872fec282b0620075 upstream. + +Export pcie_find_root_port() so we can use it outside of PCIe-AER error +injection. + +Signed-off-by: Johannes Thumshirn +Signed-off-by: Bjorn Helgaas +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -283,20 +283,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 +@@ -1802,6 +1802,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, diff --git a/queue-4.4/series b/queue-4.4/series index 89252c5eaaa..76e7b50121b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -4,5 +4,6 @@ kasan-update-kasan_global-for-gcc-7.patch x86-traps-ignore-high-word-of-regs-cs-in-early_fixup_exception.patch alsa-pcm-call-kill_fasync-in-stream-lock.patch rcu-fix-soft-lockup-for-rcu_nocb_kthread.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