[PATCH] PCI: stm32: Fix EP page_size alignment

Christian Bruel posted 1 patch 2 months, 3 weeks ago
drivers/pci/controller/dwc/pcie-stm32-ep.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] PCI: stm32: Fix EP page_size alignment
Posted by Christian Bruel 2 months, 3 weeks ago
pci_epc_mem_alloc_addr() will allocate the cpu addr from the ATU
window phys base and a page number. The resulting cpu addr must be
correcly aligned with the ATU required alignment.

Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
---
 drivers/pci/controller/dwc/pcie-stm32-ep.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-stm32-ep.c b/drivers/pci/controller/dwc/pcie-stm32-ep.c
index 3400c7cd2d88a279c49ef36a99fc7537c381c384..004033ed60a8917438b08f5941908405c339716a 100644
--- a/drivers/pci/controller/dwc/pcie-stm32-ep.c
+++ b/drivers/pci/controller/dwc/pcie-stm32-ep.c
@@ -237,6 +237,8 @@ static int stm32_add_pcie_ep(struct stm32_pcie *stm32_pcie,
 
 	ep->ops = &stm32_pcie_ep_ops;
 
+	ep->page_size = stm32_pcie_epc_features.align;
+
 	ret = dw_pcie_ep_init(ep);
 	if (ret) {
 		dev_err(dev, "Failed to initialize ep: %d\n", ret);

---
base-commit: 9c557fdcc2f5fab8541dbba9b08c222f89009f09
change-id: 20251113-atu_align_ep-7b8dda52ee89

Best regards,
-- 
Christian Bruel <christian.bruel@foss.st.com>
Re: [PATCH] PCI: stm32: Fix EP page_size alignment
Posted by Manivannan Sadhasivam 2 months, 3 weeks ago
On Fri, 14 Nov 2025 09:08:05 +0100, Christian Bruel wrote:
> pci_epc_mem_alloc_addr() will allocate the cpu addr from the ATU
> window phys base and a page number. The resulting cpu addr must be
> correcly aligned with the ATU required alignment.
> 
> 

Applied, thanks!

[1/1] PCI: stm32: Fix EP page_size alignment
      commit: cf2eff021ee3c179a4ec4a6c1d34a27fd92b8acf

Best regards,
-- 
Manivannan Sadhasivam <mani@kernel.org>