On Mar 14, 2013, at 4:43 AM, Rojhalat Ibrahim wrote: > On Wednesday 13 March 2013 14:07:16 Kumar Gala wrote: >> diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c >> index 41bbcc4..b18c377 100644 >> --- a/arch/powerpc/sysdev/fsl_pci.c >> +++ b/arch/powerpc/sysdev/fsl_pci.c >> @@ -74,6 +74,35 @@ static int __init fsl_pcie_check_link(struct >> pci_controller *hose) return 0; >> } >> >> +static int fsl_indirect_read_config(struct pci_bus *bus, unsigned int >> devfn, + int offset, int len, u32 *val) >> +{ >> + struct pci_controller *hose = pci_bus_to_host(bus); >> + >> + /* check the link status */ >> + if ((bus->number == hose->first_busno) && (devfn == 0)) { >> + if (fsl_pcie_check_link(hose)) >> + hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; >> + else >> + hose->indirect_type &= ~PPC_INDIRECT_TYPE_NO_PCIE_LINK; >> + } >> + return indirect_read_config(bus, devfn, offset, len, val); >> +} >> + > > This does not work because fsl_indirect_read_config calls fsl_pcie_check_link > which calls early_read_config_dword which eventually calls > fsl_indirect_read_config, so the kernel hangs in a recursion loop. Below is a > modified patch that does work.
ok, that makes sense, but I guess now its making me question the following statement: > if ((bus->number == hose->first_busno) && (devfn == 0)) { Why do we have this conditional? - k _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev