Re: [PATCH] PCI: rcar-gen4: Isolate 256B MRRS limit only to R-Car Gen4 SoC PCIe controller

From: Manivannan Sadhasivam

Date: Fri Oct 30 2026 - 02:07:28 EST


On 2026-10-28 18:21 +0100, Marek Vasut wrote:
> The R-Car Gen5 SoC PCIe4 controller is not affected by the 256B MRRS
> limitation that was present on R-Car Gen4 SoC PCIe controller. Apply
> the 256B MRRS limitation workaround to R-Car Gen4 SoC PCIe controller
> only. For details of the 256B MRRS limitation, please refer to commit
> f0a5c6bd797c ("PCI: rcar-gen4: Limit Max_Read_Request_Size to 256 Bytes") .
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>
> ---
> Cc: "Krzysztof Wilczyński" <kwilczynski@xxxxxxxxxx>
> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Cc: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
> Cc: Magnus Damm <magnus.damm@xxxxxxxxx>
> Cc: Manivannan Sadhasivam <mani@xxxxxxxxxx>
> Cc: Rob Herring <robh@xxxxxxxxxx>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: linux-pci@xxxxxxxxxxxxxxx
> Cc: linux-renesas-soc@xxxxxxxxxxxxxxx
> ---
> drivers/pci/controller/dwc/pcie-rcar-gen4.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
> index 9a64a9f4ab0d1..1e4405181eef3 100644
> --- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c
> +++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
> @@ -99,6 +99,7 @@ struct rcar_gen4_pcie_drvdata {
> int (*ltssm_control)(struct rcar_gen4_pcie *rcar, bool enable);
> int (*speed_control)(struct rcar_gen4_pcie *rcar);
> enum dw_pcie_device_mode mode;
> + bool mrrs_256b_limit;
> };
>
> struct rcar_gen4_pcie {
> @@ -663,7 +664,7 @@ static int rcar_gen4_pcie_host_init(struct dw_pcie_rp *pp)
> if (ret)
> return ret;
>
> - if (pp->bridge)
> + if (rcar->drvdata->mrrs_256b_limit && pp->bridge)
> pp->bridge->enable_device = rcar_gen4_pcie_enable_device;

I'd suggest moving this check inside enable_device() callback to make it clear
where exactly the skipping happens.

- Mani