summaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-04-14 16:10:54 -0600
committerBjorn Helgaas <bhelgaas@google.com>2014-05-23 10:47:20 -0600
commitd739a099d0248c78d374b1b610cdb679c7bc052d (patch)
tree38d4500d5783c4d8f2a905347e65eb995245706e /drivers/pci/probe.c
parent26370fc6647b63eefb85a675382d661d0fed30a1 (diff)
downloadblackbird-op-linux-d739a099d0248c78d374b1b610cdb679c7bc052d.tar.gz
blackbird-op-linux-d739a099d0248c78d374b1b610cdb679c7bc052d.zip
PCI: Don't add disabled subtractive decode bus resources
For a subtractive decode bridge, we previously added and printed all resources of the primary bus, even if they were not valid. In the example below, the bridge 00:1c.3 has no windows enabled, so there are no valid resources on bus 02. But since 02:00.0 is subtractive decode bridge, we add and print all those invalid resources, which don't really make sense: pci 0000:00:1c.3: PCI bridge to [bus 02-03] pci 0000:02:00.0: PCI bridge to [bus 03] (subtractive decode) pci 0000:02:00.0: bridge window [??? 0x00000000 flags 0x0] (subtractive decode) Add and print the subtractively-decoded resources only if they are valid. There's an example in the dmesg log attached to the bugzilla below (but this patch doesn't fix the bug reported there). Link: https://bugzilla.kernel.org/show_bug.cgi?id=73141 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 3bc149b848a8..966514010974 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -475,7 +475,7 @@ void pci_read_bridge_bases(struct pci_bus *child)
if (dev->transparent) {
pci_bus_for_each_resource(child->parent, res, i) {
- if (res) {
+ if (res && res->flags) {
pci_bus_add_resource(child, res,
PCI_SUBTRACTIVE_DECODE);
dev_printk(KERN_DEBUG, &dev->dev,
OpenPOWER on IntegriCloud