mpc8568e-mds: pci-e is broken

Anton Vorontsov avorontsov at ru.mvista.com
Fri Jan 25 01:00:12 EST 2008


On Wed, Jan 23, 2008 at 05:02:10PM -0600, Kumar Gala wrote:
> Anton,
> 
> Can you try this patch and see if it resolves the issue for you.. (You'll
> still get the Apple FW messages)

Yup, that patch fixes it.

Thanks,

> - k
> 
> diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
> index 4005739..bf13c21 100644
> --- a/arch/powerpc/sysdev/fsl_pci.c
> +++ b/arch/powerpc/sysdev/fsl_pci.c
> @@ -133,22 +133,23 @@ void fsl_pcibios_fixup_bus(struct pci_bus *bus)
>  	struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
>  	int i;
> 
> -	/* deal with bogus pci_bus when we don't have anything connected on PCIe */
> -	if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
> -		if (bus->parent) {
> -			for (i = 0; i < 4; ++i)
> -				bus->resource[i] = bus->parent->resource[i];
> -		}
> -	}
> -
> -	if (fsl_pcie_bus_fixup &&
> -	    (bus->parent == hose->bus) &&
> -	     early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
> +	if ((bus->parent == hose->bus) &&
> +	    ((fsl_pcie_bus_fixup &&
> +	      early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
> +	     (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
> +	{
>  		for (i = 0; i < 4; ++i) {
> -			if (bus->resource[i] && bus->parent->resource[i]) {
> -				bus->resource[i]->start = bus->parent->resource[i]->start;
> -				bus->resource[i]->end = bus->parent->resource[i]->end;
> -				bus->resource[i]->flags = bus->parent->resource[i]->flags;
> +			struct resource *res = bus->resource[i];
> +			struct resource *par = bus->parent->resource[i];
> +			if (res) {
> +				res->start = 0;
> +				res->end   = 0;
> +				res->flags = 0;
> +			}
> +			if (res && par) {
> +				res->start = par->start;
> +				res->end   = par->end;
> +				res->flags = par->flags;
>  			}
>  		}
>  	}
> 

-- 
Anton Vorontsov
email: cbou at mail.ru
backup email: ya-cbou at yandex.ru
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list