On Mon, Sep 10, 2012 at 05:19:33PM -0700, Yinghai Lu wrote:
> Intel DP43BF requires "pci=assign-busses" to discover some devices.
> 
> It turns out BIOS set the bridge 00:1e.0 bus register wrong.
> 
> Try to check that wrong range and reject so next pass could only assign
> bus for that bridge.
> 
>       https://bugzilla.kernel.org/show_bug.cgi?id=18412
> 
> Reported-by: VL <[email protected]>
> Tested-by: VL <[email protected]>
> Signed-off-by: Yinghai Lu <[email protected]>
> Cc: [email protected]
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 3cdba8b..a8f1bf6 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -729,7 +729,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct 
> pci_dev *dev, int max,
> 
>       /* Check if setup is sensible at all */
>       if (!pass &&
> -         (primary != bus->number || secondary <= bus->number)) {
> +         (primary != bus->number || secondary <= bus->number ||
> +          secondary > subordinate)) {
>               dev_dbg(&dev->dev, "bus configuration invalid, 
> reconfiguring\n");
>               broken = 1;
>       }

Adding a unlikely() around the condition may help?

RP

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to