From: Hans Zhang <18255117159@163.com>
To: Niklas Cassel <cassel@kernel.org>
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
Subject: Re: [PATCH v4 1/2] PCI: Configure root port MPS during host probing
Date: Tue, 13 May 2025 22:53:29 +0800 [thread overview]
Message-ID: <ade4c14a-ff20-4001-8eda-75fef15df62c@163.com> (raw)
In-Reply-To: <aCL9CStLrGEY2MEH@ryzen>
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 <cassel@kernel.org>
>> 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 <cassel@kernel.org>
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
next prev parent reply other threads:[~2025-05-13 14:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-10 15:56 [PATCH v4 0/2] Configure root port MPS during host probing Hans Zhang
2025-05-10 15:56 ` [PATCH v4 1/2] PCI: " Hans Zhang
2025-05-13 8:04 ` Niklas Cassel
2025-05-13 14:53 ` Hans Zhang [this message]
2025-06-13 6:38 ` Manivannan Sadhasivam
2025-06-13 11:52 ` Niklas Cassel
2025-06-13 15:31 ` Hans Zhang
2025-06-19 12:45 ` Manivannan Sadhasivam
2025-05-10 15:56 ` [PATCH v4 2/2] PCI: dwc: Remove redundant MPS configuration Hans Zhang
2025-05-13 8:05 ` Niklas Cassel
2025-06-13 6:54 ` Manivannan Sadhasivam
2025-06-13 15:40 ` Hans Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ade4c14a-ff20-4001-8eda-75fef15df62c@163.com \
--to=18255117159@163.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=heiko@sntech.de \
--cc=jbrunet@baylibre.com \
--cc=jingoohan1@gmail.com \
--cc=khilman@baylibre.com \
--cc=kw@linux.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=pali@kernel.org \
--cc=robh@kernel.org \
--cc=yue.wang@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox