From patchwork Tue Sep 23 19:01:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "liviu.dudau@arm.com" X-Patchwork-Id: 392655 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 801B41400B2 for ; Wed, 24 Sep 2014 05:59:03 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbaIWT6r (ORCPT ); Tue, 23 Sep 2014 15:58:47 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:53963 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751307AbaIWT6q (ORCPT ); Tue, 23 Sep 2014 15:58:46 -0400 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.53]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s8NJ1Eh7027659; Tue, 23 Sep 2014 20:01:25 +0100 From: Liviu Dudau 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 Subject: [PATCH v12 10/12] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Tue, 23 Sep 2014 20:01:12 +0100 Message-Id: <1411498874-9864-11-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411498874-9864-1-git-send-email-Liviu.Dudau@arm.com> References: <1411498874-9864-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org If the firmware has not assigned all the bus resources and we are not just probing the PCIe busses, it makes sense to assign the unassigned resources in pci_scan_root_bus(). Cc: Bjorn Helgaas Cc: Arnd Bergmann Cc: Jason Gunthorpe Cc: Rob Herring Signed-off-by: Liviu Dudau --- drivers/pci/probe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index ef891d2..508cf61 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1953,6 +1953,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; }