]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: dwc: ep: Fix resizable BAR support for multi-PF configurations
authorAksh Garg <a-garg7@ti.com>
Fri, 30 Jan 2026 11:55:14 +0000 (17:25 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 30 Jan 2026 17:17:27 +0000 (11:17 -0600)
commit43d67ec26b329f8aea34ba9dff23d69b84a8e564
tree242bb2ebd31e4c725fb104b4855e4d93ecf22ea8
parentffcc4850a16133d8db0f11ee6dde319201800451
PCI: dwc: ep: Fix resizable BAR support for multi-PF configurations

The resizable BAR support added by the commit 3a3d4cabe681 ("PCI: dwc: ep:
Allow EPF drivers to configure the size of Resizable BARs") incorrectly
configures the resizable BARs only for the first Physical Function (PF0)
in EP mode.

The resizable BAR configuration functions use generic dw_pcie_*_dbi()
operations instead of physical function specific dw_pcie_ep_*_dbi()
operations. This causes resizable BAR configuration to always target
PF0 regardless of the requested function number.

Additionally, dw_pcie_ep_init_non_sticky_registers() only initializes
resizable BAR registers for PF0, leaving other PFs unconfigured during
the execution of this function.

Fix this by using physical function specific configuration space access
operations throughout the resizable BAR code path and initializing
registers for all the physical functions that support resizable BARs.

Fixes: 3a3d4cabe681 ("PCI: dwc: ep: Allow EPF drivers to configure the size of Resizable BARs")
Signed-off-by: Aksh Garg <a-garg7@ti.com>
[mani: added stable tag]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260130115516.515082-2-a-garg7@ti.com
drivers/pci/controller/dwc/pcie-designware-ep.c