aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-01-19 20:58:48 +0000
committerRafał Miłecki <zajec5@gmail.com>2016-01-19 20:58:48 +0000
commit1dfa369c98075302400f46cd2b410d32a5ef68d6 (patch)
tree30bb288628a36c2469bfedec94161e0e63258b27 /target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch
parent82939c3f52acd089370de17a4f8e07d453b0bf13 (diff)
downloadupstream-1dfa369c98075302400f46cd2b410d32a5ef68d6.tar.gz
upstream-1dfa369c98075302400f46cd2b410d32a5ef68d6.tar.bz2
upstream-1dfa369c98075302400f46cd2b410d32a5ef68d6.zip
bcm53xx: group iProc patches into patchsets they were sent in
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48368
Diffstat (limited to 'target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch')
-rw-r--r--target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch b/target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch
new file mode 100644
index 0000000000..09d82263a9
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.1/031-0001-PCI-iproc-Directly-add-PCI-resources.patch
@@ -0,0 +1,90 @@
+From 18c4342aa56d70176eea85021e6fe8f6f8f39c7b Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 24 May 2015 22:37:02 +0200
+Subject: [PATCH 1/2] PCI: iproc: Directly add PCI resources
+
+The struct iproc_pcie.resources member was pointing to a stack variable and
+is invalid after the registration function returned.
+
+Remove this pointer and add a parameter to the function.
+
+Tested-by: Ray Jui <rjui@broadcom.com>
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Reviewed-by: Ray Jui <rjui@broadcom.com>
+---
+ drivers/pci/host/pcie-iproc-bcma.c | 4 +---
+ drivers/pci/host/pcie-iproc-platform.c | 4 +---
+ drivers/pci/host/pcie-iproc.c | 4 ++--
+ drivers/pci/host/pcie-iproc.h | 3 +--
+ 4 files changed, 5 insertions(+), 10 deletions(-)
+
+--- a/drivers/pci/host/pcie-iproc-bcma.c
++++ b/drivers/pci/host/pcie-iproc-bcma.c
+@@ -62,11 +62,9 @@ static int iproc_pcie_bcma_probe(struct
+ res_mem.flags = IORESOURCE_MEM;
+ pci_add_resource(&res, &res_mem);
+
+- pcie->resources = &res;
+-
+ pcie->map_irq = iproc_pcie_bcma_map_irq;
+
+- ret = iproc_pcie_setup(pcie);
++ ret = iproc_pcie_setup(pcie, &res);
+ if (ret) {
+ dev_err(pcie->dev, "PCIe controller setup failed\n");
+ return ret;
+--- a/drivers/pci/host/pcie-iproc-platform.c
++++ b/drivers/pci/host/pcie-iproc-platform.c
+@@ -69,11 +69,9 @@ static int iproc_pcie_pltfm_probe(struct
+ return ret;
+ }
+
+- pcie->resources = &res;
+-
+ pcie->map_irq = of_irq_parse_and_map_pci;
+
+- ret = iproc_pcie_setup(pcie);
++ ret = iproc_pcie_setup(pcie, &res);
+ if (ret) {
+ dev_err(pcie->dev, "PCIe controller setup failed\n");
+ return ret;
+--- a/drivers/pci/host/pcie-iproc.c
++++ b/drivers/pci/host/pcie-iproc.c
+@@ -183,7 +183,7 @@ static void iproc_pcie_enable(struct ipr
+ writel(SYS_RC_INTX_MASK, pcie->base + SYS_RC_INTX_EN);
+ }
+
+-int iproc_pcie_setup(struct iproc_pcie *pcie)
++int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
+ {
+ int ret;
+ struct pci_bus *bus;
+@@ -211,7 +211,7 @@ int iproc_pcie_setup(struct iproc_pcie *
+ pcie->sysdata.private_data = pcie;
+
+ bus = pci_create_root_bus(pcie->dev, 0, &iproc_pcie_ops,
+- &pcie->sysdata, pcie->resources);
++ &pcie->sysdata, res);
+ if (!bus) {
+ dev_err(pcie->dev, "unable to create PCI root bus\n");
+ ret = -ENOMEM;
+--- a/drivers/pci/host/pcie-iproc.h
++++ b/drivers/pci/host/pcie-iproc.h
+@@ -29,7 +29,6 @@
+ struct iproc_pcie {
+ struct device *dev;
+ void __iomem *base;
+- struct list_head *resources;
+ struct pci_sys_data sysdata;
+ struct pci_bus *root_bus;
+ struct phy *phy;
+@@ -37,7 +36,7 @@ struct iproc_pcie {
+ int (*map_irq)(const struct pci_dev *, u8, u8);
+ };
+
+-int iproc_pcie_setup(struct iproc_pcie *pcie);
++int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res);
+ int iproc_pcie_remove(struct iproc_pcie *pcie);
+
+ #endif /* _PCIE_IPROC_H */