From patchwork Wed Feb 8 22:09:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 9563731 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70E3960146 for ; Wed, 8 Feb 2017 23:05:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3431E2845B for ; Wed, 8 Feb 2017 23:05:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28F6028532; Wed, 8 Feb 2017 23:05:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC5292845B for ; Wed, 8 Feb 2017 23:04:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbdBHXEn (ORCPT ); Wed, 8 Feb 2017 18:04:43 -0500 Received: from mail.kernel.org ([198.145.29.136]:40840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305AbdBHXEh (ORCPT ); Wed, 8 Feb 2017 18:04:37 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 034792025B; Wed, 8 Feb 2017 22:09:13 +0000 (UTC) Received: from localhost (unknown [69.71.4.155]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D4B9020211; Wed, 8 Feb 2017 22:09:11 +0000 (UTC) Subject: [PATCH v1 3/3] PCI: xgene: Configure PCIe MPS settings From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Rob Herring , Haiyang Zhang , Michal Simek , Jon Mason , Ray Jui , =?utf-8?b?U8O2cmVu?= Brinkmann , devel@linuxdriverproject.org, "K. Y. Srinivasan" , linux-arm-kernel@lists.infradead.org, Tanmay Inamdar Date: Wed, 08 Feb 2017 16:09:10 -0600 Message-ID: <20170208220910.8352.8243.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20170208215558.8352.90635.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20170208215558.8352.90635.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure PCIe MPS settings are valid when we enumerate a new hierarchy. Based-on-patch-by: Jon Mason Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index 7c3b54b9eb17..8091a8778ae7 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -638,7 +638,7 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev) struct device_node *dn = dev->of_node; struct xgene_pcie_port *port; resource_size_t iobase = 0; - struct pci_bus *bus; + struct pci_bus *bus, *child; int ret; LIST_HEAD(res); @@ -681,6 +681,8 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev) pci_scan_child_bus(bus); pci_assign_unassigned_bus_resources(bus); + list_for_each_entry(child, &bus->children, node) + pcie_bus_configure_settings(child); pci_bus_add_devices(bus); return 0;