Re: [PATCH] PCI: rcar-gen4: Isolate 256B MRRS limit only to R-Car Gen4 SoC PCIe controller
From: Marek Vasut
Date: Wed Nov 04 2026 - 00:09:59 EST
On 10/30/26 7:06 AM, Manivannan Sadhasivam wrote:
Hello Manivannan,
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.
If we do that, we would end up with assigning a callback which always does nothing on R-Car Gen5 (SoC with rcar->drvdata->mrrs_256b_limit = false), that is not good. I think it is better to simply not assign the callback on R-Car Gen5 at all. Hence this here.
--
Best regards,
Marek Vasut