From: Ram Pai <linuxram@us.ibm.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>, VL <vl.homutov@gmail.com>,
linux-pci@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] PCI: Check bridge secondary/subordinate bus register
Date: Tue, 11 Sep 2012 11:03:10 +0800 [thread overview]
Message-ID: <20120911030310.GA2424@ram-ThinkPad-T61> (raw)
In-Reply-To: <1347322773-32283-1-git-send-email-yinghai@kernel.org>
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 <vl.homutov@gmail.com>
> Tested-by: VL <vl.homutov@gmail.com>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: stable@vger.kernel.org
>
> 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
next prev parent reply other threads:[~2012-09-11 3:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 0:19 [PATCH] PCI: Check bridge secondary/subordinate bus register Yinghai Lu
2012-09-11 3:03 ` Ram Pai [this message]
2012-09-18 22:54 ` Bjorn Helgaas
2012-09-18 23:55 ` Yinghai Lu
2012-09-19 13:56 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120911030310.GA2424@ram-ThinkPad-T61 \
--to=linuxram@us.ibm.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vl.homutov@gmail.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox