From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liviu Dudau Subject: [PATCH v13 10/12] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Mon, 29 Sep 2014 15:29:29 +0100 Message-ID: <1412000971-9242-11-git-send-email-Liviu.Dudau@arm.com> References: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> Return-path: In-Reply-To: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-pci-owner@vger.kernel.org To: Bjorn Helgaas , Arnd Bergmann , Rob Herring , Jason Gunthorpe , Benjamin Herrenschmidt , Catalin Marinas , Will Deacon , Russell King , linux-pci , Linus Walleij Cc: Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit , linux-arch , LKML , Device Tree ML , LAKML , Yinghai Lu , Jiang Liu List-Id: devicetree@vger.kernel.org If the firmware has not assigned all the bus resources and we are not just probing the PCI buses, it makes sense to assign the unassigned resources in pci_scan_root_bus(). Signed-off-by: Liviu Dudau Signed-off-by: Bjorn Helgaas CC: Arnd Bergmann CC: Jason Gunthorpe CC: Rob Herring --- drivers/pci/probe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 636d1c9..d2ebd49 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1951,6 +1951,9 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, if (!found) pci_bus_update_busn_res_end(b, max); + if (!pci_has_flag(PCI_PROBE_ONLY)) + pci_assign_unassigned_bus_resources(b); + pci_bus_add_devices(b); return b; } -- 2.1.1