Re: [PATCH v8 09/14] PCI: tegra194: Allow system suspend when the Endpoint link is not up
From: Manikanta Maddireddy
Date: Thu Apr 09 2026 - 03:00:54 EST
On 09/04/26 2:33 am, Bjorn Helgaas wrote:
On Wed, Apr 08, 2026 at 03:59:59PM -0500, Bjorn Helgaas wrote:
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.
Oh, and I forgot: the subject line says "allow *system* suspend", but
it looks like this patch is concerned with *endpoint* suspend.
I assume that whatever an endpoint does, it can't prevent the host
from suspending? I guess I'm just confused about the usage of "system
suspend" in the subject line and commit message -- does "system" refer
to the host or the endpoint?
Hi Bjorn,
System refers to the SoC which has a PCIe controller configured in Endpoint mode.
Thanks,
Manikanta
--
nvpublic