mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjoern Doebel <doebel@amazon.de>
To: Bjorn Helgaas <helgaas@kernel.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Cc: "Lukas Wunner" <lukas@wunner.de>,
	"Konrad Dybcio" <konradybcio@gmail.com>,
	"Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [REGRESSION] PCI: d4c79b63d82d4 "Allow D3 for native Hotplug capable Root Ports on non-x86" silently breaks surprise hotplug on empty slots
Date: Mon, 23 Nov 2026 14:44:21 +0000	[thread overview]
Message-ID: <20261123144424.4164268-1-doebel@amazon.de> (raw)

Hi Bjorn, Manivannan,

Commit d4c79b63d82d4 ("PCI: Allow D3 for native Hotplug capable Root
Ports on non-x86 platforms") breaks surprise hotplug on empty slots on
AWS Graviton bare metal. I didn't find this failure mode covered in
the existing discussion, but am leaving links to related reports
at the end.

Observation (m7g.metal, aarch64, native PCIe hotplug via _OSC): ENI
(Elastic Network Interface) attachment hot-adds an ENA NIC behind one
of the hotplug-capable Switch Downstream Ports, which are all empty at
boot. Since d4c79b63d82d4, those ports runtime-suspend to D3hot shortly
after boot (all 45 empty ports report "suspended" in
power/runtime_status), and a subsequent ENI attach produces no event
at all: no "Card present" from pciehp, no ACPI/GPE activity, no new
device, no error anywhere. Ports with live children stay awake, so
only devices attached after boot are affected.

The device itself is fully present behind the suspended port: with the
ENI attached and the event lost, a manual

  echo 1 > /sys/bus/pci/rescan

enumerates and probes it normally. So the hot-add completes in hardware,
but we lose the event delivery. From code reading, the port suspends
with the hotplug interrupt disabled (pciehp_runtime_suspend() ->
pciehp_disable_interrupt()) and nothing wakes a port with an empty slot.

Functionality works on 7.2. It also works if I manually disable D3
via pcie_port_pm=off and if I revert d4c79b63d82d4.

  kernel                                     empty ports    result
  ------------------------------------------ ------------- ----------
  7.2-based (before this commit)             active        PASS
  7.3-based (contains this commit)           suspended     FAIL
  7.3-based + pcie_port_pm=off               active        PASS
  7.3-based, only this commit reverted       active        PASS

This failure reproduces deterministically in our CI.

Related reports referencing this commit:

  - system suspend crash on Qualcomm SC8280XP CRD:
      https://lore.kernel.org/all/3eeb3465-a1e6-4fdc-8019-3907d9c55691@gmail.com/

  - commit recommended as a D3cold fix in the qcom hotplug thread:
      https://lore.kernel.org/linux-pci/1ae8d4f0-1c32-4dbd-a18e-7a2ce2627efc@oss.qualcomm.com/

Happy to try out any suggestions on how to proceed fixing this.

Best,
Bjoern

             reply	other threads:[~2026-11-23 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 14:44 Bjoern Doebel [this message]
2026-11-23 18:23 ` Bjoern Doebel

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=20261123144424.4164268-1-doebel@amazon.de \
    --to=doebel@amazon.de \
    --cc=helgaas@kernel.org \
    --cc=konradybcio@gmail.com \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=lukas@wunner.de \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=neil.armstrong@linaro.org \
    /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

all inboxes | Powered by JetHome®