[RFC PATCH 4/4] PCI: meson: Remove redundant MPS configuration

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


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] pci: outdated comment refers to payload size instead of MRRS
--

commit fd8144661bbd8beb3bd09f490b10ee35de5073e6
Author: Hans Zhang <18255117159 at 163.com>

PCI: meson: Remove redundant MPS configuration

The Meson PCIe controller driver manually configures maximum payload
size (MPS) through meson_set_max_payload, duplicating functionality now
centralized in the PCI core. Deprecating redundant code simplifies the
driver and aligns it with the consolidated MPS management strategy,
improving long-term maintainability.

> diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
> index 8559d132dcde8..1d3687566ddaa 100644
> --- a/drivers/pci/controller/dwc/pci-meson.c
> +++ b/drivers/pci/controller/dwc/pci-meson.c

[ ... ]

> @@ -256,7 +254,7 @@ static void meson_pcie_ltssm_enable(struct meson_pcie *mp)
>  	meson_cfg_writel(mp, val, PCIE_CFG0);
>  }
>  
> -static int meson_size_to_payload(struct meson_pcie *mp, int size)
> +static int meson_size_to_mrrs(struct meson_pcie *mp, int size)
>  {
>  	struct device *dev = mp->pci.dev;
>  
> @@ -266,35 +264,19 @@ static int meson_size_to_payload(struct meson_pcie *mp, int size)
>  	 * dwc supports 2^(val+7) payload size, which val is 0~5 default to 1.
                 ^^^^^^^^^^^^^^

[Severity: Low]
Since the function has been repurposed and renamed to calculate MRRS (Max
Read Request Size), could this comment be updated to refer to MRRS rather
than "payload size" to avoid confusion?

>  	 * So if input size is not 2^order alignment or less than 2^7 or bigger
>  	 * than 2^12, just set to default size 2^(1+7).
>  	 */
>  	if (!is_power_of_2(size) || size < 128 || size > 4096) {
> -		dev_warn(dev, "payload size %d, set to default 256\n", size);
> +		dev_warn(dev, "MRRS %d, set to default 256\n", size);
>  		return 1;
>  	}

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



More information about the linux-amlogic mailing list