aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-03-17 07:29:16 +0100
committerMathias Kresin <dev@kresin.me>2017-03-24 08:09:39 +0100
commit2f8d086baa83dd36859fc4af83e5c8db885fd850 (patch)
treea848d155ab20142e05ca117916bfef1fbb04767f /target
parentfce21ae4ccfcee0c28fb18f5507e145fb0b02dec (diff)
downloadupstream-2f8d086baa83dd36859fc4af83e5c8db885fd850.tar.gz
upstream-2f8d086baa83dd36859fc4af83e5c8db885fd850.tar.bz2
upstream-2f8d086baa83dd36859fc4af83e5c8db885fd850.zip
kernel: add MIPS pci fix send upstream
Upstream commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") changed the controller list from reverse to straight order without taking care of the changed order for the scan of the recorded PCI controllers. Traverse the list in reverse order to restore the former behaviour. This patches fixes the following PCI error on lantiq: pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000) Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/patches-4.9/170-MIPS-PCI-scan-PCI-controllers-in-reverse-order.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.9/170-MIPS-PCI-scan-PCI-controllers-in-reverse-order.patch b/target/linux/generic/patches-4.9/170-MIPS-PCI-scan-PCI-controllers-in-reverse-order.patch
new file mode 100644
index 0000000000..74b54e93aa
--- /dev/null
+++ b/target/linux/generic/patches-4.9/170-MIPS-PCI-scan-PCI-controllers-in-reverse-order.patch
@@ -0,0 +1,31 @@
+From: Mathias Kresin <dev@kresin.me>
+Date: Tue, 14 Mar 2017 22:12:12 +0100
+Subject: [PATCH v2] MIPS: PCI: scan PCI controllers in reverse order
+
+Commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") changed
+the controller list from reverse to straight order without taking care
+of the changed order for the scan of the recorded PCI controllers.
+
+Traverse the list in reverse order to restore the former behaviour.
+
+This patches fixes the following PCI error on lantiq:
+
+ pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)
+
+Fixes: 23dac14d058f ("MIPS: PCI: Use struct list_head lists")
+Signed-off-by: Mathias Kresin <dev@kresin.me>
+---
+ arch/mips/pci/pci-legacy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/pci/pci-legacy.c
++++ b/arch/mips/pci/pci-legacy.c
+@@ -222,7 +222,7 @@ static int __init pcibios_init(void)
+ struct pci_controller *hose;
+
+ /* Scan all of the recorded PCI controllers. */
+- list_for_each_entry(hose, &controllers, list)
++ list_for_each_entry_reverse(hose, &controllers, list)
+ pcibios_scanbus(hose);
+
+ pci_fixup_irqs(pci_common_swizzle, pcibios_map_irq);