All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] MIPS: PCI: add controllers before the specified head
@ 2017-03-26 17:05 Mathias Kresin
  2017-03-27  9:21 ` Sergei Shtylyov
  2017-03-27 13:10 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Mathias Kresin @ 2017-03-26 17:05 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips

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")
Signed-off-by: Mathias Kresin <dev@kresin.me>

---

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

diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c
index 014649b..3a84f6c 100644
--- a/arch/mips/pci/pci-legacy.c
+++ b/arch/mips/pci/pci-legacy.c
@@ -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.
-- 
2.7.4

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

* Re: [PATCH v3] MIPS: PCI: add controllers before the specified head
  2017-03-26 17:05 [PATCH v3] MIPS: PCI: add controllers before the specified head Mathias Kresin
@ 2017-03-27  9:21 ` Sergei Shtylyov
  2017-03-27 13:10 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2017-03-27  9:21 UTC (permalink / raw)
  To: Mathias Kresin, ralf; +Cc: linux-mips

Hello!

On 3/26/2017 8:05 PM, Mathias Kresin wrote:

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

> 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")
> Signed-off-by: Mathias Kresin <dev@kresin.me>

[...]

MBR, Sergei

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

* Re: [PATCH v3] MIPS: PCI: add controllers before the specified head
  2017-03-26 17:05 [PATCH v3] MIPS: PCI: add controllers before the specified head Mathias Kresin
  2017-03-27  9:21 ` Sergei Shtylyov
@ 2017-03-27 13:10 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2017-03-27 13:10 UTC (permalink / raw)
  To: Mathias Kresin; +Cc: linux-mips

On Sun, Mar 26, 2017 at 07:05:36PM +0200, Mathias Kresin wrote:

> 
> 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")
> Signed-off-by: Mathias Kresin <dev@kresin.me>

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

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

end of thread, other threads:[~2017-03-27 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 17:05 [PATCH v3] MIPS: PCI: add controllers before the specified head Mathias Kresin
2017-03-27  9:21 ` Sergei Shtylyov
2017-03-27 13:10 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.