From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
To: Niklas Cassel <cassel@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"Yue Wang" <yue.wang@Amlogic.com>,
"Hans Zhang" <18255117159@163.com>,
"Keith Busch" <kbusch@kernel.org>,
mx2pg@pm.me, "Lukas Wunner" <lukas@wunner.de>,
"Frank Li" <Frank.Li@nxp.com>,
"Mahesh Vaidya" <mahesh.vaidya@altera.com>,
"Ricardo Pardini" <ricardo@pardini.net>,
"Shawn Lin" <shawn.lin@rock-chips.com>,
"Pali Rohár" <pali@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Myron Stowe" <myron.stowe@redhat.com>,
"Jon Mason" <jdmason@kudzu.us>,
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 v2 2/3] PCI: Configure Root Port MPS after scanning its hierarchy
Date: Sat, 07 Nov 2026 22:20:38 +0530 [thread overview]
Message-ID: <179407023831.65886.4898449607413795226.b4-reply@b4> (raw)
In-Reply-To: <20261020122854.1500883-7-cassel@kernel.org>
On 2026-10-20 14:28 +0200, Niklas Cassel wrote:
> With the default MPS strategy (PCIE_BUS_DEFAULT), pci_configure_mps()
> only matches each device's Maximum Payload Size (MPS) to its upstream
> bridge. Root Ports have no upstream bridge, so their MPS stays at
> whatever firmware or the hardware default (128 bytes) left there, and the
> hierarchy below them inherits that value even if the Root Port and all
> devices below it support more.
>
> Once the hierarchy below a Root Port has been scanned, and before drivers
> are bound, set the Root Port and every device below it to the largest MPS
> they all support, even if that is more than firmware programmed. Do this
> from pcie_bus_configure_settings(), which the host bridge, ACPI and
> hotplug paths call after scanning, and from pci_rescan_bus() and
> pci_rescan_bus_bridge_resize(), which don't.
>
> If the hierarchy contains a hotplug bridge other than the Root Port,
> typically a Switch Downstream Port, limit it to 128 bytes instead, like
> pcie_find_smpss() does for PCIE_BUS_SAFE: a device hot-added below such a
> port later can't lower the MPS of a hierarchy in use, but every device
> supports 128 bytes. This costs throughput where firmware programmed a
> larger MPS for such a hierarchy, in exchange for hot-added devices always
> working.
>
> An empty slot directly below a Root Port is left alone; it is evaluated
> when a device is hot-added or rescanned there, which also allows raising
> the Root Port again after a device that supported less has been replaced.
> Hierarchies in which a device other than a Switch port may already have
> a driver bound are never changed. If the MPS of a device can't be set,
> restore the previous MPS of the whole hierarchy rather than leaving it
> with mismatched settings.
>
> Since PCIE_BUS_DEFAULT can now raise MPS above what firmware programmed,
> apply the Intel 5000/5100 read completion coalescing quirk to it as well.
>
> The other strategies are unchanged: PCIE_BUS_TUNE_OFF doesn't touch MPS,
> and PCIE_BUS_SAFE, PCIE_BUS_PERFORMANCE and PCIE_BUS_PEER2PEER already
> configure the hierarchy in pcie_bus_configure_settings().
>
> Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
> Co-developed-by: Hans Zhang <18255117159@163.com>
> Signed-off-by: Hans Zhang <18255117159@163.com>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
- Mani
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-11-07 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 12:28 [PATCH v2 0/3] PCI: Fix and improve default MPS configuration Niklas Cassel
2026-10-20 12:28 ` [PATCH v2 1/3] PCI: Match the hierarchy's MPS to a device's MPSS as necessary Niklas Cassel
2026-11-07 16:50 ` Manivannan Sadhasivam
2026-10-20 12:28 ` [PATCH v2 2/3] PCI: Configure Root Port MPS after scanning its hierarchy Niklas Cassel
2026-11-07 16:50 ` Manivannan Sadhasivam [this message]
2026-10-20 12:28 ` [PATCH v2 3/3] PCI: meson: Remove redundant MPS configuration Niklas Cassel
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=179407023831.65886.4898449607413795226.b4-reply@b4 \
--to=manivannan.sadhasivam@oss.qualcomm.com \
--cc=18255117159@163.com \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=heiko@sntech.de \
--cc=helgaas@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=jdmason@kudzu.us \
--cc=jingoohan1@gmail.com \
--cc=kbusch@kernel.org \
--cc=khilman@baylibre.com \
--cc=kwilczynski@kernel.org \
--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=lukas@wunner.de \
--cc=mahesh.vaidya@altera.com \
--cc=mani@kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mx2pg@pm.me \
--cc=myron.stowe@redhat.com \
--cc=neil.armstrong@linaro.org \
--cc=pali@kernel.org \
--cc=ricardo@pardini.net \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.com \
--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
all inboxes | Powered by JetHome®