summaryrefslogtreecommitdiff
path: root/target/linux/generic/pending-4.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/pending-4.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch')
-rw-r--r--target/linux/generic/pending-4.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/generic/pending-4.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch b/target/linux/generic/pending-4.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch
new file mode 100644
index 0000000..3eed80e
--- /dev/null
+++ b/target/linux/generic/pending-4.9/170-MIPS-PCI-add-controllers-before-the-specified-head.patch
@@ -0,0 +1,30 @@
+From: Mathias Kresin <dev@kresin.me>
+Subject: MIPS: PCI: add controllers before the specified head
+
+With commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") new
+controllers are added after the specified head where they were added
+before the specified head previously.
+
+Use list_add_tail to restore the former order.
+
+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
+@@ -190,7 +190,7 @@ void register_pci_controller(struct pci_
+ }
+
+ INIT_LIST_HEAD(&hose->list);
+- list_add(&hose->list, &controllers);
++ list_add_tail(&hose->list, &controllers);
+
+ /*
+ * Do not panic here but later - this might happen before console init.