From: Mathias Kresin Date: Sun, 26 Mar 2017 17:05:36 +0000 (+0200) Subject: MIPS: PCI: add controllers before the specified head X-Git-Tag: v4.14-rc1~1091^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=edb0b6a0b4490014924d56c4c7117c7c8fc608ca;p=platform%2Fkernel%2Flinux-rpi.git 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 where 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 Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15808/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index 014649b..3a84f6c 100644 --- a/arch/mips/pci/pci-legacy.c +++ b/arch/mips/pci/pci-legacy.c @@ -190,7 +190,7 @@ void register_pci_controller(struct pci_controller *hose) } 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.