From: Manikanta Maddireddy <mmaddireddy@nvidia.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
Krzysztof Wilczynski <kwilczynski@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Rob Herring <robh@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jon Hunter <jonathanh@nvidia.com>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Frank Li <Frank.Li@kernel.org>, Vidya Sagar <vidyas@nvidia.com>,
Niklas Cassel <cassel@kernel.org>,
Koichiro Den <den@valinux.co.jp>,
Marco Crivellari <marco.crivellari@suse.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/11] PCI: tegra194: Fix Endpoint PERST# IRQ suspend race
Date: Fri, 16 Oct 2026 14:55:08 +0530 [thread overview]
Message-ID: <e580f300-627f-4187-8cf2-e87ff9199488@nvidia.com> (raw)
In-Reply-To: <179198724650.63727.14078621188562557208.b4-reply@b4>
On 14/10/26 7:44 pm, Manivannan Sadhasivam wrote:
> On 2026-09-23 12:52 +0530, Manikanta Maddireddy wrote:
>> Endpoint mode disables the PERST# IRQ during system suspend when the
>> link is down. The old code checked ep_state before disabling the IRQ,
>> so the host could deassert PERST# in that window and the IRQ thread
>> could move the endpoint to EP_STATE_ENABLED after the suspend check had
>> already passed.
>>
>
> What is the issue in this scenario?
Scenario is,
1) Tegra suspend to RAM initiated
2) PCIe suspend is executing
3) EP state is in disabled when "pcie->ep_state == EP_STATE_ENABLED"
check is done.
4) EP PERST# deassert interrupt is received before pex_rst_irq is disabled.
5) Now suspend and PERST# deassert sequence is racing.>
>> Disable the PERST# IRQ before checking ep_state and re-enable it
>> immediately when suspend is rejected.
>
> So EP will still miss the PERST# deassertion anyway. Overall, I see this PERST#
> handling logic in suspend as fragile. Since PERST# is asynchronous, it will be
> racy if you try to check the state and make any decision.
>
> - Mani
Agree, once PCIe suspend is done, Tegra will not receive PERST#
assert/deassert, this is expected.
I am trying solve SW race where suspend and EP PERST# executes in parallel.
- Manikanta
--
nvpublic
next prev parent reply other threads:[~2026-10-16 9:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 7:22 [PATCH 00/11] PCI: tegra194: Fix EP and Root Port corner cases Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 01/11] PCI: tegra194: Propagate REFCLK select GPIO errors Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 02/11] PCI: tegra194: Check core reset deassertion Manikanta Maddireddy
2026-09-24 20:25 ` Andy Shevchenko
2026-09-28 5:45 ` Manikanta Maddireddy
2026-09-28 8:40 ` Andy Shevchenko
2026-09-23 7:22 ` [PATCH 03/11] PCI: tegra194: Fix Endpoint PERST# IRQ suspend race Manikanta Maddireddy
2026-10-14 14:14 ` Manivannan Sadhasivam
2026-10-16 9:25 ` Manikanta Maddireddy [this message]
2026-09-23 7:22 ` [PATCH 04/11] PCI: tegra194: Do not skip no-link Root Port remove cleanup Manikanta Maddireddy
2026-10-14 14:21 ` Manivannan Sadhasivam
2026-10-16 9:32 ` Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 05/11] PCI: tegra194: Check for 16 GT/s capability before programming Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 06/11] PCI: tegra194: Check for L1SS " Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 07/11] PCI: tegra194: Always disable Tegra234 Endpoint L1.2 Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 08/11] PCI: tegra194: Guard Endpoint PLL-off error path Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 09/11] PCI: tegra194: Balance core monitor clock on failures Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 10/11] PCI: tegra194: Fix Endpoint MSI/MSI-X numbering Manikanta Maddireddy
2026-09-23 13:32 ` Niklas Cassel
2026-09-28 5:48 ` Manikanta Maddireddy
2026-09-23 7:22 ` [PATCH 11/11] PCI: endpoint: test: Do not relocate fixed MSI-X tables Manikanta Maddireddy
2026-09-23 14:32 ` Niklas Cassel
2026-10-14 14:40 ` Manivannan Sadhasivam
2026-10-15 17:43 ` Koichiro Den
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e580f300-627f-4187-8cf2-e87ff9199488@nvidia.com \
--to=mmaddireddy@nvidia.com \
--cc=Frank.Li@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=den@valinux.co.jp \
--cc=jonathanh@nvidia.com \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=marco.crivellari@suse.com \
--cc=robh@kernel.org \
--cc=thierry.reding@kernel.org \
--cc=vidyas@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.