From patchwork Mon Sep 8 13:54:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 36984 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8A49220491 for ; Mon, 8 Sep 2014 13:57:40 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id bj1sf524044pad.7 for ; Mon, 08 Sep 2014 06:57:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=AQC2jfEjx5Y1kIKGM+xYZ5Q7ZvZT+CSLFXJ5Fx/QA2s=; b=ShLhmiyR7KE3+Om0mvUY+wmn0CXqPxcCQM/wXIGeYJbRpyRGqd0QgZj/vdpqLVu1IS donQV/JdfOPp2jNtUDGtjj4OszLqVv634WMIMsDc6Tn/ygZ543mFWFjbDCzIgZx3Mgj6 csXeZvsXM+C2+d7H9MafoZp4lYFtEYNCUZjP+EVT4AFsTRcJiOw58F26NIdZw22n75w4 1Dsy1/PMuYjKsM1kM0sGu8IoWOFPYW02ItUMw4HzgYTvhszyOaxpsXIKLtqoHNA37L/s 6fKVv9+PAG2lb9PnYYQQKDLPBANJ+/n9aQr66KTgqrQEToaNQsanEOy938AT4tasWtWc Id+A== X-Gm-Message-State: ALoCoQmw1UvVXgUVw3HZPVfP/wRFGZwdqXh7L0QWTRuzWcAl9sTKw5T8tENiaRNcY6R77XV4X36l X-Received: by 10.66.218.162 with SMTP id ph2mr17830264pac.3.1410184659858; Mon, 08 Sep 2014 06:57:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.176 with SMTP id p45ls1744141qgd.57.gmail; Mon, 08 Sep 2014 06:57:39 -0700 (PDT) X-Received: by 10.52.245.66 with SMTP id xm2mr8798959vdc.36.1410184659614; Mon, 08 Sep 2014 06:57:39 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id h4si4578067vdx.8.2014.09.08.06.57.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Sep 2014 06:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hq11so15681348vcb.28 for ; Mon, 08 Sep 2014 06:57:39 -0700 (PDT) X-Received: by 10.52.99.106 with SMTP id ep10mr156655vdb.73.1410184659507; Mon, 08 Sep 2014 06:57:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp137854vcb; Mon, 8 Sep 2014 06:57:39 -0700 (PDT) X-Received: by 10.70.60.197 with SMTP id j5mr5742321pdr.145.1410184658626; Mon, 08 Sep 2014 06:57:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc2si17843341pbb.199.2014.09.08.06.57.37 for ; Mon, 08 Sep 2014 06:57:38 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754224AbaIHN5e (ORCPT + 26 others); 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 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 s88DsW8M017520; Mon, 8 Sep 2014 14:54:37 +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 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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; }