From patchwork Tue Feb 23 17:24:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 81512 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1NHPlqr029818 for ; Tue, 23 Feb 2010 17:25:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492Ab0BWRYc (ORCPT ); Tue, 23 Feb 2010 12:24:32 -0500 Received: from g1t0029.austin.hp.com ([15.216.28.36]:47307 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478Ab0BWRY1 (ORCPT ); Tue, 23 Feb 2010 12:24:27 -0500 Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g1t0029.austin.hp.com (Postfix) with ESMTP id 5B7A23821F; Tue, 23 Feb 2010 17:24:27 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g1t0039.austin.hp.com (Postfix) with ESMTP id 0C67D341BF; Tue, 23 Feb 2010 17:24:26 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 72764CF006F; Tue, 23 Feb 2010 10:24:26 -0700 (MST) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pcVYe7ShIYnE; Tue, 23 Feb 2010 10:24:26 -0700 (MST) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 56EABCF006D; Tue, 23 Feb 2010 10:24:26 -0700 (MST) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id 23B2F2617B; Tue, 23 Feb 2010 10:24:26 -0700 (MST) Subject: [PATCH v5 2/5] PCI: read bridge windows before filling in subtractive decode resources To: Jesse Barnes From: Bjorn Helgaas Cc: Matthew Garrett , Tony Luck , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, Peter Haight , Gary Hade , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, linux-am33-list@redhat.com, Yinghai Lu , Ingo Molnar , Linus Torvalds , Larry Finger Date: Tue, 23 Feb 2010 10:24:26 -0700 Message-ID: <20100223172426.17242.12429.stgit@bob.kio> In-Reply-To: <20100223172355.17242.55927.stgit@bob.kio> References: <20100223172355.17242.55927.stgit@bob.kio> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Feb 2010 17:25:48 +0000 (UTC) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 4b47b4b..70c4ed2 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -403,14 +403,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)