Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1777497imd; Sun, 4 Nov 2018 09:13:52 -0800 (PST) X-Google-Smtp-Source: AJdET5ceYOkpiKxTdGl1t6NogRqIwEpg+sTyC+EEV9et2HcyvKHqyuSfPR9g7AiWOjCWGxXysqN4 X-Received: by 2002:a63:330e:: with SMTP id z14-v6mr17465348pgz.220.1541351632147; Sun, 04 Nov 2018 09:13:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541351632; cv=none; d=google.com; s=arc-20160816; b=HNPKNkbWF9oDuc7chKGF2PwlhyDl6rgoGFSAhqGcqFXWDVlelwtEvBv1e7Rc0cPMIy BfB6+OfIEfVDP5/mqnQSuGetXObeVhKCuhQGWvBSm9hMKYHODqn05qIMkP7wbeoiSUD8 HSisAwT24ZLJnyqSvo8NA+Ai3Jn8ls/F64hyPEl3lI/LStCDU5pDlUsQhvG17kZZbBR1 fS4HNCOfdkPK61wX3NoPyysmdQ3wzFY+2a7ZCB1rW0YgGRE+cl8o+Bmo3VSXnLcL2113 aiIrnqGgwXWZvbWTASWfU+/7PUnHAo/6/zZy4S1oTlAsk5mppVBXpFyCXRNOSYI9lY1L x6bA== 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=x0ohzkfPoUcW0rvAW4gJjc/iJZZBLMLzY0jlhwUI2pM=; b=UZlDu5IgVz1Ram1vsHbO+VyVGyFLyGUCY76dsje/ZFK/yFYb9q3ZbHwBKOI/6eO/PJ 0LWuAD93w335jJGg8fpeFx4m/yn/K8P8YgkCn8fX6PCQyjBoLmigKyi3dP6q1TQtaOCZ EHvBtP1B+Tp7A56FkkSHtbWwzMutFwCZJIl3iEJt215hr/g1j7JvuW1j2UQO7dFudJSd LIM5KP/IfFsfIeBB5JX6BDXLNNsxm75+0f+q2Gf2nQnwKHaHkZnWRT6HOGmBRQPTUej/ o7mD/nJA/MRPB+vDsNojKzagbNMe68K5HZu20P+qzUn+Q+dQeHNdVV49oYTts0io1o91 GbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fK1QP3RU; 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 i20-v6si19398927pgk.562.2018.11.04.09.13.07; Sun, 04 Nov 2018 09:13:52 -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=fK1QP3RU; 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 S1731381AbeKDXIz (ORCPT + 99 others); Sun, 4 Nov 2018 18:08:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:48130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731356AbeKDXIy (ORCPT ); Sun, 4 Nov 2018 18:08:54 -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 33C2F204FD; Sun, 4 Nov 2018 13:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541339630; bh=SlkbV0Md24tgHFNfUexA5bqHdRx1okt5NMybIXrtqms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fK1QP3RUpgC70GcBx3z9CvTWRj7KOWPmoRYYjrCZgngnvkv6RDuRCqWazrN2xVstt gBpu4d1J86z5SPEkP6nX+4+f+m4jHUGYehaGlgtTugASyb+Jiwc3Cy8Z0eYr9kwTzc GUIE4Ypkn8r3tAJdfv4lKtgNd6K3rGu6HedZZ28w= 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.14 24/30] MIPS/PCI: Call pcie_bus_configure_settings() to set MPS/MRRS Date: Sun, 4 Nov 2018 08:53:19 -0500 Message-Id: <20181104135325.88524-24-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181104135325.88524-1-sashal@kernel.org> References: <20181104135325.88524-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 0c65c38e05d6..1ae6bc414e2b 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