Message ID | 20190816165101.911-20-s.miroshnichenko@yadro.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5216914DB for <patchwork-linux-pci@patchwork.kernel.org>; Fri, 16 Aug 2019 16:51:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 402AD2899C for <patchwork-linux-pci@patchwork.kernel.org>; Fri, 16 Aug 2019 16:51:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 340CC23201; Fri, 16 Aug 2019 16:51:24 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 C5061288D2 for <patchwork-linux-pci@patchwork.kernel.org>; Fri, 16 Aug 2019 16:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727286AbfHPQvX (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Fri, 16 Aug 2019 12:51:23 -0400 Received: from mta-02.yadro.com ([89.207.88.252]:51416 "EHLO mta-01.yadro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727167AbfHPQvV (ORCPT <rfc822;linux-pci@vger.kernel.org>); Fri, 16 Aug 2019 12:51:21 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 0005D42F00; Fri, 16 Aug 2019 16:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received:received; s=mta-01; t= 1565974280; x=1567788681; bh=IN5b5Qn4YOfjjhc2HeOGh69GpubPK0lp6La cAfDIsp8=; b=RsHkPpfP10fB0OIGyjKQmpEB0VxN54q4zqe2x229zAHldjhHRli Y3pC4Hj/oe8xUAH+GRnQXsTPtxqNDQlGs8sUek8Od5cLDhLro5jlixmeZdHDBkmC g0R209KsQ4Z9g1Xa0lfXotkC8wm8Q98/EDiAnSZwskNYbu8oWeI25Y10= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xq5yIa6CELzD; Fri, 16 Aug 2019 19:51:20 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 2746D42EEA; Fri, 16 Aug 2019 19:51:13 +0300 (MSK) Received: from NB-148.yadro.com (172.17.15.60) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Fri, 16 Aug 2019 19:51:12 +0300 From: Sergey Miroshnichenko <s.miroshnichenko@yadro.com> To: <linux-pci@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org> CC: Bjorn Helgaas <helgaas@kernel.org>, <linux@yadro.com>, Sergey Miroshnichenko <s.miroshnichenko@yadro.com> Subject: [PATCH v5 19/23] PCI: hotplug: Configure MPS for hot-added bridges during bus rescan Date: Fri, 16 Aug 2019 19:50:57 +0300 Message-ID: <20190816165101.911-20-s.miroshnichenko@yadro.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190816165101.911-1-s.miroshnichenko@yadro.com> References: <20190816165101.911-1-s.miroshnichenko@yadro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.17.15.60] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
PCI: Allow BAR movement during hotplug
|
expand
|
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 5f52a19738aa..4bb10d27cb3a 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -3688,7 +3688,7 @@ static void pci_reassign_root_bus_resources(struct pci_bus *root) unsigned int pci_rescan_bus(struct pci_bus *bus) { unsigned int max; - struct pci_bus *root = bus; + struct pci_bus *root = bus, *child; while (!pci_is_root_bus(root)) root = root->parent; @@ -3708,6 +3708,9 @@ unsigned int pci_rescan_bus(struct pci_bus *bus) pci_assign_unassigned_bus_resources(bus); } + list_for_each_entry(child, &root->children, node) + pcie_bus_configure_settings(child); + pci_bus_add_devices(bus); return max;
Assure that MPS settings are set up for bridges which are discovered during manually triggered rescan via sysfs. This sequence of bridge init (using pci_rescan_bus()) will be used for pciehp hot-add events when BARs are movable. Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko@yadro.com> --- drivers/pci/probe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)