> Add pcie_tph_enabled_req_type() so drivers can query the enabled TPH > requester mode without reaching into pci_dev internals. > > Add pcie_tph_completer_type() so drivers that publish TPH metadata for a > device acting as a completer can gate on the "TPH Completer Supported" > field of Device Capabilities 2 (bits 13:12, PCI_EXP_DEVCAP2_TPH_COMP_MASK) > rather than reusing requester-side state. It applies the same reserved- > encoding fold as get_rp_completer_type(), inlined, so the reserved 0b10 > value never reaches callers. > > This keeps pci_dev::tph_req_type and the completer-capability decode > inside the PCI/TPH code and provides !CONFIG_PCIE_TPH stubs for callers. > > Signed-off-by: Zhiping Zhang <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2
