From: Niklas Cassel <cassel@kernel.org>
To: Mahesh Vaidya <mahesh.vaidya@altera.com>
Cc: joyce.ooi@intel.com, linux-pci@vger.kernel.org,
subhransu.sekhar.prusty@altera.com,
krishna.kumar.simmadhari.ramadass@altera.com,
nanditha.jayarajan@altera.com, Hans Zhang <18255117159@163.com>
Subject: Re: [PATCH] PCI: pcie-altera: Set MPS to MPSS on Agilex 7 Root Ports
Date: Mon, 10 Nov 2025 21:06:36 +0100 [thread overview]
Message-ID: <aRJFzI-VCqDeEqTN@ryzen> (raw)
In-Reply-To: <20251110170045.16106-1-mahesh.vaidya@altera.com>
Hello Mahesh,
On Mon, Nov 10, 2025 at 09:00:45AM -0800, Mahesh Vaidya wrote:
> The Altera Agilex 7 Root Port (RP) defaults its Device Control
> (DEVCTL) register's MPS setting to 128 bytes upon power-on.
> When the kernel's PCIe core enumerates the bus (using the default
> PCIE_BUS_DEFAULT policy), it observes this 128-byte current setting
> and limits all downstream Endpoints to 128 bytes.
> This occurs even if both the RP and the Endpoint support a higher MPSS
> (e.g., 256 or 512 bytes), resulting in sub-optimal DMA performance.
>
> This patch fixes the issue by reading the RP's actual MPSS from its
> Device Capability (DEVCAP) register and writing this value into the
> DEVCTL register, overriding the 128-byte default value.
> As this fix is called in driver's probe function before the PCI bus
> is scanned, it ensures that when the kernel's PCI core enumerates the
> downstream port, it reads the correct, maximum-supported MPS from the
> RP's DEVCTL and can negotiate the optimal MPS for the Endpoint.
Could you please review and test this series from Hans:
https://lore.kernel.org/linux-pci/20251104165125.174168-1-18255117159@163.com/
It tries to address the exact same problem that you are describing here.
Kind regards,
Niklas
next prev parent reply other threads:[~2025-11-10 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 17:00 [PATCH] PCI: pcie-altera: Set MPS to MPSS on Agilex 7 Root Ports Mahesh Vaidya
2025-11-10 20:06 ` Niklas Cassel [this message]
2025-11-11 15:21 ` Mahesh Vaidya
2025-11-11 16:00 ` 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=aRJFzI-VCqDeEqTN@ryzen \
--to=cassel@kernel.org \
--cc=18255117159@163.com \
--cc=joyce.ooi@intel.com \
--cc=krishna.kumar.simmadhari.ramadass@altera.com \
--cc=linux-pci@vger.kernel.org \
--cc=mahesh.vaidya@altera.com \
--cc=nanditha.jayarajan@altera.com \
--cc=subhransu.sekhar.prusty@altera.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