powerpc/powernv: Fix early pci_controller_ops loading.
PATCH 1/1 powerpc/powernv: Fix early pci_controller_ops loading.
Load the PowerNV platform pci controller ops into pci controllers after all the operations are loaded into the platform ops struct, not before.
--- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/powernv/pci-ioda.c +1 -1
@@ -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;
Signature · 1 line
2.1.4
Quoted 5 lines · 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
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:
Quoted 2 lines
Reported-by Gavin Shan <[email protected]>Signed-off-by Daniel Axtens <[email protected]>
The changes look good to me.
Thanks,
Gavin
Quoted 27 lines
---
arch/powerpc/platforms/powernv/pci-ioda.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/platforms/powernv/pci-ioda.c +1
-1@@ -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;Signature · 1 line
2.1.4
Quoted 5 lines
Quoted 1 line
Fixes c88c2a188905cb3077c3c38dc498e7e9f8eebeeeI think it would fix commit
65ebf4b63("powerpc/powernv: Move controller ops fromppc_mdtocontroller_ops") If that's the case, the above line could be replaced with:
Quoted 9 lines
Fixes 65ebf4b63 ("powerpc/powernv: Move controller ops from ppc_md to controller_ops")Quoted 2 lines
Reported-by Gavin Shan <[email protected]>Signed-off-by Daniel Axtens <[email protected]>The changes look good to me.
Reviewed-by Gavin Shan <[email protected]>
You are right again! I have sent v2 with the correct Fixes: line.
Thanks for the review.
Daniel