From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sdcmail02.amcc.com (sdcmail02.amcc.com [198.137.200.90]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "Messaging Gateway Appliance Demo Cert", Issuer "Messaging Gateway Appliance Demo Cert" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A39BCB7C67 for ; Wed, 31 Mar 2010 09:03:21 +1100 (EST) Message-ID: <0A09B731-3A34-4144-BCA3-25FDFB9DB466@amcc.com> From: "Feng Kan" To: "Benjamin Herrenschmidt" In-Reply-To: <1269983680.7101.53.camel@pasglop> Content-Type: text/plain; format=flowed; delsp=yes; charset="us-ascii" Subject: Re: [PATCH] fix the problem where pcix node is probed again as pci node. MIME-Version: 1.0 (iPod Mail 7E18) Date: Tue, 30 Mar 2010 15:02:38 -0700 References: <1269970878-5080-1-git-send-email-fkan@amcc.com> <1269982097.7101.52.camel@pasglop> <1269983680.7101.53.camel@pasglop> Cc: linuxppc-dev@ozlabs.org, Tirumala R Marri , Feng Kan List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Ok thanks. This short string match may be useful in some cases, but I agree it plays havoc with the current code. Feng Kan On Mar 30, 2010, at 14:14, "Benjamin Herrenschmidt" wrote: > On Wed, 2010-03-31 at 07:48 +1100, Benjamin Herrenschmidt wrote: >> On Tue, 2010-03-30 at 10:41 -0700, Feng Kan wrote: >>> From: Feng Kan >>> >>> 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 ? > > Better if I CC him too :-) > > Cheers, > Ben. > >> Cheers, >> Ben. >> >> >>> Signed-off-by: Feng Kan >>> Signed-off-by: Tirumala R Marri >>> --- >>> 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; >>> } >> >> >> _______________________________________________ >> Linuxppc-dev mailing list >> Linuxppc-dev@lists.ozlabs.org >> https://lists.ozlabs.org/listinfo/linuxppc-dev > >