170-MIPS-PCI-add-controllers-before-the-specified-head.patch 973 B

123456789101112131415161718192021222324252627282930
  1. From: Mathias Kresin <dev@kresin.me>
  2. Subject: MIPS: PCI: add controllers before the specified head
  3. With commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") new
  4. controllers are added after the specified head where they were added
  5. before the specified head previously.
  6. Use list_add_tail to restore the former order.
  7. This patches fixes the following PCI error on lantiq:
  8. pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)
  9. Fixes: 23dac14d058f ("MIPS: PCI: Use struct list_head lists")
  10. Signed-off-by: Mathias Kresin <dev@kresin.me>
  11. ---
  12. arch/mips/pci/pci-legacy.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. --- a/arch/mips/pci/pci-legacy.c
  15. +++ b/arch/mips/pci/pci-legacy.c
  16. @@ -190,7 +190,7 @@ void register_pci_controller(struct pci_
  17. }
  18. INIT_LIST_HEAD(&hose->list);
  19. - list_add(&hose->list, &controllers);
  20. + list_add_tail(&hose->list, &controllers);
  21. /*
  22. * Do not panic here but later - this might happen before console init.