Skip to contentSkip to conversation

MIPS: PCI: add controllers before the specified head

PATCH In review Mathias Kresin 3 participants 3 messages Mar 26, 2017 – Mar 27, 2017 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 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")

---

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(-)
arch/mips/pci/pci-legacy.c +1 -1
index 014649b..3a84f6c 100644
@@ -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.
Signature · 1 line
2.7.4
#1 lore raw

Hello!

Quoted 2 lines · Mathias Kresin

With commit 23dac14d058f ("MIPS: PCI: Use struct list_head lists") new controllers are added after the specified head where they where added

s/where/were//

Quoted 10 lines

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")

[...]

MBR, Sergei

#2 lore raw
In reply to Mathias Kresin
Quoted 5 lines · Mathias Kresin

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.

Quoted 8 lines

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")

Thanks Mathias, will apply.

Had I replied earlier, I would have requested the change you did yourself in v3. It seems to me the more logic solution and also closer to the code before Paul's 23dac14d058f changed it.

I'm going to take care of Sergei's nit also, no need to resend.

Ralf