Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1634077imd; Sun, 4 Nov 2018 06:43:05 -0800 (PST) X-Google-Smtp-Source: AJdET5dRNTf170HTbTysbM9kgtm9/LF+3lx7hEzNmQaurmRJj8/W6KyWyUxsgk8p9Dv45JOblqne X-Received: by 2002:a62:1954:: with SMTP id 81-v6mr18700116pfz.237.1541342585465; Sun, 04 Nov 2018 06:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541342585; cv=none; d=google.com; s=arc-20160816; b=TBllfFLkPVPf9lZeJgPc6+14C/nMzeHoAvvdJOzGCgsaC3nL50ekRPLUXFA8vNeE6V I3WWUO6lAE1zHErwVCVK96CHpUxhHTrSz+AkVKUZy0fw7KvuZ0EprqTqXEoBA1OuolT4 I6L4nJTFB7Humy+bdvfCRtRLcckwpBjjlDoEnYrZIdZ+N+o9kn8dRo5daE63cJ17Hhjy yhhCCW9L4hp3K+ydOMvTbwTjqy9DtfOCm7uhNi+W14K8SXzBAePr5HHOBcyu0H2zTv6o UQgU/CqBFA784q+2qUrvqH+yT264Gn4umIyN0WFBeHXroDk9c/3urOfdz5CgBpy5GRps mdug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=CLMxf/Xh70y61/m2uOa1kVCzJ+sQCtFS97JAQUEXZtY=; b=g2ad4LZg2i+Pi+Z0rzhqj2pEIGeaBskShyz7wgcn8OF/5GTFtYoVTsrqaNmXaTrQDl JwRfamaMXKT9qV5N9Dzmk5ilj2nh5P5BVM6mLp8lR8IJu+pCJ+7r4FjU5MdO/2j/BxLz eP2OeJI403hHx4qbU35YSXlyHqoGy7vzOERTyQsg5arw4jcNVIacqrTw+Tp74x+kuehP OnYuv6snPWhfvnc0GevaSe54dRe0f2Sv93n6euCBynLVGJKmxyKJviKBcRGdnisdNsNR LHYI8fyu5c9xuLQuegzCkO/Wz9gzNiQqEc+q/mr0lZsvBVG4/PuLNzxJ0N0H59kVO0vS 3s4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Meb/XKQu"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17-v6si38751424pgh.56.2018.11.04.06.42.50; Sun, 04 Nov 2018 06:43:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Meb/XKQu"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730372AbeKDXHa (ORCPT + 99 others); Sun, 4 Nov 2018 18:07:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:45340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730354AbeKDXHa (ORCPT ); Sun, 4 Nov 2018 18:07:30 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 580DB20862; Sun, 4 Nov 2018 13:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541339546; bh=+VqJiRuqhuFqZxBNR+S9XgdQ3dPefuhldPmWjGVD00U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Meb/XKQuROYWeVJ2haIxs3fr8kUCTG4r2yV1ROodnP99/1QBoBmDaPyKAZI+BHAba W/cQrzlnYy27ybFsyGwaw6h1uOdM9oJw2hT0EAxu7/hHLmm3W0kjSXI0K4YlzA2nGe JKozIeBPsZGkyc8BZufD7U0GKC0ABIxmCLsAKmmo= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Huacai Chen , Paul Burton , Ralf Baechle , James Hogan , linux-mips@linux-mips.org, Fuxin Zhang , Zhangjin Wu , Huacai Chen , Sasha Levin Subject: [PATCH AUTOSEL 4.19 41/57] MIPS/PCI: Call pcie_bus_configure_settings() to set MPS/MRRS Date: Sun, 4 Nov 2018 08:51:28 -0500 Message-Id: <20181104135144.88324-41-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181104135144.88324-1-sashal@kernel.org> References: <20181104135144.88324-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huacai Chen [ Upstream commit 2794f688b2c336e0da85e9f91fed33febbd9f54a ] Call pcie_bus_configure_settings() on MIPS, like for other platforms. The function pcie_bus_configure_settings() makes sure the MPS (Max Payload Size) across the bus is uniform and provides the ability to tune the MRSS (Max Read Request Size) and MPS (Max Payload Size) to higher performance values. Some devices will not operate properly if these aren't set correctly because the firmware doesn't always do it. Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20649/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen Signed-off-by: Sasha Levin --- arch/mips/pci/pci-legacy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/mips/pci/pci-legacy.c b/arch/mips/pci/pci-legacy.c index f1e92bf743c2..3c3b1e6abb53 100644 --- a/arch/mips/pci/pci-legacy.c +++ b/arch/mips/pci/pci-legacy.c @@ -127,8 +127,12 @@ static void pcibios_scanbus(struct pci_controller *hose) if (pci_has_flag(PCI_PROBE_ONLY)) { pci_bus_claim_resources(bus); } else { + struct pci_bus *child; + pci_bus_size_bridges(bus); pci_bus_assign_resources(bus); + list_for_each_entry(child, &bus->children, node) + pcie_bus_configure_settings(child); } pci_bus_add_devices(bus); } -- 2.17.1