* [PATCH] powerpc/powernv: Fix early pci_controller_ops loading.
@ 2015-04-27 1:54 Daniel Axtens
2015-04-27 2:02 ` Gavin Shan
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Axtens @ 2015-04-27 1:54 UTC (permalink / raw)
To: linuxppc-dev, Gavin Shan; +Cc: Daniel Axtens
Load the PowerNV platform pci controller ops into pci controllers
after all the operations are loaded into the platform ops struct, not
before.
Fixes: c88c2a188905cb3077c3c38dc498e7e9f8eebeee
Reported-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 920c252..f8bc950 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -2693,7 +2693,6 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
hose->last_busno = 0xff;
}
hose->private_data = phb;
- hose->controller_ops = pnv_pci_controller_ops;
phb->hub_id = hub_id;
phb->opal_id = phb_id;
phb->type = ioda_type;
@@ -2812,6 +2811,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
pnv_pci_controller_ops.enable_device_hook = pnv_pci_enable_device_hook;
pnv_pci_controller_ops.window_alignment = pnv_pci_window_alignment;
pnv_pci_controller_ops.reset_secondary_bus = pnv_pci_reset_secondary_bus;
+ hose->controller_ops = pnv_pci_controller_ops;
#ifdef CONFIG_PCI_IOV
ppc_md.pcibios_fixup_sriov = pnv_pci_ioda_fixup_iov_resources;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/powernv: Fix early pci_controller_ops loading.
2015-04-27 1:54 [PATCH] powerpc/powernv: Fix early pci_controller_ops loading Daniel Axtens
@ 2015-04-27 2:02 ` Gavin Shan
2015-04-27 2:35 ` Daniel Axtens
0 siblings, 1 reply; 3+ messages in thread
From: Gavin Shan @ 2015-04-27 2:02 UTC (permalink / raw)
To: Daniel Axtens; +Cc: linuxppc-dev, Gavin Shan
On Mon, Apr 27, 2015 at 11:54:26AM +1000, Daniel Axtens wrote:
>Load the PowerNV platform pci controller ops into pci controllers
>after all the operations are loaded into the platform ops struct, not
>before.
>
>Fixes: c88c2a188905cb3077c3c38dc498e7e9f8eebeee
I think it would fix commit 65ebf4b63 ("powerpc/powernv: Move controller ops from ppc_md to controller_ops")
If that's the case, the above line could be replaced with:
Fixes: 65ebf4b63 ("powerpc/powernv: Move controller ops from ppc_md to controller_ops")
>Reported-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>Signed-off-by: Daniel Axtens <dja@axtens.net>
The changes look good to me.
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Thanks,
Gavin
>---
> arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
>index 920c252..f8bc950 100644
>--- a/arch/powerpc/platforms/powernv/pci-ioda.c
>+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
>@@ -2693,7 +2693,6 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
> hose->last_busno = 0xff;
> }
> hose->private_data = phb;
>- hose->controller_ops = pnv_pci_controller_ops;
> phb->hub_id = hub_id;
> phb->opal_id = phb_id;
> phb->type = ioda_type;
>@@ -2812,6 +2811,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
> pnv_pci_controller_ops.enable_device_hook = pnv_pci_enable_device_hook;
> pnv_pci_controller_ops.window_alignment = pnv_pci_window_alignment;
> pnv_pci_controller_ops.reset_secondary_bus = pnv_pci_reset_secondary_bus;
>+ hose->controller_ops = pnv_pci_controller_ops;
>
> #ifdef CONFIG_PCI_IOV
> ppc_md.pcibios_fixup_sriov = pnv_pci_ioda_fixup_iov_resources;
>--
>2.1.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/powernv: Fix early pci_controller_ops loading.
2015-04-27 2:02 ` Gavin Shan
@ 2015-04-27 2:35 ` Daniel Axtens
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Axtens @ 2015-04-27 2:35 UTC (permalink / raw)
To: Gavin Shan; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
> >Fixes: c88c2a188905cb3077c3c38dc498e7e9f8eebeee
>
> I think it would fix commit 65ebf4b63 ("powerpc/powernv: Move controller ops from ppc_md to controller_ops")
> If that's the case, the above line could be replaced with:
>
> Fixes: 65ebf4b63 ("powerpc/powernv: Move controller ops from ppc_md to controller_ops")
>
> >Reported-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> >Signed-off-by: Daniel Axtens <dja@axtens.net>
>
> The changes look good to me.
>
> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>
You are right again! I have sent v2 with the correct Fixes: line.
Thanks for the review.
Daniel
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 860 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-27 2:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 1:54 [PATCH] powerpc/powernv: Fix early pci_controller_ops loading Daniel Axtens
2015-04-27 2:02 ` Gavin Shan
2015-04-27 2:35 ` Daniel Axtens
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).