Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932667Ab0BCXjW (ORCPT ); Wed, 3 Feb 2010 18:39:22 -0500 Received: from g4t0014.houston.hp.com ([15.201.24.17]:7293 "EHLO g4t0014.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932171Ab0BCXjR (ORCPT ); Wed, 3 Feb 2010 18:39:17 -0500 Subject: [PATCH v1 4/7] PCI: read bridge windows before filling in subtractive decode resources To: Jesse Barnes From: Bjorn Helgaas Cc: Matthew Garrett , Tony Luck , linux-pci@vger.kernel.org, Peter Haight , Gary Hade , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu , Ingo Molnar , Linus Torvalds , Larry Finger Date: Wed, 03 Feb 2010 16:39:16 -0700 Message-ID: <20100203233916.10803.19478.stgit@bob.kio> In-Reply-To: <20100203233617.10803.92102.stgit@bob.kio> References: <20100203233617.10803.92102.stgit@bob.kio> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 48 No functional change; this fills in the bus subtractive decode resources after reading the bridge window information rather than before. Also, print out the subtractive decode resources as we already do for the positive decode windows. Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 1d498cd..fbff005 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -391,14 +391,19 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) child->secondary, child->subordinate, dev->transparent ? " (subtractive decode)": ""); - if (dev->transparent) { - for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++) - child->resource[i] = child->parent->resource[i - 3]; - } - pci_read_bridge_io(child); pci_read_bridge_mmio(child); pci_read_bridge_mmio_pref(child); + + if (dev->transparent) { + for (i = 3; i < PCI_BUS_NUM_RESOURCES; i++) { + child->resource[i] = child->parent->resource[i - 3]; + if (child->resource[i]) + dev_printk(KERN_DEBUG, &dev->dev, + " bridge window %pR (subtractive decode)\n", + child->resource[i]); + } + } } static struct pci_bus * pci_alloc_bus(void) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/