From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96677C3ABC3 for ; Tue, 13 May 2025 14:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Un2T/ceYFs9vyBe+MHolNpLdYTmpt1l7fHNfgm09/fs=; b=YV/ptt1Q3Z/eOn 90r4AN/6ozxqipclpOVQQL+A8yTV2OtlFUUVwW3/xcPxzZxs0uOpMg13F3GQcwdrAOVOlFkDn1BU9 ZGGoTQAI8e1NUhSbULhh+dnEl/0IKwrep+ZKNOWSJXgALK1bSv743nRzhgCkQps7wIs0ZBrXjEe11 QYsWHGNURYcuIJwaM2Tu/QBDkmLmsUiH23ry5l9cIn2CtaIEHj/FwZUMvNT9VHP1deUgX9W3x5zlP YNOosPt8CVpbKuXdLjI5ZV9A4o68WuALgJyaN0YTucUMa/JvsckEJGe7sOzRh1vCZF+NcLzDxeKmU gHVn9mHpJTYKGPuDRYQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uEr43-0000000CgY3-21Y2; Tue, 13 May 2025 14:57:03 +0000 Received: from m16.mail.163.com ([220.197.31.4]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uEr1K-0000000Cg25-3RZR; Tue, 13 May 2025 14:54:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=nXQDzb+tFFVU+4SLdENHkW/1SY6XdLMilSABvcCoeBU=; b=M4t9yiWS6jQq9lz15VN6CVAutd+twdoSe9/gfmvn4tn9O3peNgeaTMQ/EcejzC KEFcIIZ6IYe7GW1kjoyKFkMSD8kwDZqSOPo4tO5tOF4QO+EsyfmPBlZD8DhhkCr9 /4j2/u98y0120iF+3FSwZbK/zCM1HUC867PBfoJZz+UA8= Received: from [192.168.71.93] (unknown []) by gzga-smtp-mtada-g0-2 (Coremail) with SMTP id _____wDXt+XpXCNoldCmBA--.8342S2; Tue, 13 May 2025 22:53:30 +0800 (CST) Message-ID: Date: Tue, 13 May 2025 22:53:29 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/2] PCI: Configure root port MPS during host probing To: Niklas Cassel Cc: lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com, heiko@sntech.de, manivannan.sadhasivam@linaro.org, yue.wang@amlogic.com, pali@kernel.org, neil.armstrong@linaro.org, robh@kernel.org, jingoohan1@gmail.com, khilman@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org References: <20250510155607.390687-1-18255117159@163.com> <20250510155607.390687-2-18255117159@163.com> Content-Language: en-US From: Hans Zhang <18255117159@163.com> In-Reply-To: X-CM-TRANSID: _____wDXt+XpXCNoldCmBA--.8342S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJF1rtrW7uFW3uw4rAFWkZwb_yoW8ur1Dpa y8Xw4vyFZ7WryfG3WDAa109rWjqas5CF43JrZ8JryqqFn8C3WqqrWYka1Fqas7Grnayw1j vw1jqry8uws0yFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UpKZXUUUUU= X-Originating-IP: [124.79.128.52] X-CM-SenderInfo: rpryjkyvrrlimvzbiqqrwthudrp/1tbiOhxMo2gjWD+jDQAAsL X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250513_075415_276946_1EDE6C7E X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On 2025/5/13 16:04, Niklas Cassel wrote: > On Sat, May 10, 2025 at 11:56:06PM +0800, Hans Zhang wrote: >> Current PCIe initialization logic may leave root ports operating with >> non-optimal Maximum Payload Size (MPS) settings. While downstream device >> configuration is handled during bus enumeration, root port MPS values >> inherited from firmware or hardware defaults might not utilize the full >> capabilities supported by the controller hardware. This can result is >> uboptimal data transfer efficiency across the PCIe hierarchy. >> >> During host controller probing phase, when PCIe bus tuning is enabled, >> the implementation now configures root port MPS settings to their >> hardware-supported maximum values. By iterating through bridge devices >> under the root bus and identifying PCIe root ports, each port's MPS is >> set to 128 << pcie_mpss to match the device's maximum supported payload >> size. The Max Read Request Size (MRRS) is subsequently adjusted through >> existing companion logic to maintain compatibility with PCIe >> specifications. >> >> Explicit initialization at host probing stage ensures consistent PCIe >> topology configuration before downstream devices perform their own MPS >> negotiations. This proactive approach addresses platform-specific >> requirements where controller drivers depend on properly initialized >> root port settings, while maintaining backward compatibility through >> PCIE_BUS_TUNE_OFF conditional checks. Hardware capabilities are fully >> utilized without altering existing device negotiation behaviors. >> >> Suggested-by: Niklas Cassel >> Signed-off-by: Hans Zhang <18255117159@163.com> >> --- > > Looks good to me, but since this I'm the one who suggested this specific > implementation, it would be good if someone else could review it as well. > > Reviewed-by: Niklas Cassel Dear Niklas, Thank you very much for your review and suggestions. Let's wait for others' opinions. Best regards, Hans _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip