Re: [PATCH v8 09/14] PCI: tegra194: Allow system suspend when the Endpoint link is not up

From: Bjorn Helgaas

Date: Wed Apr 08 2026 - 17:00:23 EST


On Wed, Mar 25, 2026 at 12:37:50AM +0530, Manikanta Maddireddy wrote:
> From: Vidya Sagar <vidyas@xxxxxxxxxx>
>
> Host software initiates the L2 sequence. PCIe link is kept in L2 state
> during suspend. If Endpoint mode is enabled and the link is up, the
> software cannot proceed with suspend. However, when the PCIe Endpoint
> driver is probed, but the PCIe link is not up, Tegra can go into suspend
> state. So, allow system to suspend in this case.

> +static int tegra_pcie_dw_suspend(struct device *dev)
> {
> struct tegra_pcie_dw *pcie = dev_get_drvdata(dev);
> - u32 val;
>
> if (pcie->of_data->mode == DW_PCIE_EP_TYPE) {
> - dev_err(dev, "Failed to Suspend as Tegra PCIe is in EP mode\n"); > - return -EPERM;
> + if (pcie->ep_state == EP_STATE_ENABLED) {
> + dev_err(dev, "Tegra PCIe is in EP mode, suspend not allowed\n");

Should this message say something about endpoint suspend not being
allowed because the link is up? IIUC, the endpoint *can* suspend if
the link is down.