From: Mahesh Vaidya <mahesh.vaidya@altera.com>
To: Niklas Cassel <cassel@kernel.org>
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: Tue, 11 Nov 2025 20:51:30 +0530 [thread overview]
Message-ID: <7236b092-5b5d-4300-985a-4604572886b2@altera.com> (raw)
In-Reply-To: <aRJFzI-VCqDeEqTN@ryzen>
On 11-11-2025 01:36, Niklas Cassel wrote:
> [CAUTION: This email is from outside your organization. Unless you trust the sender, do not click on links or open attachments as it may be a fraudulent email attempting to steal your information and/or compromise your computer.]
>
> 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.
Thanks, Niklas, for bringing this patch series to my attention.
I tested it on my hardware, and it resolves the issue for me.
Tested-by: Mahesh Vaidya <mahesh.vaidya@altera.com>
>
>
> Kind regards,
> Niklas
next prev parent reply other threads:[~2025-11-11 15:21 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
2025-11-11 15:21 ` Mahesh Vaidya [this message]
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=7236b092-5b5d-4300-985a-4604572886b2@altera.com \
--to=mahesh.vaidya@altera.com \
--cc=18255117159@163.com \
--cc=cassel@kernel.org \
--cc=joyce.ooi@intel.com \
--cc=krishna.kumar.simmadhari.ramadass@altera.com \
--cc=linux-pci@vger.kernel.org \
--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