Commit de2bbf2b authored by Om Prakash Singh's avatar Om Prakash Singh Committed by Lorenzo Pieralisi
Browse files

PCI: tegra194: Don't allow suspend when Tegra PCIe is in EP mode

When Tegra PCIe is in endpoint mode it should be available for root port.
PCIe link up by root port fails if it is in suspend state. So, don't allow
Tegra to suspend when endpoint mode is enabled.

Link: https://lore.kernel.org/r/20210623100525.19944-5-omp@nvidia.com


Signed-off-by: default avatarOm Prakash Singh <omp@nvidia.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarVidya Sagar <vidyas@nvidia.com>
parent 834c5cf2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2246,6 +2246,11 @@ static int tegra_pcie_dw_resume_early(struct device *dev)
	struct tegra_pcie_dw *pcie = dev_get_drvdata(dev);
	u32 val;

	if (pcie->mode == DW_PCIE_EP_TYPE) {
		dev_err(dev, "Suspend is not supported in EP mode");
		return -ENOTSUPP;
	}

	if (!pcie->link_state)
		return 0;