Bjorn Helgaas e243c173c0 PCI/PTM: Add pci_upstream_ptm() helper
PTM requires an unbroken path of PTM-supporting devices between the PTM
Root and the ultimate PTM Requester, but if a Switch supports PTM, only the
Upstream Port can have a PTM Capability; the Downstream Ports do not.

Previously we copied the PTM configuration from the Switch Upstream Port to
the Downstream Ports so dev->ptm_enabled for any device implied that all
the upstream devices support PTM.

Instead of making it look like Downstream Ports have their own PTM config,
add pci_upstream_ptm(), which returns the upstream device that has a PTM
Capability (either a Root Port or a Switch Upstream Port).

Link: https://lore.kernel.org/r/20220909202505.314195-3-helgaas@kernel.org
Tested-by: Rajvi Jingar <rajvi.jingar@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2022-09-12 15:29:25 -05:00
..
2021-06-16 17:20:40 -05:00
2022-03-07 12:06:10 -07:00
2022-08-10 11:07:26 -07:00
2022-05-31 09:56:54 -07:00
2022-05-31 09:56:54 -07:00
2022-08-10 11:07:26 -07:00
2021-02-10 16:46:29 -06:00
2022-03-22 17:16:21 -05:00
2021-09-28 13:43:17 -05:00
2020-08-05 18:23:14 -05:00