Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: VL <vl.homutov@gmail.com>,
	linux-pci@vger.kernel.org, Yinghai Lu <yinghai@kernel.org>,
	stable@vger.kernel.org
Subject: [PATCH] PCI: Check bridge secondary/subordinate bus register
Date: Mon, 10 Sep 2012 17:19:33 -0700	[thread overview]
Message-ID: <1347322773-32283-1-git-send-email-yinghai@kernel.org> (raw)

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;
 	}

             reply	other threads:[~2012-09-11  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  0:19 Yinghai Lu [this message]
2012-09-11  3:03 ` [PATCH] PCI: Check bridge secondary/subordinate bus register Ram Pai
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=1347322773-32283-1-git-send-email-yinghai@kernel.org \
    --to=yinghai@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vl.homutov@gmail.com \
    /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