]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 21 May 2020 20:40:07 +0000 (15:40 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 21 May 2020 20:53:07 +0000 (15:53 -0500)
commit634b213e8638c1e39169f33a6a5890dd8f29c94e
tree548c59cd8b6a79a5a19f7b62bb29a507a4b9f077
parent02a734d7f1727badd1356aec957d9f821fa04c15
PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port

Except for Endpoints, we enable PTM at enumeration-time.  Previously we did
not account for the fact that Switch Downstream Ports are not permitted to
have a PTM capability; their PTM behavior is controlled by the Upstream
Port (PCIe r5.0, sec 7.9.16).  Since Downstream Ports don't have a PTM
capability, we did not mark them as "ptm_enabled", which meant that
pci_enable_ptm() on an Endpoint failed because there was no PTM path to it.

Mark Downstream Ports as "ptm_enabled" if their Upstream Port has PTM
enabled.

Fixes: 160c1bb20c25 ("PCI: Add pci_enable_ptm() for drivers to enable PTM on endpoints")
Reported-by: Aditya Paluri <Venkata.AdityaPaluri@synopsys.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/ptm.c