Skip to content

Commit e3c3a5d

Browse files
AkshGarg-19bjorn-helgaas
authored andcommitted
PCI: dwc: ep: Add comment explaining controller level PTM access in multi PF setup
PCIe r6.0, section 7.9.15 requires PTM capability in exactly one function to control all PTM-capable functions. This makes PTM registers controller level rather than per-function. Add a comment explaining why PTM capability registers are accessed using the standard DBI accessors instead of func_no indexed per-function accessors. Suggested-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Aksh Garg <a-garg7@ti.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Niklas Cassel <cassel@kernel.org> Link: https://patch.msgid.link/20260130115516.515082-4-a-garg7@ti.com
1 parent 72cb5ed commit e3c3a5d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pcie-designware-ep.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,18 @@ int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep)
11871187
if (ep->ops->init)
11881188
ep->ops->init(ep);
11891189

1190+
/*
1191+
* PCIe r6.0, section 7.9.15 states that for endpoints that support
1192+
* PTM, this capability structure is required in exactly one
1193+
* function, which controls the PTM behavior of all PTM capable
1194+
* functions. This indicates the PTM capability structure
1195+
* represents controller-level registers rather than per-function
1196+
* registers.
1197+
*
1198+
* Therefore, PTM capability registers are configured using the
1199+
* standard DBI accessors, instead of func_no indexed per-function
1200+
* accessors.
1201+
*/
11901202
ptm_cap_base = dw_pcie_find_ext_capability(pci, PCI_EXT_CAP_ID_PTM);
11911203

11921204
/*

0 commit comments

Comments
 (0)