aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2018-07-16 18:05:07 -0400
committerBjorn Helgaas <bhelgaas@google.com>2018-07-19 17:21:01 -0400
commite77b8216a2f9bec430ec46c34763567329ddafd9 (patch)
treecb798fff188d64edbfde2e1233592d54278f1c3d
parent738c4e411dadbe341f80f30d56518b68ae1e605f (diff)
PCI/DPC: Remove indirection waiting for inactive link
Simplify waiting for the contained link to become inactive, removing the indirection to a unnecessary DPC-specific handler. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Sinan Kaya <okaya@kernel.org> Reviewed-by: Oza Pawandeep <poza@codeaurora.org>
-rw-r--r--drivers/pci/pcie/dpc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c
index fd6b96ca1c2d..f03279fc87cd 100644
--- a/drivers/pci/pcie/dpc.c
+++ b/drivers/pci/pcie/dpc.c
@@ -64,18 +64,12 @@ static int dpc_wait_rp_inactive(struct dpc_dev *dpc)
64 return 0; 64 return 0;
65} 65}
66 66
67static void dpc_wait_link_inactive(struct dpc_dev *dpc)
68{
69 struct pci_dev *pdev = dpc->dev->port;
70
71 pcie_wait_for_link(pdev, false);
72}
73
74static pci_ers_result_t dpc_reset_link(struct pci_dev *pdev) 67static pci_ers_result_t dpc_reset_link(struct pci_dev *pdev)
75{ 68{
76 struct dpc_dev *dpc; 69 struct dpc_dev *dpc;
77 struct pcie_device *pciedev; 70 struct pcie_device *pciedev;
78 struct device *devdpc; 71 struct device *devdpc;
72
79 u16 cap; 73 u16 cap;
80 74
81 /* 75 /*
@@ -91,7 +85,7 @@ static pci_ers_result_t dpc_reset_link(struct pci_dev *pdev)
91 * Wait until the Link is inactive, then clear DPC Trigger Status 85 * Wait until the Link is inactive, then clear DPC Trigger Status
92 * to allow the Port to leave DPC. 86 * to allow the Port to leave DPC.
93 */ 87 */
94 dpc_wait_link_inactive(dpc); 88 pcie_wait_for_link(pdev, false);
95 89
96 if (dpc->rp_extensions && dpc_wait_rp_inactive(dpc)) 90 if (dpc->rp_extensions && dpc_wait_rp_inactive(dpc))
97 return PCI_ERS_RESULT_DISCONNECT; 91 return PCI_ERS_RESULT_DISCONNECT;