[RFC PATCH 2/4] PCI: Match the hierarchy's MPS to a device's MPSS as necessary

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Sep 30 07:57:53 PDT 2026


> From: Hans Zhang <18255117159 at 163.com>
> 
> pci_configure_mps() enumerates top-down and programs each device's Maximum
> Payload Size (MPS) to match its upstream bridge.  When a device's MPS
> Supported (MPSS) is too small to match, commit 9f0e89359775 ("PCI: Match
> Root Port's MPS to endpoint's MPSS as necessary") reduces the upstream
> bridge instead, but only when that bridge is a Root Port.
> 
> That covers an endpoint directly below a Root Port and nothing else.  With
> a Switch in between, the Switch ports have already inherited the Root
> Port's larger MPS, the reduction is skipped because the upstream bridge is
> a Switch Downstream Port, and pcie_set_mps() then fails with -EINVAL for
> the endpoint.  The endpoint is left below a port programmed for a larger
> MPS, so any larger TLP it receives is treated as Malformed.
> 
> [ ... ]
> Fixes: 9f0e89359775 ("PCI: Match Root Port's MPS to endpoint's MPSS as necessary")
> Signed-off-by: Hans Zhang <18255117159 at 163.com>
> Assisted-by: LLM
> Co-developed-by: Niklas Cassel <cassel at kernel.org>
> Signed-off-by: Niklas Cassel <cassel at kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260930145017.1356088-6-cassel@kernel.org?part=2




More information about the linux-amlogic mailing list