linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: PCI: scan PCI controllers in reverse order
@ 2017-03-15  8:03 Mathias Kresin
  2017-03-15  9:04 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Mathias Kresin @ 2017-03-15  8:03 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips

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")
Signed-off-by: Mathias Kresin <dev@kresin.me>
---
 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..76a7ccc 100644
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
@@ -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);
-- 
2.7.4

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

* Re: [PATCH] MIPS: PCI: scan PCI controllers in reverse order
  2017-03-15  8:03 [PATCH] MIPS: PCI: scan PCI controllers in reverse order Mathias Kresin
@ 2017-03-15  9:04 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2017-03-15  9:04 UTC (permalink / raw)
  To: Mathias Kresin, ralf; +Cc: linux-mips

Hello!

On 3/15/2017 11:03 AM, Mathias Kresin wrote:

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

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

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

> Signed-off-by: Mathias Kresin <dev@kresin.me>
[...]

MBR, Sergei

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

end of thread, other threads:[~2017-03-15  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15  8:03 [PATCH] MIPS: PCI: scan PCI controllers in reverse order Mathias Kresin
2017-03-15  9:04 ` Sergei Shtylyov

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