Skip to content

Commit

Permalink
MIPS: PCI: add controllers before the specified head
Browse files Browse the repository at this point in the history
With commit 23dac14 ("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: 23dac14 ("MIPS: PCI: Use struct list_head lists")
Signed-off-by: Mathias Kresin <dev@kresin.me>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15808/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
mkresin authored and ralfbaechle committed Apr 12, 2017
1 parent 162b270 commit edb0b6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/pci/pci-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit edb0b6a

Please sign in to comment.