Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: hans.zhang@cixtech.com
Cc: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	manivannan.sadhasivam@linaro.org, linux-nvme@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] nvme-pci: Fix system hang when ASPM L1 is enabled during suspend
Date: Fri, 2 May 2025 10:00:27 -0500	[thread overview]
Message-ID: <20250502150027.GA818097@bhelgaas> (raw)
In-Reply-To: <20250502032051.920990-1-hans.zhang@cixtech.com>

On Fri, May 02, 2025 at 11:20:51AM +0800, hans.zhang@cixtech.com wrote:
> From: Hans Zhang <hans.zhang@cixtech.com>
> 
> When PCIe ASPM L1 is enabled (CONFIG_PCIEASPM_POWERSAVE=y), certain

CONFIG_PCIEASPM_POWERSAVE=y only sets the default.  L1 can be enabled
dynamically regardless of the config.

> NVMe controllers fail to release LPI MSI-X interrupts during system
> suspend, leading to a system hang. This occurs because the driver's
> existing power management path does not fully disable the device
> when ASPM is active.

I have no idea what this has to do with ASPM L1.  I do see that
nvme_suspend() tests pcie_aspm_enabled(pdev) (which seems kind of
janky and racy).  But this doesn't explain anything about what would
cause a system hang.

> The fix adds an explicit device disable and reset preparation step
> in the suspend path after successfully setting the power state.
> This ensures proper cleanup of interrupt resources even when ASPM
> L1 is enabled, preventing the system from hanging during suspend.

Maybe there's a clue in the 600 lines of debug output that I trimmed,
but without some interpretation, I have no idea how to find it.

Unless you see similar problems on other systems, I would suspect an
issue with the SoC or the SoC driver where you do see problems.

Bjorn

  reply	other threads:[~2025-05-02 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02  3:20 [PATCH] nvme-pci: Fix system hang when ASPM L1 is enabled during suspend hans.zhang
2025-05-02 15:00 ` Bjorn Helgaas [this message]
2025-05-02 15:49   ` Hans Zhang
2025-05-02 15:58     ` Manivannan Sadhasivam
2025-05-02 16:07       ` Hans Zhang
2025-05-02 16:20         ` Hans Zhang
2025-05-02 18:05           ` Manivannan Sadhasivam
2025-05-03 14:36             ` Hans Zhang
2025-05-02 15:45 ` Manivannan Sadhasivam
2025-05-02 16:04   ` Hans Zhang

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=20250502150027.GA818097@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hans.zhang@cixtech.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=sagi@grimberg.me \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox