From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754223AbaIHN5e (ORCPT ); Mon, 8 Sep 2014 09:57:34 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:53646 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753977AbaIHN4Z (ORCPT ); Mon, 8 Sep 2014 09:56:25 -0400 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 v10 09/10] PCI: Assign unassigned bus resources in pci_scan_root_bus() Date: Mon, 8 Sep 2014 14:54:31 +0100 Message-Id: <1410184472-17630-10-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1410184472-17630-1-git-send-email-Liviu.Dudau@arm.com> References: <1410184472-17630-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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; } -- 2.0.4