[PATCH] fix the problem where pcix node is probed again as pci node.
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Mar 31 07:48:17 EST 2010
On Tue, 2010-03-30 at 10:41 -0700, Feng Kan wrote:
> From: Feng Kan <fkan at appliedmicro.com>
>
> The current matching scheme make the pci node match to pcix or pciex node.
> To avoid the match, change the method so only one type of initialization
> is called per node.
No, your patch is not right. The problem was introduced by a patch from
Grant that incorrectly made of_device_is_compatible do a substring
match. Grant should have fixed that now. Grant ? Is your fix upstream
yet ? If not, can you send that ASAP ?
Cheers,
Ben.
> Signed-off-by: Feng Kan <fkan at appliedmicro.com>
> Signed-off-by: Tirumala R Marri <tmarri at appliedmicro.com>
> ---
> arch/powerpc/sysdev/ppc4xx_pci.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
> index 8aa3302..1e67c74 100644
> --- a/arch/powerpc/sysdev/ppc4xx_pci.c
> +++ b/arch/powerpc/sysdev/ppc4xx_pci.c
> @@ -1842,14 +1842,16 @@ static int __init ppc4xx_pci_find_bridges(void)
>
> ppc_pci_flags |= PPC_PCI_ENABLE_PROC_DOMAINS | PPC_PCI_COMPAT_DOMAIN_0;
>
> + for_each_compatible_node(np, NULL, "ibm,plb-pci") {
> + if (of_device_is_compatible(np, "ibm,plb-pcix"))
> + ppc4xx_probe_pcix_bridge(np);
> #ifdef CONFIG_PPC4xx_PCI_EXPRESS
> - for_each_compatible_node(np, NULL, "ibm,plb-pciex")
> - ppc4xx_probe_pciex_bridge(np);
> + else if (of_device_is_compatible(np, "ibm,plb-pciex"))
> + ppc4xx_probe_pciex_bridge(np);
> #endif
> - for_each_compatible_node(np, NULL, "ibm,plb-pcix")
> - ppc4xx_probe_pcix_bridge(np);
> - for_each_compatible_node(np, NULL, "ibm,plb-pci")
> - ppc4xx_probe_pci_bridge(np);
> + else
> + ppc4xx_probe_pci_bridge(np);
> + }
>
> return 0;
> }
More information about the Linuxppc-dev
mailing list