Re: [PATCH 03/11] PCI: tegra194: Fix Endpoint PERST# IRQ suspend race

From: Manivannan Sadhasivam

Date: Wed Oct 14 2026 - 11:24:31 EST


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?

> 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