Skip to contentSkip to conversation

MIPS: PCI: scan PCI controllers in reverse order

PATCH Superseded Mathias Kresin 2 participants 2 messages Mar 15, 2017 MIPS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: PCI: scan PCI controllers in reverse order

Commit 23dac14d05 "MIPS: PCI: Use struct list_head lists" changed the controller list from reverse to straight order without taking care of the changed order for the scan of the recorded PCI controllers.

Traverse the list in reverse order to restore the former behaviour.

This patches fixes the following PCI error on lantiq:

pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)

Fixes 23dac14d05 ("MIPS: PCI: Use struct list_head lists")
---
 arch/mips/pci/pci-legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/pci/pci-legacy.c +1 -1
index 014649b..76a7ccc 100644
@@ -222,7 +222,7 @@ static int __init pcibios_init(void)
 	struct pci_controller *hose;
 
 	/* Scan all of the recorded PCI controllers.  */
-	list_for_each_entry(hose, &controllers, list)
+	list_for_each_entry_reverse(hose, &controllers, list)
 		pcibios_scanbus(hose);
 
 	pci_fixup_irqs(pci_common_swizzle, pcibios_map_irq);
Signature · 1 line
2.7.4
#1 lore raw

Hello!

Quoted 1 line · Mathias Kresin

Commit 23dac14d05 "MIPS: PCI: Use struct list_head lists" changed the

Need 12 digits and () around "<summary>".

Quoted 10 lines

controller list from reverse to straight order without taking care of the changed order for the scan of the recorded PCI controllers.

Traverse the list in reverse order to restore the former behaviour.

This patches fixes the following PCI error on lantiq:

pci 0000:01:00.0: BAR 0: error updating (0x1c000004 != 0x000000)

Fixes 23dac14d05 ("MIPS: PCI: Use struct list_head lists")

Need 12 digits.

Quoted 1 line

[...]

MBR, Sergei