Re: [PATCH 1/2] PCI: dwc: ep: Fix resizable BAR support for multi-PF configurations

From: Aksh Garg

Date: Wed Jan 21 2026 - 07:02:10 EST




On Wed, Jan 21, 2026 at 11:12:13AM +0530, Aksh Garg wrote:
+static void dw_pcie_ep_init_non_sticky_registers(struct dw_pcie *pci)
+{
+ struct dw_pcie_ep *ep = &pci->ep;
+ u8 func_no, funcs;
+
+ funcs = ep->epc->max_functions;

Initialize this on the same line as the variable is declared.
u8 func_no; will be on a separate line.


I will fix this nit.


+
+ dw_pcie_dbi_ro_wr_en(pci);
+
+ for (func_no = 0; func_no < funcs; func_no++)
+ __dw_pcie_ep_init_non_sticky_registers(ep, func_no);
dw_pcie_setup(pci);
dw_pcie_dbi_ro_wr_dis(pci);
--
2.34.1



Thank you for fixing this!

Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>


You do need another patch in this series though, that fixes:
https://github.com/torvalds/linux/blob/v6.19-rc6/drivers/pci/controller/dwc/pcie-designware-ep.c#L972-L986

As currently, ptm_cap_base is fetched using dw_pcie_find_ext_capability()
instead of your new dw_pcie_ep_find_ext_capability() which takes a func_no.


Thank you for pointing this out. I will add a patch for this fix as well.


Kind regards,
Niklas