Subject: Re: [RFC/PATCH] pci: Workaround invalid P2P bridge bus numbers

From: Jesse Barnes <[email-masked]>
Date: Mon, 20 Oct 2008 16:17:49 -0700

On Monday, October 20, 2008 4:06 pm Benjamin Herrenschmidt wrote:
> Some firmware fail to properly configure P2P bridges, leaving them
> with invalid bus numbers. In some cases, this happens on some embedded
> 4xx boards as the result of the kernel allocating different bus space
> than the firmware does to host bridges while not setting
> pcibios_assign_all_busses() for various reasons. In other cases, it can
> just be bogus firmware.
>
> This adds some sanity checking to the PCI probing code. If a bridge is
> found whose primary bus number doesn't match the bus it's sitting on,
> or whose secondary bus number not strictly above it's primary bus
> number, then the bridge bus numbers are deconfigured in the first pass
> of pci_scan_bridge() to be re-assigned in the second pass.
>
> Signed-off-by: Benjamin Herrenschmidt <[email-masked]>
> ---
>
> Ayman, can you double check that this variant of the patch still
> fixes your problem ? Thanks !

Sure, seems straightforward enough, I'll wait for Ayman's "Tested-by" before 
pushing.

Thanks,
Jesse