linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] MIPS: PCI: add controllers before the specified head
@ 2017-03-26 17:05 Mathias Kresin
  2017-03-27  9:21 ` Sergei Shtylyov
  2017-03-27 13:10 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Mathias Kresin @ 2017-03-26 17:05 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips

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 <dev@kresin.me>

---

Changes in v3:
- fix the list order instead of adjusting the controller scan order
- update commit message accordingly

Changes in v2:
- fix formal issues in commit message (Sergei Shtylyov)

 arch/mips/pci/pci-legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-27 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 17:05 [PATCH v3] MIPS: PCI: add controllers before the specified head Mathias Kresin
2017-03-27  9:21 ` Sergei Shtylyov
2017-03-27 13:10 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).