Skip to content
Snippets Groups Projects
Verified Commit 81b439cc authored by Josef Schlehofer's avatar Josef Schlehofer
Browse files

patches/openwrt: mpc85xx: drop hack for PCI domain number

This was fixed properly in Linux kernel and it was backported to 5.4.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/powerpc/kernel/pci-common.c?h=v5.4.217&id=3ec50b8a0128359ff4ad4061a75c3322d0ab6ac9
parent 35b80ce1
Branches
Tags
No related merge requests found
From cf9dab46390aaee2ca9fb0b12182f91aa668258d Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
Date: Tue, 3 May 2022 16:43:29 +0200
Subject: [PATCH] linux/mpc85xx: add patch to fix PCI domain number
---
...roduce-hack-to-fix-PCI-domain-number.patch | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 target/linux/mpc85xx/patches-5.4/901-pci-common-introduce-hack-to-fix-PCI-domain-number.patch
diff --git a/target/linux/mpc85xx/patches-5.4/901-pci-common-introduce-hack-to-fix-PCI-domain-number.patch b/target/linux/mpc85xx/patches-5.4/901-pci-common-introduce-hack-to-fix-PCI-domain-number.patch
new file mode 100644
index 0000000000..5cf715b2b8
--- /dev/null
+++ b/target/linux/mpc85xx/patches-5.4/901-pci-common-introduce-hack-to-fix-PCI-domain-number.patch
@@ -0,0 +1,40 @@
+From 055e4b64cb160e6482e99dbdcd022e7284c70ba9 Mon Sep 17 00:00:00 2001
+From: Josef Schlehofer <pepe.schlehofer@gmail.com>
+Date: Tue, 3 May 2022 16:42:14 +0200
+Subject: [PATCH] pci-common: introduce hack to fix PCI domain number
+
+---
+ arch/powerpc/kernel/pci-common.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
+index a2c258a8d736..f2e8240c1eb1 100644
+--- a/arch/powerpc/kernel/pci-common.c
++++ b/arch/powerpc/kernel/pci-common.c
+@@ -73,7 +73,9 @@ void set_pci_dma_ops(const struct dma_map_ops *dma_ops)
+ static int get_phb_number(struct device_node *dn)
+ {
+ int ret, phb_id = -1;
++#if 0
+ u32 prop_32;
++#endif
+ u64 prop;
+
+ /*
+@@ -82,11 +84,12 @@ static int get_phb_number(struct device_node *dn)
+ * reading "ibm,opal-phbid", only present in OPAL environment.
+ */
+ ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
++#if 0
+ if (ret) {
+ ret = of_property_read_u32_index(dn, "reg", 1, &prop_32);
+ prop = prop_32;
+ }
+-
++#endif
+ if (!ret)
+ phb_id = (int)(prop & (MAX_PHBS - 1));
+
+--
+2.34.1
+
--
2.34.1
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